Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

change env name to DISABLE_PUBLIC_SECRET_SHARING

adilson21cc795e93f0
diff --git a/backend/src/lib/config/env.ts b/backend/src/lib/config/env.ts
index 249f1f2779..7cede31506 100644
--- a/backend/src/lib/config/env.ts
+++ b/backend/src/lib/config/env.ts
@@ -54,7 +54,7 @@ const envSchema = z
.enum(["true", "false"])
.default("false")
.transform((el) => el === "true"),
- DISABLE_SECRET_SHARING: zodStrBool.default("false"),
+ DISABLE_PUBLIC_SECRET_SHARING: zodStrBool.default("false"),
REDIS_URL: zpStr(z.string().optional()),
REDIS_USERNAME: zpStr(z.string().optional()),
REDIS_PASSWORD: zpStr(z.string().optional()),
diff --git a/backend/src/server/routes/v1/admin-router.ts b/backend/src/server/routes/v1/admin-router.ts
index 236f343573..ea4fe84a81 100644
--- a/backend/src/server/routes/v1/admin-router.ts
+++ b/backend/src/server/routes/v1/admin-router.ts
@@ -50,7 +50,7 @@ const SanitizedSuperAdminSchema = z.object({
fipsEnabled: z.boolean().optional(),
isMigrationModeOn: z.boolean().optional(),
isSecretScanningDisabled: z.boolean().optional(),
- isSecretSharingDisabled: z.boolean().optional(),
+ isPublicSecretSharingDisabled: z.boolean().optional(),
kubernetesAutoFetchServiceAccountToken: z.boolean().optional(),
paramsFolderSecretDetectionEnabled: z.boolean().optional(),
isOfflineUsageReportsEnabled: z.boolean().optional(),
@@ -99,7 +99,7 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
enabledLoginMethods: config.enabledLoginMethods,
authConsentContent: config.authConsentContent,
pageFrameContent: config.pageFrameContent,
- isSecretSharingDisabled: serverEnvs.DISABLE_SECRET_SHARING
+ isPublicSecretSharingDisabled: serverEnvs.DISABLE_PUBLIC_SECRET_SHARING
}
};
}
@@ -110,7 +110,7 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
fipsEnabled: crypto.isFipsModeEnabled(),
isMigrationModeOn: serverEnvs.MAINTENANCE_MODE,
isSecretScanningDisabled: serverEnvs.DISABLE_SECRET_SCANNING,
- isSecretSharingDisabled: serverEnvs.DISABLE_SECRET_SHARING,
+ isPublicSecretSharingDisabled: serverEnvs.DISABLE_PUBLIC_SECRET_SHARING,
kubernetesAutoFetchServiceAccountToken: serverEnvs.KUBERNETES_AUTO_FETCH_SERVICE_ACCOUNT_TOKEN,
paramsFolderSecretDetectionEnabled: serverEnvs.PARAMS_FOLDER_SECRET_DETECTION_ENABLED,
isOfflineUsageReportsEnabled: hasOfflineLicense
diff --git a/backend/src/server/routes/v1/secret-sharing-router.ts b/backend/src/server/routes/v1/secret-sharing-router.ts
index b5153564bd..c22454ead4 100644
--- a/backend/src/server/routes/v1/secret-sharing-router.ts
+++ b/backend/src/server/routes/v1/secret-sharing-router.ts
@@ -233,8 +233,8 @@ export const registerSecretSharingRouter = async (server: FastifyZodProvider) =>
},
handler: async (req) => {
const appCfg = getConfig();
- if (appCfg.DISABLE_SECRET_SHARING) {
- throw new BadRequestError({ message: "Secret sharing is disabled" });
+ if (appCfg.DISABLE_PUBLIC_SECRET_SHARING) {
+ throw new BadRequestError({ message: "Public Secret sharing is disabled" });
}
const sharedSecret = await req.server.services.secretSharing.createPublicSharedSecret({