Single sign-on access to AWS accounts - AWS IAM Identity Center

Single sign-on access to AWS accounts

You can assign users in your connected directory permissions to the management account or member accounts in your organization in AWS Organizations based on common job functions. Or you can use custom permissions to meet your specific security requirements. For example, you can grant database administrators broad permissions to Amazon RDS in development accounts but limit their permissions in production accounts. IAM Identity Center configures all the necessary user permissions in your AWS accounts automatically.

Note

You might need to grant users or groups permissions to operate in the AWS Organizations management account. Because it is a highly privileged account, additional security restrictions require you to have the IAMFullAccess policy or equivalent permissions before you can set this up. These additional security restrictions are not required for any of the member accounts in your AWS organization.

Assign user access to AWS accounts

Use the following procedure to assign single sign-on access to users and groups in your connected directory and use permission sets to determine their level of access.

To check existing user and group access, see View user and group assignments.

Note

To simplify administration of access permissions, we recommended that you assign access directly to groups rather than to individual users. With groups you can grant or deny permissions to groups of users rather than having to apply those permissions to each individual. If a user moves to a different organization, you simply move that user to a different group and they automatically receive the permissions that are needed for the new organization.

To assign user or group access to AWS accounts
  1. Open the IAM Identity Center console.

    Note

    Make sure that the IAM Identity Center console is using the Region where your AWS Managed Microsoft AD directory is located before you move to the next step.

  2. In the navigation pane, under Multi-account permissions, choose AWS accounts.

  3. On the AWS accounts page, a tree view list of your organization appears. Select the check box next to one or more AWS accounts to which you want to assign single sign-on access.

    Note

    You can select up to 10 AWS accounts at a time per permission set when you assign single sign-on access to users and groups. To assign more than 10 AWS accounts to the same set of users and groups, repeat this procedure as required for the additional accounts. When prompted, select the same users, groups, and permission set.

  4. Choose Assign users or groups.

  5. For Step 1: Select users and groups, on the Assign users and groups to "AWS-account-name" page, do the following:

    1. On the Users tab, select one or more users to whom to grant single sign-on access.

      To filter the results, start typing the name of the user that you want in the search box.

    2. On the Groups tab, select one or more groups to which to grant single sign-on access.

      To filter the results, start typing the name of the group that you want in the search box.

    3. To display the users and groups that you selected, choose the sideways triangle next to Selected users and groups.

    4. After you confirm that the correct users and groups are selected, choose Next.

  6. For Step 2: Select permission sets, on the Assign permission sets to "AWS-account-name" page, do the following:

    1. Select one or more permission sets. If required, you can create and select new permission sets.

      • To select one or more existing permission sets, under Permission sets, select the permission sets that you want to apply to the users and groups that you selected in the previous step.

      • To create one or more new permission sets, choose Create permission set, and follow the steps in Create a permission set. After you create the permission sets that you want to apply, in the IAM Identity Center console, return to AWS accounts and follow the instructions until you reach Step 2: Select permission sets. When you reach this step, select the new permission sets that you created, and proceed to the next step in this procedure.

    2. After you confirm that the correct permission sets are selected, choose Next.

  7. For Step 3: Review and Submit, on the Review and submit assignments to "AWS-account-name" page, do the following:

    1. Review the selected users, groups, and permission sets.

    2. After you confirm that the correct users, groups, and permission sets are selected, choose Submit.

      Important

      The user and group assignment process might take a few minutes to complete. Leave this page open until the process successfully completes.

      Note

      You might need to grant users or groups permissions to operate in the AWS Organizations management account. Because it is a highly privileged account, additional security restrictions require you to have the IAMFullAccess policy or equivalent permissions before you can set this up. These additional security restrictions are not required for any of the member accounts in your AWS organization.

Remove user and group access

Use this procedure to remove single sign-on access to an AWS account for one or more users and groups in your connected directory.

To remove user and group access to an AWS account
  1. Open the IAM Identity Center console.

  2. In the navigation pane, under Multi-account permissions, choose AWS accounts.

  3. On the AWS accounts page, a tree view list of your organization appears. Select the name of the AWS account that contains the users and groups for whom you want to remove single sign-on access.

  4. On the Overview page for the AWS account, under Assigned users and groups, select the name of one or more users or groups, and choose Remove access.

  5. In the Remove access dialog box, confirm that the names of the users or groups are correct, and choose Remove access.

Revoke active IAM role sessions created by permission sets

