saml2aws
$ saml2aws Community Med RiskVersent's saml2aws logs into enterprise SAML 2.0 identity providers and exchanges SAML assertions for temporary AWS STS credentials. Supports --skip-prompt, --quiet, and --credential-process JSON output for ~/.aws/config, though IdP MFA flows often require human interaction.
brew install saml2aws saml2aws exchanges local SAML assertions for AWS STS tokens on the user's workstation; local IdP credential brokering cannot live in an MCP server.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --skip-prompt and --credential-process JSON output, but enterprise SAML MFA/CAPTCHA/browser challenges frequently block headless agent runs.
- Supports
--skip-prompt --quiet --credential-processJSON output - Interactive MFA/SSO prompts block autonomous agents if session expired
Issues short-lived AWS STS credentials and integrates with OS keychain, though --credential-process prints secret keys to stdout if invoked directly.
- Replaces static IAM user keys with time-bounded STS credentials
Single Go binary via Homebrew and GitHub releases across macOS, Linux, and Windows, though requires ~/.saml2aws configuration.
- Available via
brew install saml2awsand release binaries
Important bridge for legacy SAML 2.0 corporate IdPs, though AWS IAM Identity Center (aws sso / aws-sso) is increasingly replacing SAML2AWS.
- Supports Okta, ADFS, Ping, OneLogin, and AzureAD SAML providers
Community-maintained Go project (Versent/saml2aws) under MIT license.
- MIT-licensed
Versent/saml2awsrepository
Extensive provider-specific README guides, though flag behavior varies slightly across IdP drivers.
- Documented in GitHub README and
--help
Security, Auth & Guardrails
Stores IdP config in ~/.saml2aws, writes temporary STS tokens to ~/.aws/credentials (or outputs JSON via --credential-process), and optionally caches IdP passwords in OS keychain.
MIT open-source CLI; free to use.
# saml2aws Agent Rules - Always pass `--skip-prompt` so `saml2aws` fails fast instead of hanging on stdin prompts. - Never print or log `--credential-process` JSON output containing `SecretAccessKey` or `SessionToken`. - If MFA or browser auth is required, pause and ask the user to run `saml2aws login`.
Agent-Ready Command Recipes
Safe Read-Only Queries
saml2aws list-roles --profile my-profile --skip-prompt
Lists available AWS IAM roles associated with your SAML session.
credential_process JSON non-interactively saml2aws login --profile my-profile --skip-prompt --quiet --credential-process
Returns temporary STS credentials as JSON when IdP session/MFA does not prompt.
Strengths for Agents
- +
--skip-prompt --quiet --credential-processintegrates cleanly with~/.aws/config. - + Supports dozens of enterprise SAML 2.0 identity providers.
- + Issues short-lived STS credentials instead of static IAM keys.
Caveats & Pitfalls
- ! Interactive MFA challenges and browser-based IdP logins frequently block headless agents.
- ! Running
--credential-processdirectly emitsSecretAccessKeyandSessionTokento stdout.