The Simplest Way to Make AWS Secrets Manager and SAML Work Like They Should
You pair aws secrets manager and saml to tie secret reads to real users. Your identity provider signs a login assertion, and cloud roles grant temporary read rights. This workflow stops teams from sharing static cloud keys on local laptops. Users log in with their work email to fetch database keys or API tokens. How aws secrets manager and saml share login data The login flow starts when a user opens their identity provider portal. The provider checks the user password and multi-factor token
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You pair aws secrets manager and saml to tie secret reads to real users. Your identity provider signs a login assertion, and cloud roles grant temporary read rights.
This workflow stops teams from sharing static cloud keys on local laptops. Users log in with their work email to fetch database keys or API tokens.
How aws secrets manager and saml share login data
The login flow starts when a user opens their identity provider portal. The provider checks the user password and multi-factor token first.
Next, the provider builds a signed XML assertion with user group details. It sends this assertion to the cloud sign-in endpoint.
The cloud service checks the signature against a stored trust certificate. When the check passes, the cloud service issues temporary role keys.
The user tool or app then calls the secret store API. The cloud role policy checks if this user can read that specific secret.
If the role policy and resource policy both agree, the store returns the secret. Every read request writes a full entry into your cloud audit log.
Common failure modes and role scoping
Many teams map every assertion to one broad admin role. That single role can read every production database password in the account.
If an attacker steals one active session, they can read all your keys. Broad roles also make audit logs hard to read during a security check.
Another failure happens when teams skip session attribute tags on roles. Without tags, two different teams share the same role and see each other's secrets.
AWS Secrets Manager + SAML 2.0: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
You can fix this by splitting roles by team and stage. Map each identity group to a distinct cloud role with narrow read rules.
Pass user attributes from the assertion into the cloud session as tags. Then write secret policies that check those tags before returning any value.
Lock down network paths so secret reads only happen from known networks. Use private endpoints inside your cloud network to keep traffic off the public internet.
Also check your KMS key policies for each secret. A role needs both secret read rights and decryption rights on the KMS key.
Auditing secret reads and rotating stored keys
Getting a secret is only the first step in a production workflow. Once an engineer reads a raw database password, that key sits on their machine.
Even if the cloud session expires, the copied database password still works. You must pair short login sessions with frequent secret rotation.
Set up your secret store to rotate database passwords on a fixed schedule. When keys change often, copied passwords stop working after a short window.
Send all secret read events and login events to a central log store. Match the assertion subject ID with the secret read event in your logs.
Alert your security team when one user reads many secrets in one minute. Fast reads across many secrets often point to a stolen session token.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Can SAML assertions talk directly to the secret store?
No, the secret store only accepts signed cloud API requests. You must trade the assertion for temporary cloud role keys first.
How do we restrict secrets by team using group claims?
Pass the group name as a session tag during the cloud role login. Set the secret resource policy to require that exact tag value.
What happens when the identity provider session ends?
Existing cloud role keys stay active until their own timer runs out. Set short role duration timers so keys expire soon after the user logs out.
Related guides
In this post