Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
requested changes
Daniel Hougaard78783b245be8
diff --git a/backend/src/ee/services/secret-rotation-v2/redis-credentials/redis-credentials-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/redis-credentials/redis-credentials-rotation-fns.tsindex c321cdeb01..5dec96d2d2 100644--- a/backend/src/ee/services/secret-rotation-v2/redis-credentials/redis-credentials-rotation-fns.ts+++ b/backend/src/ee/services/secret-rotation-v2/redis-credentials/redis-credentials-rotation-fns.ts@@ -61,21 +61,23 @@ export const redisCredentialsRotationFactory: TRotationFactory<* Creates a new user and password for the redis user using ACL*/const $rotateAclUser = async () => {- const client = await $getClient();-- const username = generatePassword({- length: 32,- required: {- symbols: 0,- digits: 5,- uppercase: 5,- lowercase: 5- }- });-- const password = generatePassword(parameters.passwordRequirements || DEFAULT_PASSWORD_REQUIREMENTS);+ let client: Redis | null = null;try {+ client = await $getClient();++ const username = generatePassword({+ length: 32,+ required: {+ symbols: 0,+ digits: 5,+ uppercase: 5,+ lowercase: 5+ }+ });++ const password = generatePassword(parameters.passwordRequirements || DEFAULT_PASSWORD_REQUIREMENTS);+// important: permissionScope is user input so we need to sanitize it, which we do by splitting the permission scope into parts and then passing them to the ACL command as separate argumentsconst permissionParts = (parameters.permissionScope || "~* +@all").split(" ");await client.call("ACL", "SETUSER", username, `>${password}`, "on", ...permissionParts);@@ -88,6 +90,8 @@ export const redisCredentialsRotationFactory: TRotationFactory<throw new BadRequestError({message: "Unable to validate connection: verify credentials"});+ } finally {+ if (client) await client.quit();}};@@ -95,14 +99,17 @@ export const redisCredentialsRotationFactory: TRotationFactory<* Revokes a ACL password from the Redis server using its username and password.*/const revokeCredential = async (username: string) => {- const client = await $getClient();+ let client: Redis | null = null;try {+ client = await $getClient();await client.call("ACL", "DELUSER", username);} catch (error: unknown) {throw new BadRequestError({message: "Unable to revoke credential: verify credentials"});+ } finally {+ if (client) await client.quit();}};diff --git a/backend/src/services/app-connection/redis/redis-connection-schemas.ts b/backend/src/services/app-connection/redis/redis-connection-schemas.tsindex 60c8b8458f..f29a2d036f 100644--- a/backend/src/services/app-connection/redis/redis-connection-schemas.ts+++ b/backend/src/services/app-connection/redis/redis-connection-schemas.ts@@ -61,8 +61,8 @@ export const ValidateRedisConnectionCredentialsSchema = z.discriminatedUnion("meexport const CreateRedisConnectionSchema = ValidateRedisConnectionCredentialsSchema.and(GenericCreateAppConnectionFieldsSchema(AppConnection.Redis, {- supportsPlatformManagedCredentials: true,- supportsGateways: true+ supportsPlatformManagedCredentials: false,+ supportsGateways: false}));@@ -74,8 +74,8 @@ export const UpdateRedisConnectionSchema = z}).and(GenericUpdateAppConnectionFieldsSchema(AppConnection.Redis, {- supportsPlatformManagedCredentials: true,- supportsGateways: true+ supportsPlatformManagedCredentials: false,+ supportsGateways: false}));diff --git a/docs/docs.json b/docs/docs.jsonindex 45d02228e6..b2ce93499a 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -134,14 +134,14 @@"integrations/app-connections/oracledb","integrations/app-connections/postgres","integrations/app-connections/railway",+ "integrations/app-connections/redis","integrations/app-connections/render","integrations/app-connections/supabase","integrations/app-connections/teamcity","integrations/app-connections/terraform-cloud","integrations/app-connections/vercel","integrations/app-connections/windmill",- "integrations/app-connections/zabbix",- "integrations/app-connections/redis"+ "integrations/app-connections/zabbix"]}]@@ -1881,6 +1881,18 @@"api-reference/endpoints/app-connections/railway/delete"]},+ {+ "group": "Redis",+ "pages": [+ "api-reference/endpoints/app-connections/redis/list",+ "api-reference/endpoints/app-connections/redis/available",+ "api-reference/endpoints/app-connections/redis/get-by-id",+ "api-reference/endpoints/app-connections/redis/get-by-name",+ "api-reference/endpoints/app-connections/redis/create",+ "api-reference/endpoints/app-connections/redis/update",+ "api-reference/endpoints/app-connections/redis/delete"+ ]+ },{"group": "Render","pages": [@@ -1964,18 +1976,6 @@"api-reference/endpoints/app-connections/zabbix/update","api-reference/endpoints/app-connections/zabbix/delete"]- },- {- "group": "Redis",- "pages": [- "api-reference/endpoints/app-connections/redis/list",- "api-reference/endpoints/app-connections/redis/available",- "api-reference/endpoints/app-connections/redis/get-by-id",- "api-reference/endpoints/app-connections/redis/get-by-name",- "api-reference/endpoints/app-connections/redis/create",- "api-reference/endpoints/app-connections/redis/update",- "api-reference/endpoints/app-connections/redis/delete"- ]}]},diff --git a/docs/images/app-connections/redis/redis-app-connection-form.png b/docs/images/app-connections/redis/redis-app-connection-form.pngnew file mode 100644index 0000000000..05db36fd55Binary files /dev/null and b/docs/images/app-connections/redis/redis-app-connection-form.png differdiff --git a/docs/images/app-connections/redis/redis-connection-form.png b/docs/images/app-connections/redis/redis-connection-form.pngdeleted file mode 100644index 4f368b22a8..0000000000Binary files a/docs/images/app-connections/redis/redis-connection-form.png and /dev/null differdiff --git a/docs/images/secret-rotations-v2/redis-credentials/select-redis-credentials-option.png b/docs/images/secret-rotations-v2/redis-credentials/select-redis-credentials-option.pngnew file mode 100644index 0000000000..979a77b43eBinary files /dev/null and b/docs/images/secret-rotations-v2/redis-credentials/select-redis-credentials-option.png differ