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
address review comments
adilsonf68a2ada59b6
diff --git a/backend/src/ee/services/secret-rotation-v2/aws-iam-user-secret/aws-iam-user-secret-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/aws-iam-user-secret/aws-iam-user-secret-rotation-fns.tsindex 6aae0296e7..c0464bdec2 100644--- a/backend/src/ee/services/secret-rotation-v2/aws-iam-user-secret/aws-iam-user-secret-rotation-fns.ts+++ b/backend/src/ee/services/secret-rotation-v2/aws-iam-user-secret/aws-iam-user-secret-rotation-fns.ts@@ -5,7 +5,7 @@ import {IAMClient,ListAccessKeysCommand} from "@aws-sdk/client-iam";-import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";+import { GetCallerIdentityCommand, STSClient, STSServiceException } from "@aws-sdk/client-sts";import {TAwsIamUserSecretRotationGeneratedCredentials,@@ -140,9 +140,13 @@ export const awsIamUserSecretRotationFactory: TRotationFactory<try {await sts.send(new GetCallerIdentityCommand({}));} catch (err) {- throw new BadRequestError({- message: "Failed to authenticate with the rotated credentials"- });+ if (err instanceof STSServiceException) {+ throw new BadRequestError({+ message: `Unable to validate credentials: ${+ err.message ?? `AWS responded with a status code of ${err.$metadata.httpStatusCode}.`+ }`+ });+ }}};diff --git a/backend/src/ee/services/secret-rotation-v2/azure-client-secret/azure-client-secret-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/azure-client-secret/azure-client-secret-rotation-fns.tsindex 4cecb7e169..0e9c4567b4 100644--- a/backend/src/ee/services/secret-rotation-v2/azure-client-secret/azure-client-secret-rotation-fns.ts+++ b/backend/src/ee/services/secret-rotation-v2/azure-client-secret/azure-client-secret-rotation-fns.ts@@ -258,12 +258,12 @@ export const azureClientSecretRotationFactory: TRotationFactory<try {await request.post(tokenEndpoint,- new URLSearchParams({+ {grant_type: "client_credentials",client_id: activeClientId,client_secret: clientSecret,scope: "https://graph.microsoft.com/.default"- }).toString(),+ },{headers: { "Content-Type": "application/x-www-form-urlencoded" }}diff --git a/backend/src/ee/services/secret-rotation-v2/databricks-service-principal-secret/databricks-service-principal-secret-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/databricks-service-principal-secret/databricks-service-principal-secret-rotation-fns.tsindex a9048bb7c5..14a603afdd 100644--- a/backend/src/ee/services/secret-rotation-v2/databricks-service-principal-secret/databricks-service-principal-secret-rotation-fns.ts+++ b/backend/src/ee/services/secret-rotation-v2/databricks-service-principal-secret/databricks-service-principal-secret-rotation-fns.ts@@ -263,19 +263,16 @@ export const databricksServicePrincipalSecretRotationFactory: TRotationFactory<const basicAuth = Buffer.from(`${activeClientId}:${clientSecret}`).toString("base64");try {- await request.post(- tokenEndpoint,- new URLSearchParams({+ await request.post(tokenEndpoint, undefined, {+ params: {grant_type: "client_credentials",scope: "all-apis"- }).toString(),- {- headers: {- "Content-Type": "application/x-www-form-urlencoded",- Authorization: `Basic ${basicAuth}`- }+ },+ headers: {+ "Content-Type": "application/x-www-form-urlencoded",+ Authorization: `Basic ${basicAuth}`}- );+ });} catch (error: unknown) {let errorMessage = "Unknown error";diff --git a/backend/src/ee/services/secret-rotation-v2/open-router-api-key/open-router-api-key-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/open-router-api-key/open-router-api-key-rotation-fns.tsindex cbf8b901ad..333bd589b4 100644--- a/backend/src/ee/services/secret-rotation-v2/open-router-api-key/open-router-api-key-rotation-fns.ts+++ b/backend/src/ee/services/secret-rotation-v2/open-router-api-key/open-router-api-key-rotation-fns.ts@@ -178,7 +178,7 @@ export const openRouterApiKeyRotationFactory: TRotationFactory<TOpenRouterApiKeyRotationGeneratedCredentials> = async ({ apiKey }) => {try {- await request.get(`${OPEN_ROUTER_API_BASE_URL}/auth/key`, {+ await request.get(`${OPEN_ROUTER_API_BASE_URL}/key`, {headers: { Authorization: `Bearer ${apiKey}` }});} catch (error: unknown) {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 2f533951c5..f04eeb9449 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@@ -93,12 +93,6 @@ export const redisCredentialsRotationFactory: TRotationFactory<})});- const result: string = await conn.auth(credentials.username, credentials.password, () => {});-- if (result !== "OK") {- throw new BadRequestError({ message: `Invalid credentials, Redis returned ${result} status` });- }-await conn.ping();} catch (err) {throw new Error(redactPasswords(err, [credentials]));diff --git a/backend/src/ee/services/secret-rotation-v2/supabase-api-key/supabase-api-key-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/supabase-api-key/supabase-api-key-rotation-fns.tsindex 71280a5048..138f39427a 100644--- a/backend/src/ee/services/secret-rotation-v2/supabase-api-key/supabase-api-key-rotation-fns.ts+++ b/backend/src/ee/services/secret-rotation-v2/supabase-api-key/supabase-api-key-rotation-fns.ts@@ -161,8 +161,7 @@ export const supabaseApiKeyRotationFactory: TRotationFactory<try {await request.get(`${projectUrl}/auth/v1/settings`, {headers: {- apikey: apiKey,- Authorization: `Bearer ${apiKey}`+ apikey: apiKey}});} catch (error: unknown) {diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretRotationTableRow/SecretRotationTableRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretRotationTableRow/SecretRotationTableRow.tsxindex 4bef59df1c..a0a695b807 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretRotationTableRow/SecretRotationTableRow.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretRotationTableRow/SecretRotationTableRow.tsx@@ -154,7 +154,7 @@ export const SecretRotationTableRow = ({{isCheckingRotation ? <LoaderCircleIcon className="animate-spin" /> : <Check />}</IconButton></TooltipTrigger>- <TooltipContent>Check Credentials</TooltipContent>+ <TooltipContent>Validate Credentials</TooltipContent></Tooltip>);}}