Explains the requirement for IAM users to be part of at least one group.
Rule | IAM users should be in at least one group |
Framework | NIST 800-171 Revision 2 |
Severity | ✔ High |
Rule Description:
According to the NIST 800-171 Revision 2 standard, IAM (Identity and Access Management) users should be assigned to at least one group. A group provides a convenient way to manage and assign permissions to multiple IAM users simultaneously, simplifying the management of user access across an organization's resources and services.
Policy Details:
To adhere to the NIST 800-171 Revision 2 standard, implement the following policy:
Troubleshooting Steps:
If an IAM user is not part of any group, the following troubleshooting steps can be taken:
Necessary Codes:
To enforce this policy, the following code snippets can be utilized:
aws iam list-users --query "Users[?not_null(Groups)][].{Username:UserName, Groups:Groups}"
This command will list all IAM users along with their groups. Users without any group will not be displayed.
aws iam add-user-to-group --user-name <user-name> --group-name <group-name>
Replace
<user-name>
with the username of the user and <group-name>
with the name of the target group.Remediation Steps:
To remediate the issue and ensure compliance with the policy:
By following these steps, all IAM users will be assigned to at least one group, aligning with the requirements of the NIST 800-171 Revision 2 standard.