Identity and Access Management · Topic 1 of 6
Workforce Identity and Federation
Choose between IAM Identity Center, SAML and OIDC federation, directory services and IAM users to give people and workloads temporary access to AWS.
- 5 min
- IAM Identity Center is the preferred workforce access method for multiple accounts, using permission sets assigned to users or groups.
- With an external IdP, SAML provides sign in and SCIM provisions users and groups.
- IAM SAML federation uses
AssumeRoleWithSAML. OIDC federation usesAssumeRoleWithWebIdentity.
What it is
Authentication proves who a caller is. For people who work with AWS, the modern pattern is to keep identities in one external or central directory and give them temporary access to accounts, instead of creating long lived IAM users in every account.
This page covers the options for workforce access: IAM Identity Center, direct federation with SAML (Security Assertion Markup Language) and OIDC (OpenID Connect), and directory services.
How it works
IAM Identity Center
AWS IAM Identity Center is the recommended way to give a workforce access to multiple AWS accounts and business applications. You connect an identity source, create permission sets, and assign users or groups to accounts with those permission sets.
- Identity source. The built in Identity Center directory, Microsoft Active Directory (through AWS Managed Microsoft AD or AD Connector), or an external identity provider (IdP) using SAML.
- Provisioning. With an external IdP, SCIM (System for Cross domain Identity Management) automatically syncs users and groups.
- Permission sets. Templates of policies. When assigned, Identity Center creates a role in each target account and users assume it for a session.
- Access. Users sign in to an access portal, then get short lived credentials for the console or the CLI.
- Management. Enable it at the organization level and delegate administration to a member account, so the management account is not used for daily work.
# AWS CLI v2: sign in with an Identity Center profile and use it
aws configure sso
aws sso login --profile dev-account
aws s3 ls --profile dev-account
Identity Center supports attributes for access control, which pass user attributes as session tags so that policies can use attribute based access control (ABAC). It also supports requiring multi factor authentication (MFA) for sign in.
IAM federation with an identity provider
You can federate directly with an IAM identity provider instead of using Identity Center. This suits a single account or a legacy design.
| Protocol | IAM resource | API call |
|---|---|---|
| SAML 2.0 | SAML identity provider | AssumeRoleWithSAML |
| OIDC | OIDC identity provider | AssumeRoleWithWebIdentity |
The role trust policy names the provider and conditions, and the user receives temporary credentials from the AWS Security Token Service (STS). OIDC federation is also how external workloads, such as a CI/CD pipeline from an external service or a Kubernetes service account, obtain AWS roles without storing access keys.
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": { "Federated": "arn:aws:iam::111122223333:oidc-provider/token.actions.githubusercontent.com" },
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": { "token.actions.githubusercontent.com:aud": "sts.amazonaws.com" },
"StringLike": { "token.actions.githubusercontent.com:sub": "repo:example-org/example-repo:*" }
}
}]
}
The sub condition is what limits the role to one repository. Without it, any workflow from that identity provider could assume the role.
Directory services
| Option | What it is | Choose it when |
|---|---|---|
| AWS Managed Microsoft AD | A managed Active Directory in AWS | You need a real directory, trusts to on premises AD and AD aware workloads |
| AD Connector | A proxy that redirects requests to on premises AD | You want to use existing AD without storing data in AWS |
| Simple AD | A basic Samba based directory | Small, simple needs, with fewer AD features |
IAM users
IAM users have long term credentials, which are a standing risk. Use them only where a role or federation is not possible, such as some third party tools. When you must use them, enforce a strong password policy, require MFA, rotate access keys, and review them with the IAM credential report.
Choosing
| Requirement | Choose |
|---|---|
| Workforce access to many accounts with central assignment | IAM Identity Center |
| Existing corporate IdP and single sign on | Identity Center with SAML and SCIM |
| Single account console sign in from an IdP | IAM SAML federation |
| CI/CD or Kubernetes workload without stored keys | OIDC federation or a role |
| Legacy AD aware applications in AWS | AWS Managed Microsoft AD |
| Customers sign in to your app | Amazon Cognito, covered on the next page |
Root user
The root user of each account has unrestricted access. Protect it with a strong password, MFA, no access keys, and use it only for the few tasks that require it. AWS Organizations can centrally manage root credentials for member accounts, which removes the need to keep a root password and MFA per account.
What to remember for the exam
- IAM Identity Center is the preferred workforce access method for multiple accounts, using permission sets assigned to users or groups.
- With an external IdP, SAML provides sign in and SCIM provisions users and groups.
- IAM SAML federation uses
AssumeRoleWithSAML. OIDC federation usesAssumeRoleWithWebIdentity. - Add a
subandaudcondition to OIDC role trust policies to limit which workloads can assume the role. - AWS Managed Microsoft AD is a full managed directory. AD Connector proxies to on premises AD. Simple AD is a basic directory.
- Avoid IAM users. If you need them, enforce MFA, rotate keys and review the credential report.
- Protect the root user with MFA and no access keys, and use centralised root access management in an organization.
- Federated users receive temporary credentials from STS, so there are no stored keys to leak.
"Workforce users need access to many accounts using their corporate credentials, managed centrally" means IAM Identity Center, not a SAML provider and role in every account.
Common mistakes
Creating IAM users for employees. This spreads long term credentials across accounts, where federation avoids it.
Leaving the sub condition out of an OIDC trust policy. Any workflow in the identity provider could then assume the role.
Confusing Identity Center with Cognito. Identity Center is for your workforce, and Cognito is for the customers of your application.
Using the root user day to day. It has full access in its account, so any misuse is very hard to contain.
A permission set assigned to many accounts affects every one of them, so review changes to a widely assigned set before applying them.
Check yourself
Which service provides one place to assign workforce users to many AWS accounts?
AWS IAM Identity Center, using permission sets assigned to users or groups.
How do you stop other repositories using your OIDC role for CI/CD?
Add a
subcondition to the role trust policy that matches only the intended repository.What is the difference between AD Connector and AWS Managed Microsoft AD?
AD Connector proxies requests to on premises AD, while Managed Microsoft AD is a full managed directory running in AWS.
Topic 1 of 6 in Identity and Access Management
Test yourself on Identity and Access Management
The full AWS SCS-C03 question bank has 858 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.