Skip to content

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

feat: updated redis and rotation

=05005f4258f1
diff --git a/backend/src/ee/services/dynamic-secret/providers/redis.ts b/backend/src/ee/services/dynamic-secret/providers/redis.ts
index 33a5a65608..78efe98e3a 100644
--- a/backend/src/ee/services/dynamic-secret/providers/redis.ts
+++ b/backend/src/ee/services/dynamic-secret/providers/redis.ts
@@ -52,7 +52,7 @@ const executeTransactions = async (connection: Redis, commands: string[]): Promi
export const RedisDatabaseProvider = (): TDynamicProviderFns => {
const validateProviderInputs = async (inputs: unknown) => {
const providerInputs = await DynamicSecretRedisDBSchema.parseAsync(inputs);
- await verifyHostInputValidity(providerInputs.host);
+ const [hostIp] = await verifyHostInputValidity(providerInputs.host);
validateHandlebarTemplate("Redis creation", providerInputs.creationStatement, {
allowedExpressions: (val) => ["username", "password", "expiration"].includes(val)
});
@@ -65,7 +65,7 @@ export const RedisDatabaseProvider = (): TDynamicProviderFns => {
allowedExpressions: (val) => ["username"].includes(val)
});
- return providerInputs;
+ return { ...providerInputs, host: hostIp };
};
const $getClient = async (providerInputs: z.infer<typeof DynamicSecretRedisDBSchema>) => {
diff --git a/backend/src/ee/services/secret-rotation/secret-rotation-queue/secret-rotation-queue-fn.ts b/backend/src/ee/services/secret-rotation/secret-rotation-queue/secret-rotation-queue-fn.ts
index 7de90bbb8a..e86469c510 100644
--- a/backend/src/ee/services/secret-rotation/secret-rotation-queue/secret-rotation-queue-fn.ts
+++ b/backend/src/ee/services/secret-rotation/secret-rotation-queue/secret-rotation-queue-fn.ts
@@ -88,13 +88,13 @@ export const secretRotationDbFn = async ({
options
}: TSecretRotationDbFn) => {
const ssl = ca ? { rejectUnauthorized: false, ca } : undefined;
- await verifyHostInputValidity(host);
+ const [hostIp] = await verifyHostInputValidity(host);
const db = knex({
client,
connection: {
database,
port,
- host,
+ host: hostIp,
user: username,
password,
connectionTimeoutMillis: EXTERNAL_REQUEST_TIMEOUT,