IdentityService 05 of 139 controls
AWS IAM Identity Center security hardening
Harden AWS IAM Identity Center: delegated administration, job-based permission sets, phishing-resistant MFA, short-lived CLI credentials and break-glass access.
On this page
AWS IAM Identity Center is the organization-wide sign-in service for AWS: people authenticate once, against its own directory or an external identity provider, and receive temporary credentials for the accounts and permission sets they are assigned. Most AWS breaches that start with stolen credentials start somewhere else: a long-lived IAM user access key committed to a repository, left in a CI variable or copied to a laptop, then used within minutes to spin up cryptomining instances or read data. Identity Center removes the reason those keys exist, but only if it is set up well. At defaults you can still end up with MFA that only prompts on new devices, TOTP codes that a phishing proxy relays in real time, admin sessions that last all day, permission sets assigned to individuals, and the management account administered by the same people who run workloads. This page covers the structural fix: delegated administration, a small catalog of job-based permission sets, phishing-resistant MFA, short-lived CLI credentials, and a break-glass path for when the identity provider is down. Cleaning up the IAM user keys you already have is covered on the IAM page.
Baseline controls
- 0101Identity Center enabled with a delegated administrator
Central sign-in for every account, administered outside the management account.
How to check:aws organizations list-delegated-administrators --service-principal sso.amazonaws.comMapping: CIS 2.19, CIS 2.1.6 - 0202Job-based permission sets assigned to groups
Group membership becomes the access review instead of policies spread across accounts.
How to check:aws sso-admin list-permission-sets --instance-arn <instance-arn> - 0303Short session duration on privileged permission sets
Limits how long a stolen admin session or browser cookie stays useful.
How to check:aws sso-admin describe-permission-set --instance-arn <arn> --permission-set-arn <ps> - 0404Permissions boundary on developer permission sets
Stops developers from creating roles that escape their own permissions.
How to check:aws sso-admin get-permissions-boundary-for-permission-set --instance-arn <arn> ... - 0505MFA required at every sign-in
A phished or reused password alone never reaches the AWS access portal.
How to check:Console: IAM Identity Center > Settings > Authentication - 0606FIDO2 security keys or passkeys for administrators
Origin-bound credentials defeat real-time phishing proxies that relay TOTP codes.
How to check:Console: IAM Identity Center > Users > <user> > MFA devices - 0707No IAM user access keys on workstations
CLI credentials come from SSO sessions and expire on their own.
How to check:grep -c aws_access_key_id ~/.aws/credentials - 0808Workloads and CI/CD use roles or OIDC federation
Removes the long-lived keys most often leaked in repositories and CI variables.
How to check:aws iam list-open-id-connect-providers - 0909Break-glass access tested and monitored
Keeps a way in when the IdP fails, without leaving an unwatched door.
How to check:Console: EventBridge > Rules > break-glass-signin
Enable Identity Center and delegate administration
Identity Center is enabled once per organization, from the management account, in a single home Region. Choose that Region carefully: changing it later means deleting and recreating the instance, along with every assignment. CIS AWS Foundations Benchmark v7.1.0 recommendation 2.19 asks for centralized identity management in multi-account environments, and an organization instance of Identity Center is the native way to meet it.
- In the management account, open the IAM Identity Center console and choose Enable, then Enable with AWS Organizations.
- Choose the identity source: the built-in Identity Center directory, Active Directory, or an external SAML 2.0 identity provider such as Microsoft Entra ID or Okta. With an external IdP, enable SCIM provisioning so users and groups stay in sync and leavers lose access when they are disabled upstream.
- Register a delegated administrator, typically your security or identity tooling account, so day to day administration does not happen in the management account:
aws organizations register-delegated-administrator \
--service-principal sso.amazonaws.com \
--account-id 222233334444
The delegated administrator can manage permission sets and assignments for every account except the management account. That is a feature: access to the management account should stay with a very small group, assigned from the management account itself.
Verify
aws organizations list-delegated-administrators \
--service-principal sso.amazonaws.com
aws sso-admin list-instances \
--query 'Instances[].{Arn:InstanceArn,Store:IdentityStoreId,Owner:OwnerAccountId}'
You should see exactly one organization instance owned by the management account. Account instances of Identity Center, created inside member accounts for a single application, are a separate identity silo; find out who created them and why.
Model access with permission sets and groups
A permission set is a template for an IAM role. When you assign it to a group for an account, Identity Center creates a role named AWSReservedSSO_<PermissionSetName>_<suffix> in that account and lets group members assume it.
Keep the catalog small and job based, for example ReadOnly, Developer, PlatformAdmin, SecurityAudit and BreakGlassAdmin. Create one from the CLI:
INSTANCE_ARN=$(aws sso-admin list-instances --query 'Instances[0].InstanceArn' --output text)
PS_ARN=$(aws sso-admin create-permission-set \
--instance-arn "$INSTANCE_ARN" \
--name SecurityAudit \
--description "Read-only security review" \
--session-duration PT4H \
--query 'PermissionSet.PermissionSetArn' --output text)
aws sso-admin attach-managed-policy-to-permission-set \
--instance-arn "$INSTANCE_ARN" \
--permission-set-arn "$PS_ARN" \
--managed-policy-arn arn:aws:iam::aws:policy/SecurityAudit
Assign it to a group, never to an individual user:
aws sso-admin create-account-assignment \
--instance-arn "$INSTANCE_ARN" \
--permission-set-arn "$PS_ARN" \
--target-type AWS_ACCOUNT \
--target-id 111122223333 \
--principal-type GROUP \
--principal-id <identity-store-group-id>
Guidelines that hold up in practice:
- Customer managed policies over inline. Reference a policy name that exists in each account, so the same permission set can use account specific ARNs. Deploy those policies with StackSets or your IaC pipeline.
- Group membership is the access review. Reviewing who is in
PlatformAdminis far easier than reading IAM policies in fifty accounts. If your IdP supports access reviews, run them on the groups that map to AWS. - Manage it as code. Permission sets and assignments drift fast when they are edited by hand. Keep them in Terraform or CloudFormation and review changes like any other privilege change.
Session duration
Each permission set has a session duration between 1 hour (the default) and 12 hours. It controls how long a console or CLI session in the target account lasts before the user must reauthenticate. Keep PT1H to PT4H for admin sets and allow longer sessions only for read-only access:
aws sso-admin update-permission-set \
--instance-arn "$INSTANCE_ARN" \
--permission-set-arn "$PS_ARN" \
--session-duration PT1H
aws sso-admin provision-permission-set \
--instance-arn "$INSTANCE_ARN" \
--permission-set-arn "$PS_ARN" \
--target-type ALL_PROVISIONED_ACCOUNTS
Changes only reach the accounts after the permission set is provisioned again, which the console does for you and the CLI does not.
Permissions boundaries on permission sets
Developer permission sets often include iam:CreateRole so teams can create roles for their own Lambda functions and containers. Without a boundary, that is a privilege escalation path: create a role with AdministratorAccess, pass it to a function, run code as admin. Attach a permissions boundary to the permission set so the role it creates is capped:
aws sso-admin put-permissions-boundary-to-permission-set \
--instance-arn "$INSTANCE_ARN" \
--permission-set-arn "$DEV_PS_ARN" \
--permissions-boundary '{"CustomerManagedPolicyReference":{"Name":"DeveloperBoundary","Path":"/"}}'
The policy named DeveloperBoundary must exist in every account the set is assigned to. The pattern for requiring that boundary on roles the developer creates is detailed on the IAM page.
Enforce across the organization
Protect the Identity Center configuration with an SCP so only the identity administrators can change it. SCPs do not apply to the management account, which is another reason to keep administration in the delegated account:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "OnlyIdentityAdminsChangeIdentityCenter",
"Effect": "Deny",
"Action": [
"sso:Create*",
"sso:Update*",
"sso:Delete*",
"sso:Put*",
"sso:Attach*",
"sso:Detach*",
"sso:ProvisionPermissionSet",
"identitystore:Create*",
"identitystore:Update*",
"identitystore:Delete*"
],
"Resource": "*",
"Condition": {
"ArnNotLike": {
"aws:PrincipalArn": "arn:aws:iam::*:role/aws-reserved/sso.amazonaws.com/*AWSReservedSSO_IdentityAdmin_*"
}
}
}
]
}
Adjust the role pattern to your admin permission set name, and test it in a sandbox OU first. The wildcard before AWSReservedSSO_ covers role paths with or without a Region segment.
Configure MFA in Identity Center
If you use the Identity Center directory, MFA is configured in Settings > Authentication > Multi-factor authentication. If you federate from an external IdP, MFA is enforced by that IdP and these settings do not apply; make sure the IdP's conditional access or sign-on policy requires MFA for the AWS application, with the same strength rules below.
Require MFA at every sign-in
Recommended settings:
- Prompt users for MFA: Every time they sign in (always-on). The alternative, context-aware, prompts only when the device, browser or location changes. Always-on is the safer default for cloud administrators.
- If a user does not yet have a registered MFA device: Require them to register an MFA device at sign in. Never choose to allow sign-in without MFA.
- Who can manage MFA devices: allow users to add and manage their own devices, so they can enroll a backup key without a support ticket.
Prefer FIDO2 security keys and passkeys
Under Users can authenticate with these MFA types, enable Security keys and built-in authenticators (FIDO2 and passkeys). Disable Authenticator apps once everyone has enrolled a FIDO credential, or keep it only for a transition period.
Each user can register up to two authenticator apps and six FIDO authenticators. Ask every administrator to enroll two security keys, or a platform passkey plus a security key, so a lost key is not an outage.
The reason to insist on FIDO is phishing. TOTP codes and push approvals can be relayed by an adversary in the middle proxy in real time. FIDO2 credentials are bound to the origin of the sign-in page, so a look-alike domain receives nothing usable. CISA describes FIDO and PKI based authenticators as the only widely available phishing-resistant MFA.
Verify
Sign-in events tell you which factor was actually used. Each successful sign-in ends with a UserAuthentication CloudTrail event whose CredentialType lists every verified factor, for example PASSWORD,WEBAUTHN. A PASSWORD,TOTP value for an administrator means the transition is not finished.
Short-lived credentials for the CLI and SDKs
With Identity Center, nobody needs an access key on their laptop. Configure a profile once:
aws configure sso
# SSO session name: corp
# SSO start URL: https://d-1234567890.awsapps.com/start
# SSO region: eu-west-1
# SSO registration scopes: sso:account:access
This writes an sso-session block and a profile to ~/.aws/config:
[sso-session corp]
sso_start_url = https://d-1234567890.awsapps.com/start
sso_region = eu-west-1
sso_registration_scopes = sso:account:access
[profile prod-audit]
sso_session = corp
sso_account_id = 111122223333
sso_role_name = SecurityAudit
region = eu-west-1
Daily use is aws sso login --sso-session corp followed by --profile prod-audit on commands. Credentials expire with the permission set session duration and the SSO session, and the CLI refreshes them automatically while the session is valid.
Recent CLI versions use the PKCE authorization flow by default; use aws sso login --use-device-code only on headless hosts. The device code flow is a known phishing vector: an attacker starts a login, sends the victim the verification link, and receives a token once the victim approves it, MFA included. Teach users to approve only device codes they generated themselves, seconds earlier.
Once profiles are in place, delete ~/.aws/credentials entries that hold aws_access_key_id values, then delete the matching keys in IAM.
Workloads and CI/CD
For workloads, the same principle applies with different tools:
- EC2, ECS, EKS and Lambda: instance profiles, task roles, EKS Pod Identity or IRSA, and execution roles. See the EC2, EKS and Lambda pages.
- CI/CD: OIDC federation. GitHub Actions, GitLab and others can assume an IAM role with
sts:AssumeRoleWithWebIdentity, scoped by thesubclaim to a repository and branch. A trust policy that checks onlyaudlets any repository on the platform assume the role, so always pinsub. - On-premises servers: IAM Roles Anywhere issues temporary credentials against an X.509 certificate from your PKI.
When a key truly cannot be avoided, the inventory, rotation and removal process is on the IAM page.
Keep a break-glass path
Centralized identity creates a single dependency. If the IdP is down, the SAML certificate expires or SCIM deprovisions the wrong group, you need a way in. Keep one or two IAM users in the management account, or the management account root user, as break-glass credentials:
- FIDO2 MFA on each, keys stored in a safe with dual control.
- No access keys.
- An EventBridge rule that pages the security team on any sign-in.
- A tested procedure, exercised at least once a year, including who may open the safe and how the use is reviewed afterwards.
Root user hardening and centralized root access for member accounts are covered on the Organizations page. Everything else goes through Identity Center.
Alert on every break-glass sign-in
{
"source": ["aws.signin"],
"detail-type": ["AWS Console Sign In via CloudTrail"],
"detail": {
"userIdentity": {
"type": ["Root", "IAMUser"]
}
}
}
The Region recorded for a console sign-in depends on the user type and endpoint: root sign-ins land in us-east-1, us-east-2 or us-west-2, and IAM user sign-ins in the Region of the sign-in endpoint, often us-east-1. Deploy the rule in those three Regions as well as in your home Region. If you keep no other IAM users, any IAMUser sign-in is suspicious by definition.
Logging and detection
Your CloudTrail organization trail records everything you need:
- Sign-in events:
CredentialChallenge,CredentialVerificationandUserAuthentication. Correlate a sequence withAuthWorkflowID, and watchCredentialTypefor administrators signing in withoutWEBAUTHN. - Configuration changes:
CreatePermissionSet,AttachManagedPolicyToPermissionSet,PutInlinePolicyToPermissionSet,DeletePermissionsBoundaryFromPermissionSetandCreateAccountAssignmentfromsso.amazonaws.com, plus group membership changes (CreateGroupMembership) fromidentitystore.amazonaws.com. An assignment of an admin set to a user rather than a group deserves a page. - Identity source changes: changes to the external IdP configuration and new or rotated SCIM tokens. These are rare and high impact, so alert on any
sso.amazonaws.comwrite event that does not come from your identity administrator role.
Amazon GuardDuty analyzes the resulting role sessions like any other: CredentialAccess:IAMUser/AnomalousBehavior, Persistence:IAMUser/AnomalousBehavior and UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS cover the main abuse patterns. In Security Hub CSPM, IAM.5 and IAM.22 should trend toward no IAM users at all once migration is done.
Common mistakes
- Context-aware MFA for administrators. Prompting only on new devices means a stolen session or a known browser never sees a second factor. Use always-on.
- TOTP as the end state. Authenticator apps are a transition step. Real-time phishing kits relay codes; only FIDO2 credentials resist them.
- Assigning permission sets to individual users. It works until someone changes teams. Assign to groups so the IdP lifecycle drives access.
- Administering from the management account. Every admin who works there is one mistake away from organization-wide impact, and SCPs do not constrain them. Use a delegated administrator.
- Twelve-hour admin sessions. Long sessions are convenient for attackers too. Keep privileged sets at one to four hours.
- OIDC trust without a
subcondition. Any repository on the CI platform can then assume the role. - An untested break-glass account. Credentials nobody has used in two years tend to fail during the outage they exist for. Test them, and alert on every use.
References
- What is IAM Identity Center?
- Delegated administration in IAM Identity Center
- Permission sets
- Set session duration for AWS accounts
- Prompt users for MFA in IAM Identity Center
- Available MFA types for IAM Identity Center
- Understanding IAM Identity Center sign-in events
- Configuring IAM Identity Center authentication with the AWS CLI
- CIS Amazon Web Services Benchmarks
- CISA: Implementing Phishing-Resistant MFA (fact sheet, PDF)
- Christophe Tafani-Dereeper: Phishing for AWS credentials via AWS SSO device code authentication
- MITRE ATT&CK T1098.001: Additional Cloud Credentials
- GitHub Docs: Configuring OpenID Connect in Amazon Web Services
Written by
Florian AmetteSecurity engineer writing practical, benchmark-aligned hardening baselines for AWS services, from the organization and identities to data, networks and workloads.