The following is a general procedure for revoking an active permission set session for an IAM Identity Center user. The procedure assumes that you want to remove all access for a user who has compromised credentials or for a bad actor who is in the system. The prerequisite is to have followed the guidance in Prepare to revoke an active IAM role session created by a permission set. We assume that the deny all policy is present in a service control policy (SCP).

Note

AWS recommends you build automation to handle all steps except console-only operations.

  1. Obtain the user ID of the person whose access you must revoke. You can use the identity store APIs to find the user by their username.

  2. Update the Deny policy to add the user ID from step 1 in your service control policy (SCP). After completing this step, the target user loses access and is unable to take actions with any roles that the policy affects.

  3. Remove all permission set assignments for the user. If access is assigned through group memberships, remove the user from all groups and all direct permission set assignments. This step prevents the user from assuming any additional IAM roles. If a user has an active AWS access portal session and you disable the user, they can continue to assume new roles until you remove their access.

  4. If you use an identity provider (IdP) or Microsoft Active Directory as an identity source, disable the user in the identity source. Disabling the user prevents the creation of additional AWS access portal sessions. Use your IdP or Microsoft Active Directory API documentation to learn how to automate this step. If you're using the IAM Identity Center directory as an identity source, don't disable user access yet. You'll disable user access in step 6.

  5. In the IAM Identity Center console, find the user and delete their active session.

    1. Choose Users.

    2. Choose the user whose active session you want to delete.

    3. On the user's detail page, choose the Active sessions tab.

    4. Select the check boxes next to the sessions you want to delete and choose Delete session.

    This ensures the user’s AWS access portal session stops within approximately 60 minutes. Learn about session duration.

  6. In the IAM Identity Center console, disable user access.

    1. Choose Users.

    2. Choose the user whose access you want to disable.

    3. On the user's detail page, expand General information and choose the Disable user access button to prevent further logins of the user.

  7. Leave the Deny policy in place for at least 12 hours. Otherwise, the user with an active IAM role session will have restored actions with the IAM role. If you wait 12 hours, active sessions expire and the user won't be able to access the IAM role again.

Important

If you disable a user’s access before stopping the user session (you completed step 6 without completing step 5), you can no longer stop the user session through the IAM Identity Center console. If you inadvertently disable user access before stopping the user session, you can re-enable the user, stop their session, and then disable the their access again.

You can now change the user's credentials if their password was compromised and restore their assignments.

Delegate who can assign single sign-on access to users and groups in the management account

Assigning single sign-on access to the management account using the IAM Identity Center console is a privileged action. By default, only an AWS account root user or a user who has the AWSSSOMasterAccountAdministrator and IAMFullAccess AWS managed policies attached, can assign single sign-on access to the management account. The AWSSSOMasterAccountAdministrator and IAMFullAccess policies manage single sign-on access to the management account within an AWS Organizations organization.

Use the following steps to delegate permissions to manage single sign-on access to users and groups in your directory.

To grant permissions to manage single sign-on access to users and groups in your directory
  1. Sign in to the IAM Identity Center console as a root user of the management account or with another user who has administrator permissions to the management account.

  2. Follow the steps in Create a permission set to create a permission set, and then do the following:

    1. On the Create new permission set page, select the Create a custom permission set check box, and then choose Next: Details.

    2. On the Create new permission set page, specify a name for the custom permission set and optionally, a description. If required, modify the session duration and specify a relay state URL.

      Note

      For the relay state URL, you must specify a URL that is in the AWS Management Console. For example:

      https://console.aws.amazon.com/ec2/

      For more information, see Set relay state.

    3. Under What policies do you want to include in your permission set?, select the Attach AWS managed policies check box.

    4. In the list of IAM policies, choose both the AWSSSOMasterAccountAdministrator and IAMFullAccess AWS managed policies. These policies grant permissions to any user and groups who are assigned access to this permission set in the future.

    5. Choose Next: Tags.

    6. Under Add tags (optional), specify values for Key and Value (optional), and then choose Next: Review. For more information about tags, see Tagging AWS IAM Identity Center resources.

    7. Review the selections you made, and then choose Create.

  3. Follow the steps in Assign user access to AWS accounts to assign the appropriate users and groups to the permission set that you just created.

  4. Communicate the following to the assigned users: When they sign in to the AWS access portal and choose the Accounts tab, they must choose the appropriate role name to be authenticated with the permissions that you just delegated.