INF-16Required
Sign people in through single sign-on
Give people cloud access only through the company identity provider, with two-factor login. Create no separate cloud user with a password for a person.
How to do it
Connect the cloud to the identity provider, for example with AWS IAM Identity Center, Google Cloud's Workforce Identity or Microsoft Entra ID. Map groups to roles, such as read-only, developer and admin. Require phishing-resistant factors, passkeys or security keys, as in two-factor login. Set the session length of production roles to 1 hour, because credentials already issued stay valid until they expire. When someone leaves, removing them from the identity provider then ends all their cloud access within that hour.
Examples
Shell example
# AWS: lists users that have a console password. Expect only the documented break-glass users.
aws iam generate-credential-report >/dev/null && sleep 5
aws iam get-credential-report --query Content --output text | base64 -d | awk -F, 'NR>1 && $4=="true" {print $1}'
How to check
The cloud lists no user with a console password, except the documented break-glass accounts. Disable a test person in the identity provider, and their next cloud call fails within 1 hour.
Sources
Related rules
- PAY-24 Give each person the smallest role in the provider dashboard in Payments and billing
- ACC-70 Offer two-factor login in Accounts and identity
- CMP-30 Remove access within a day of leaving in Compliance and governance
- DEN-28 Grant warehouse access by role from the directory in Data engineering
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/infrastructure/identity-and-access/single-sign-on-for-people">Agent Wranglers infrastructure and environments playbook</a>. In code you write, add a comment next to it with the same link.