misc: corrected hsm placement

This commit is contained in:
Sheen Capadngan
2025-10-28 23:41:25 +08:00
parent 8c9a683468
commit 8c5c88aefb
2 changed files with 28 additions and 28 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ export const isHsmActiveAndEnabled = async ({
rootKmsConfigEncryptionStrategy = (rootKmsConfig?.encryptionStrategy || null) as RootKeyEncryptionStrategy | null; rootKmsConfigEncryptionStrategy = (rootKmsConfig?.encryptionStrategy || null) as RootKeyEncryptionStrategy | null;
if ( if (
rootKmsConfigEncryptionStrategy === RootKeyEncryptionStrategy.HSM && (rootKmsConfigEncryptionStrategy === RootKeyEncryptionStrategy.HSM || isHsmConfigured) &&
licenseService && licenseService &&
!licenseService.onPremFeatures.hsm !licenseService.onPremFeatures.hsm
) { ) {
+3 -3
View File
@@ -2300,9 +2300,6 @@ export const registerRoutes = async (
// setup the communication with license key server // setup the communication with license key server
await licenseService.init(); await licenseService.init();
const completeServerInitialization = async () => {
await superAdminService.initServerCfg();
// If FIPS is enabled, we check to ensure that the users license includes FIPS mode. // If FIPS is enabled, we check to ensure that the users license includes FIPS mode.
crypto.verifyFipsLicense(licenseService); crypto.verifyFipsLicense(licenseService);
@@ -2330,6 +2327,9 @@ export const registerRoutes = async (
} }
} }
const completeServerInitialization = async () => {
await superAdminService.initServerCfg();
await telemetryQueue.startTelemetryCheck(); await telemetryQueue.startTelemetryCheck();
await telemetryQueue.startAggregatedEventsJob(); await telemetryQueue.startAggregatedEventsJob();
await dailyResourceCleanUp.init(); await dailyResourceCleanUp.init();