AWS IAM Identity Center - AWS Verified Access

AWS IAM Identity Center

When a policy is evaluated, if you define AWS IAM Identity Center as a trust provider, AWS Verified Access includes the trust data in the Cedar context under the key you specify as “Policy Reference Name” on the trust provider configuration. You can write a policy that evaluates against the trust data if you choose.

Note

The context key for your trust provider comes from the policy reference name that you configure when you create the trust provider. For example, if you configure the policy reference name as "idp123", the context key will be "context.idp123". Check that you are using the correct context key when you create the policy.

The following JSON schema shows which data is included in the evaluation.

{ "title": "AWS IAM Identity Center context specification", "type": "object", "properties": { "user": { "type": "object", "properties": { "user_id": { "type": "string", "description": "a unique user id generated by AWS IdC" }, "user_name": { "type": "string", "description": "username provided in the directory" }, "email": { "type": "object", "properties": { "address": { "type": "email", "description": "email address associated with the user" }, "verified": { "type": "boolean", "description": "whether the email address has been verified by AWS IdC" } } } } }, "groups": { "type": "object", "description": "A list of groups the user is a member of", "patternProperties": { "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$": { "type": "object", "description": "The Group ID of the group", "properties": { "group_name": { "type": "string", "description": "The customer-provided name of the group" } } } } } } }

The following is an example of a policy that evaluates against the trust data provided by AWS IAM Identity Center.

permit(principal, action, resource) when { context.idc.user.email.verified == true // User is in the "sales" group with specific ID && context.idc.groups has "c242c5b0-6081-1845-6fa8-6e0d9513c107" };
Note

As group names can be changed, IAM Identity Center refers to groups using their group ID. This helps avoid breaking a policy statement when changing the name of a group.