From 6dbe3c879305496dddffc746c2ca3bcdd094f695 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Sun, 3 Nov 2024 22:18:01 +0400 Subject: [PATCH] fix: removed exported field --- backend/src/db/migrations/20241028134337_kms-root-cfg-hsm.ts | 4 ---- backend/src/db/schemas/kms-root-config.ts | 1 - backend/src/ee/services/license/license-fns.ts | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/backend/src/db/migrations/20241028134337_kms-root-cfg-hsm.ts b/backend/src/db/migrations/20241028134337_kms-root-cfg-hsm.ts index ff76d8eea5..a586f94b8b 100644 --- a/backend/src/db/migrations/20241028134337_kms-root-cfg-hsm.ts +++ b/backend/src/db/migrations/20241028134337_kms-root-cfg-hsm.ts @@ -4,12 +4,10 @@ import { TableName } from "../schemas"; export async function up(knex: Knex): Promise { const hasEncryptionStrategy = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "encryptionStrategy"); - const hasExported = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "exported"); const hasTimestampsCol = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "createdAt"); await knex.schema.alterTable(TableName.KmsServerRootConfig, (t) => { if (!hasEncryptionStrategy) t.string("encryptionStrategy").defaultTo("BASIC"); - if (!hasExported) t.boolean("exported").defaultTo(false); if (!hasTimestampsCol) t.timestamps(true, true, true); }); } @@ -17,11 +15,9 @@ export async function up(knex: Knex): Promise { export async function down(knex: Knex): Promise { const hasEncryptionStrategy = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "encryptionStrategy"); const hasTimestampsCol = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "createdAt"); - const hasExported = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "exported"); await knex.schema.alterTable(TableName.KmsServerRootConfig, (t) => { if (hasEncryptionStrategy) t.dropColumn("encryptionStrategy"); if (hasTimestampsCol) t.dropTimestamps(true); - if (hasExported) t.dropColumn("exported"); }); } diff --git a/backend/src/db/schemas/kms-root-config.ts b/backend/src/db/schemas/kms-root-config.ts index 950f818c44..d15e1dff89 100644 --- a/backend/src/db/schemas/kms-root-config.ts +++ b/backend/src/db/schemas/kms-root-config.ts @@ -13,7 +13,6 @@ export const KmsRootConfigSchema = z.object({ id: z.string().uuid(), encryptedRootKey: zodBuffer, encryptionStrategy: z.string(), - exported: z.boolean(), createdAt: z.date(), updatedAt: z.date() }); diff --git a/backend/src/ee/services/license/license-fns.ts b/backend/src/ee/services/license/license-fns.ts index 8e86851a0f..70c2995641 100644 --- a/backend/src/ee/services/license/license-fns.ts +++ b/backend/src/ee/services/license/license-fns.ts @@ -29,7 +29,7 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({ auditLogStreams: false, auditLogStreamLimit: 3, samlSSO: false, - hsm: true, + hsm: false, oidcSSO: false, scim: false, ldap: false,