You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(pam): view sensitive credentials/password for PAM accounts (#5925)
* feat: add PAM account credentials viewing with MFA support
Add a new endpoint and UI for viewing full (unsanitized) PAM account
credentials and resource connection details behind a dedicated
ReadCredentials permission, with optional MFA enforcement and audit logging.
* refactor: remove resource connection details from credentials view
Only show account credentials in the view credentials feature,
not resource connection details, to avoid coupling the two entities.
* refactor: replace credentials dialog with inline sensitive credentials gate
Replace the modal dialog approach with an inline card-based UI. Public
fields (username, host) are always visible, while sensitive fields
(password, private key) are behind a gated area that handles MFA
verification and permission checks in-place.
* fix: match private key pre styling to input and add thin scrollbar
* refactor: clean up credentials gate and defer MFA-only DB lookups
Move project and user DB lookups inside the MFA-required block so they
are skipped when MFA is not needed. Simplify credentials gate UI by
consolidating loading/MFA-verifying states into the button, adding
descriptive text for non-MFA mode, and removing unnecessary fragments
and section comments.
* refactor: remove unused useViewPamAccountCredentials hook
* refactor: simplify credentials gate to button with inline loading states
Replace the dashed-border gate box with a simple full-width button.
Use v3 Button isPending for loading/MFA states with inline MFA status
text. Remove MFA detail leaking to users without permission.
* refactor: clean up credentials view rate limit and simplify sensitive field defs
Use readLimit instead of writeLimit for the GET credentials endpoint.
Simplify RESOURCE_FIELD_DEFS to only contain sensitive fields since
non-sensitive fields are already rendered by CredentialsContent.
* fix: hide credentials view button when account has no sensitive fields
Accounts like SSH certificate auth and AWS IAM have no sensitive
credentials beyond the sanitized view. The API now returns a 400
early (before MFA/audit log), and the frontend uses an account-aware
function to decide whether to show the button.
* fix: replace inline error states with toast notifications and align Kubernetes sensitive check
- Remove error state from RevealState and SensitiveCredentialsGate; all errors
now show a toast notification and reset to the initial button view
- MFA timeout notification includes popup blocker hint
- Remove redundant "Waiting for MFA..." button text (keep only the p tag)
- Add Kubernetes to hasSensitiveCredentials exclusion list to match frontend
- Remove unused onRetry prop from SensitiveCredentialsGate
* refactor: use inline spinner with text for MFA button states
- Replace Lottie isPending spinner with LoaderCircleIcon for all loading states
- Loading state shows spinner only, MFA state shows spinner + "Waiting for MFA..."
- Extract ButtonContent component to avoid nested ternary lint error
- Change children prop to React.ReactElement to avoid useless fragment
* fix: update credentials route description and fix children type in gate component
* fix: align audit log metadata with PAM conventions and add ABAC subject conditions to credentials gate
- Change ReadCredentials audit event metadata from resourceName to resourceId
to match Delete/Rotation/RotationFailed event patterns
- Pass accountName, resourceName, and metadata to SensitiveCredentialsGate
so ProjectPermissionCan evaluates resource-scoped ReadCredentials policies
* fix: add re-entrancy guard to MFA polling interval
* feat: add PAM_ACCOUNT_READ_CREDENTIALS to frontend audit log types
* fix: remove PAM_ACCOUNT_READ_CREDENTIALS from audit log types
* fix: add resourceType to readCredentials permission subject
* fix: show error toast when viewing credentials for account with no password
* fix: add resourceType to credentials gate CASL subject and await clipboard writes
* fix: show error toast when MFA popup is blocked
* fix: add try/catch to clipboard copy handlers in sensitive fields
* fix: move credentials endpoint to POST and send empty body when no mfaSessionId
* fix: add ReadCredentials to rolePermission2Form deserialization for PAM accounts
0 commit comments