mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-18 13:15:39 +00:00
misc: initial integration with local and pam proxy
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Knex } from "knex";
|
||||
|
||||
import { TableName } from "../schemas";
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
if (!(await knex.schema.hasColumn(TableName.GatewayV2, "encryptedPamSessionKey"))) {
|
||||
await knex.schema.alterTable(TableName.GatewayV2, (t) => {
|
||||
t.binary("encryptedPamSessionKey");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export async function down(knex: Knex): Promise<void> {
|
||||
if (await knex.schema.hasColumn(TableName.GatewayV2, "encryptedPamSessionKey")) {
|
||||
await knex.schema.alterTable(TableName.GatewayV2, (t) => {
|
||||
t.dropColumn("encryptedPamSessionKey");
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
import { z } from "zod";
|
||||
|
||||
import { zodBuffer } from "@app/lib/zod";
|
||||
|
||||
import { TImmutableDBKeys } from "./models";
|
||||
|
||||
export const GatewaysV2Schema = z.object({
|
||||
@@ -15,7 +17,8 @@ export const GatewaysV2Schema = z.object({
|
||||
identityId: z.string().uuid(),
|
||||
relayId: z.string().uuid().nullable().optional(),
|
||||
name: z.string(),
|
||||
heartbeat: z.date().nullable().optional()
|
||||
heartbeat: z.date().nullable().optional(),
|
||||
encryptedPamSessionKey: zodBuffer.nullable().optional()
|
||||
});
|
||||
|
||||
export type TGatewaysV2 = z.infer<typeof GatewaysV2Schema>;
|
||||
|
||||
Reference in New Issue
Block a user