mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-08 23:18:05 -05:00
misc: added configurable env for enabling/disabling encrypt
This commit is contained in:
@@ -78,3 +78,5 @@ PLAIN_API_KEY=
|
|||||||
PLAIN_WISH_LABEL_IDS=
|
PLAIN_WISH_LABEL_IDS=
|
||||||
|
|
||||||
SSL_CLIENT_CERTIFICATE_HEADER_KEY=
|
SSL_CLIENT_CERTIFICATE_HEADER_KEY=
|
||||||
|
|
||||||
|
ENABLE_MSSQL_SECRET_ROTATION_ENCRYPT=
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ export const secretRotationQueueFactory = ({
|
|||||||
|
|
||||||
queue.start(QueueName.SecretRotation, async (job) => {
|
queue.start(QueueName.SecretRotation, async (job) => {
|
||||||
const { rotationId } = job.data;
|
const { rotationId } = job.data;
|
||||||
|
const appCfg = getConfig();
|
||||||
logger.info(`secretRotationQueue.process: [rotationDocument=${rotationId}]`);
|
logger.info(`secretRotationQueue.process: [rotationDocument=${rotationId}]`);
|
||||||
const secretRotation = await secretRotationDAL.findById(rotationId);
|
const secretRotation = await secretRotationDAL.findById(rotationId);
|
||||||
const rotationProvider = rotationTemplates.find(({ name }) => name === secretRotation?.provider);
|
const rotationProvider = rotationTemplates.find(({ name }) => name === secretRotation?.provider);
|
||||||
@@ -178,7 +179,7 @@ export const secretRotationQueueFactory = ({
|
|||||||
const options =
|
const options =
|
||||||
provider.template.client === TDbProviderClients.MsSqlServer
|
provider.template.client === TDbProviderClients.MsSqlServer
|
||||||
? ({
|
? ({
|
||||||
encrypt: true,
|
encrypt: appCfg.ENABLE_MSSQL_SECRET_ROTATION_ENCRYPT,
|
||||||
cryptoCredentialsDetails: ca ? { ca } : {}
|
cryptoCredentialsDetails: ca ? { ca } : {}
|
||||||
} as Record<string, unknown>)
|
} as Record<string, unknown>)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|||||||
@@ -162,7 +162,8 @@ const envSchema = z
|
|||||||
DISABLE_AUDIT_LOG_GENERATION: zodStrBool.default("false"),
|
DISABLE_AUDIT_LOG_GENERATION: zodStrBool.default("false"),
|
||||||
SSL_CLIENT_CERTIFICATE_HEADER_KEY: zpStr(z.string().optional()).default("x-ssl-client-cert"),
|
SSL_CLIENT_CERTIFICATE_HEADER_KEY: zpStr(z.string().optional()).default("x-ssl-client-cert"),
|
||||||
WORKFLOW_SLACK_CLIENT_ID: zpStr(z.string().optional()),
|
WORKFLOW_SLACK_CLIENT_ID: zpStr(z.string().optional()),
|
||||||
WORKFLOW_SLACK_CLIENT_SECRET: zpStr(z.string().optional())
|
WORKFLOW_SLACK_CLIENT_SECRET: zpStr(z.string().optional()),
|
||||||
|
ENABLE_MSSQL_SECRET_ROTATION_ENCRYPT: zodStrBool.default("true")
|
||||||
})
|
})
|
||||||
.transform((data) => ({
|
.transform((data) => ({
|
||||||
...data,
|
...data,
|
||||||
|
|||||||
Reference in New Issue
Block a user