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
Add missing redis stuff
Fang-Pen Linef7b25cb18f8
diff --git a/backend/src/ee/routes/v1/pam-session-router.ts b/backend/src/ee/routes/v1/pam-session-router.tsindex 574b8b7c3d..814033ad4c 100644--- a/backend/src/ee/routes/v1/pam-session-router.ts+++ b/backend/src/ee/routes/v1/pam-session-router.ts@@ -5,6 +5,7 @@ import { EventType } from "@app/ee/services/audit-log/audit-log-types";import { KubernetesSessionCredentialsSchema } from "@app/ee/services/pam-resource/kubernetes/kubernetes-resource-schemas";import { MySQLSessionCredentialsSchema } from "@app/ee/services/pam-resource/mysql/mysql-resource-schemas";import { PostgresSessionCredentialsSchema } from "@app/ee/services/pam-resource/postgres/postgres-resource-schemas";+import { RedisSessionCredentialsSchema } from "@app/ee/services/pam-resource/redis/redis-resource-schemas";import { SSHSessionCredentialsSchema } from "@app/ee/services/pam-resource/ssh/ssh-resource-schemas";import {HttpEventSchema,@@ -20,7 +21,8 @@ const SessionCredentialsSchema = z.union([SSHSessionCredentialsSchema,PostgresSessionCredentialsSchema,MySQLSessionCredentialsSchema,- KubernetesSessionCredentialsSchema+ KubernetesSessionCredentialsSchema,+ RedisSessionCredentialsSchema]);export const registerPamSessionRouter = async (server: FastifyZodProvider) => {diff --git a/backend/src/ee/services/pam-account/pam-account-service.ts b/backend/src/ee/services/pam-account/pam-account-service.tsindex 002e567fbe..ba7df425be 100644--- a/backend/src/ee/services/pam-account/pam-account-service.ts+++ b/backend/src/ee/services/pam-account/pam-account-service.ts@@ -886,12 +886,6 @@ export const pamAccountServiceFactory = ({break;case PamResource.Redis:{- const connectionCredentials = (await decryptResourceConnectionDetails({- encryptedConnectionDetails: resource.encryptedConnectionDetails,- kmsService,- projectId- })) as TRedisResourceConnectionDetails;-const credentials = (await decryptAccountCredentials({encryptedCredentials: account.encryptedCredentials,kmsService,@@ -900,8 +894,6 @@ export const pamAccountServiceFactory = ({metadata = {username: credentials.username,- host: connectionCredentials.host,- port: connectionCredentials.port,accountName: account.name,accountPath: folderPath};diff --git a/backend/src/ee/services/pam-resource/redis/redis-resource-factory.ts b/backend/src/ee/services/pam-resource/redis/redis-resource-factory.tsindex 7c1ef772eb..45908b783f 100644--- a/backend/src/ee/services/pam-resource/redis/redis-resource-factory.ts+++ b/backend/src/ee/services/pam-resource/redis/redis-resource-factory.ts@@ -64,7 +64,10 @@ const makeRedisConnection = (rejectUnauthorized: sslRejectUnauthorized,ca: sslCertificate}- })+ }),+ retryStrategy: () => {+ return null;+ }});};@@ -74,15 +77,9 @@ const makeRedisConnection = (client = createClient();// Test authentication- let result: string;- if (actualPassword) {- result = await client.auth(actualUsername, actualPassword, () => {});- } else {- result = await client.auth(actualUsername, () => {});- }-+ const result = await client.auth(actualUsername, actualPassword);if (result !== "OK") {- throw new BadRequestError({ message: `Redis authentication failed: ${result}` });+ throw new BadRequestError({ message: `Redis authentication failed: ${result as string}` });}// Test connection with a simple commanddiff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsxindex faa9ff87d5..544d5884fe 100644--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx@@ -83,6 +83,8 @@ export const PamAccessAccountModal = ({case PamResourceType.Postgres:case PamResourceType.MySQL:return `infisical pam db access-account ${fullAccountPath} --project-id ${projectId} --duration ${cliDuration} --domain ${siteURL}`;+ case PamResourceType.Redis:+ return `infisical pam redis access-account ${fullAccountPath} --project-id ${projectId} --duration ${cliDuration} --domain ${siteURL}`;case PamResourceType.SSH:return `infisical pam ssh access-account ${fullAccountPath} --project-id ${projectId} --duration ${cliDuration} --domain ${siteURL}`;case PamResourceType.Kubernetes:diff --git a/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsx b/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsxindex a5ac89593d..a6d50c1387 100644--- a/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsx+++ b/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsx@@ -22,7 +22,8 @@ export const PamSessionLogsSection = ({ session }: Props) => {const isSSHSession = session.resourceType === PamResourceType.SSH;const isDatabaseSession =session.resourceType === PamResourceType.Postgres ||- session.resourceType === PamResourceType.MySQL;+ session.resourceType === PamResourceType.MySQL ||+ session.resourceType === PamResourceType.Redis;const isHttpSession = session.resourceType === PamResourceType.Kubernetes;const isAwsIamSession = session.resourceType === PamResourceType.AwsIam;const hasLogs = session.logs.length > 0;