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
enhance notification
adilsonc33e933d55be
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 30769af480..6aae0296e7 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@@ -2,10 +2,10 @@ import {type AccessKeyMetadata,CreateAccessKeyCommand,DeleteAccessKeyCommand,- GetUserCommand,IAMClient,ListAccessKeysCommand} from "@aws-sdk/client-iam";+import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";import {TAwsIamUserSecretRotationGeneratedCredentials,@@ -127,23 +127,22 @@ export const awsIamUserSecretRotationFactory: TRotationFactory<TAwsIamUserSecretRotationGeneratedCredentials> = async ({ accessKeyId, secretAccessKey }) => {const { region: resolvedRegion } = await getAwsConnectionConfig(connection, region);- const iam = new IAMClient({- credentials: { accessKeyId, secretAccessKey },- region: resolvedRegion++ const sts = new STSClient({+ credentials: {+ accessKeyId: accessKeyId.trim(),+ secretAccessKey: secretAccessKey.trim()+ },+ region: resolvedRegion,+ maxAttempts: 2});try {- await iam.send(new GetUserCommand({}));+ await sts.send(new GetCallerIdentityCommand({}));} catch (err) {- const errName = (err as { name?: string }).name;- // AccessDenied means the credentials authenticated successfully but the IAM user- // lacks iam:GetUser on themselves — the credential is still valid for our purposes.- if (errName === "AccessDenied") {- throw new BadRequestError({- message: "Failed to check active credentials"- });- }- throw err;+ throw new BadRequestError({+ message: "Failed to authenticate with the rotated credentials"+ });}};diff --git a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsxindex 06acccbb4e..b7cec7915b 100644--- a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx@@ -109,6 +109,7 @@ import {} from "@app/context/ProjectPermissionContext/types";import { downloadSecretEnvFile } from "@app/helpers/download";import { OrgMembershipRole } from "@app/helpers/roles";+import { SECRET_ROTATION_MAP } from "@app/helpers/secretRotationsV2";import {getUserTablePreference,PreferenceKey,@@ -3163,7 +3164,8 @@ const OverviewPageContent = () => {});createNotification({type: "success",- text: "Active credentials are still valid"+ title: "Credentials verified",+ text: `Successfully authenticated to ${SECRET_ROTATION_MAP[secretRotation.type].name} with the current rotated credentials for ${secretRotation.name}`});}}/>