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
chore: more patches
Sheen Capadngan37a470f3054e
diff --git a/backend/src/ee/routes/v1/pam-routers/pam-account-router.ts b/backend/src/ee/routes/v1/pam-routers/pam-account-router.tsindex 4e11218e0f..39be4f3257 100644--- a/backend/src/ee/routes/v1/pam-routers/pam-account-router.ts+++ b/backend/src/ee/routes/v1/pam-routers/pam-account-router.ts@@ -57,6 +57,7 @@ const AdminAccountListItemSchema = SanitizedAccountListItemSchema.extend({.array(z.nativeEnum(PamAccountAccessibilityIssue)).describe("Reasons the account cannot launch a session, if any"),requiresApproval: z.boolean().describe("Whether this account requires approval before launching a session"),+ requireReason: z.boolean().describe("Whether the account's template requires a reason for access"),accessStatus: z.nativeEnum(PamAccessStatus).describe("Current approval status for the caller"),grantExpiresAt: z.date().nullable().describe("When the current grant expires, if granted")});diff --git a/backend/src/ee/services/pam-account/pam-account-service.ts b/backend/src/ee/services/pam-account/pam-account-service.tsindex 387217cc6f..39889d9307 100644--- a/backend/src/ee/services/pam-account/pam-account-service.ts+++ b/backend/src/ee/services/pam-account/pam-account-service.ts@@ -215,7 +215,7 @@ export const pamAccountServiceFactory = (deps: TPamAccountServiceFactoryDep) =>return accounts.map((a) => {const { accessibilityIssues, isAccessible } = computeAccessibility(a);- const { requiresApproval } = resolveAccessControls(a.templatePolicies);+ const { requiresApproval, requireReason } = resolveAccessControls(a.templatePolicies);if (requiresApproval && a.folderId && !foldersWithApprovalPolicy.has(a.folderId)) {accessibilityIssues.push(PamAccountAccessibilityIssue.NoApprovalConfig);}@@ -236,6 +236,7 @@ export const pamAccountServiceFactory = (deps: TPamAccountServiceFactoryDep) =>isAccessible: isAccessible && accessibilityIssues.length === 0,accessibilityIssues,requiresApproval,+ requireReason,accessStatus: requiresApproval ? (statusEntry?.accessStatus ?? PamAccessStatus.None) : PamAccessStatus.None,grantExpiresAt: statusEntry?.grantExpiresAt ?? null,createdAt: a.createdAt,diff --git a/frontend/src/hooks/api/pam/queries.tsx b/frontend/src/hooks/api/pam/queries.tsxindex 65d44d7e31..47027be50a 100644--- a/frontend/src/hooks/api/pam/queries.tsx+++ b/frontend/src/hooks/api/pam/queries.tsx@@ -243,6 +243,7 @@ type TAdminAccountListItem = {isAccessible: boolean;accessibilityIssues: PamAccountAccessibilityIssue[];requiresApproval: boolean;+ requireReason: boolean;accessStatus: PamAccessStatus;grantExpiresAt: string | null;createdAt: string;diff --git a/frontend/src/pages/pam/PamAccountsPage/components/AccountActionsMenu.tsx b/frontend/src/pages/pam/PamAccountsPage/components/AccountActionsMenu.tsxindex 0c173197a9..68e5b6d908 100644--- a/frontend/src/pages/pam/PamAccountsPage/components/AccountActionsMenu.tsx+++ b/frontend/src/pages/pam/PamAccountsPage/components/AccountActionsMenu.tsx@@ -53,7 +53,10 @@ export const AccountActionsMenu = ({const isGranted = accessStatus === PamAccessStatus.Granted;const isPending = accessStatus === PamAccessStatus.Pending;- const needsApproval = requiresApproval && !isGranted && canLaunch;+ // Only offer request access for accounts that can actually launch once granted; an account that+ // isn't ready (missing credentials/gateway/recording/approval config) should surface the disabled+ // launch state instead, matching the accessible-account flow.+ const needsApproval = requiresApproval && !isGranted && canLaunch && isAccessible;// Launch requires: account is provisioned AND user has permission AND (no approval needed OR already granted)const canLaunchNow = isAccessible && canLaunch && (!requiresApproval || isGranted);diff --git a/frontend/src/pages/pam/PamAccountsPage/components/AccountRowActions.tsx b/frontend/src/pages/pam/PamAccountsPage/components/AccountRowActions.tsxindex a6bcd291c3..69a1f576e1 100644--- a/frontend/src/pages/pam/PamAccountsPage/components/AccountRowActions.tsx+++ b/frontend/src/pages/pam/PamAccountsPage/components/AccountRowActions.tsx@@ -39,7 +39,10 @@ export const AccountRowActions = ({const isGranted = accessStatus === PamAccessStatus.Granted;const isPending = accessStatus === PamAccessStatus.Pending;- const needsApproval = requiresApproval && !isGranted && canLaunch;+ // Only offer request access for accounts that can actually launch once granted; an account that+ // isn't ready (missing credentials/gateway/recording/approval config) should surface the disabled+ // launch state instead, matching the accessible-account flow.+ const needsApproval = requiresApproval && !isGranted && canLaunch && isAccessible;// Launch requires: account is provisioned AND user has permission AND (no approval needed OR already granted)const canLaunchNow = isAccessible && canLaunch && (!requiresApproval || isGranted);diff --git a/frontend/src/pages/pam/PamAccountsPage/components/FolderAccountRows.tsx b/frontend/src/pages/pam/PamAccountsPage/components/FolderAccountRows.tsxindex 730aa92cd2..640ed17a00 100644--- a/frontend/src/pages/pam/PamAccountsPage/components/FolderAccountRows.tsx+++ b/frontend/src/pages/pam/PamAccountsPage/components/FolderAccountRows.tsx@@ -145,6 +145,7 @@ export const FolderAccountRows = ({accountType,canLaunch: account.isAccessible && !needsApproval,requiresApproval,+ requireReason: account.requireReason,accessStatus,grantExpiresAt: account.grantExpiresAt,createdAt: account.createdAt,