This rule ensures that IAM users do not have any inline or attached policies assigned to them.
Rule | IAM user should not have any inline or attached policies |
Framework | NIST 800-53 Revision 5 |
Severity | ✔ Low |
Rule Description
This rule ensures that IAM users do not have any inline or attached policies that violate the guidelines set in NIST 800-53 Revision 5. These guidelines are designed to provide security controls and best practices for federal information systems and organizations.
Troubleshooting Steps
Necessary Codes
There are no specific codes associated with this rule. However, you may need to use AWS CLI commands to review and modify IAM policies if violations are found.
Remediation Steps
Identify IAM users with inline or attached policies violating NIST 800-53 Revision 5.
Run the following AWS CLI command to list all IAM users:
aws iam list-users
Note down the usernames for reference in the next step.
Review policies associated with each user.
Run the following AWS CLI command for each IAM user to get a list of attached policies:
aws iam list-attached-user-policies --user-name <username>
If any inline policies exist, use the following AWS CLI command to get a list of inline policies for the user:
aws iam list-user-policies --user-name <username>
Review the policies returned for each user and compare them against the guidelines in NIST 800-53 Revision 5.
Remove or modify policies violating NIST 800-53 Revision 5.
To remove an attached policy from an IAM user, use the following AWS CLI command:
aws iam detach-user-policy --user-name <username> --policy-arn <policy-arn>
To delete an inline policy from an IAM user, use the following AWS CLI command:
aws iam delete-user-policy --user-name <username> --policy-name <policy-name>
Repeat the above steps for each IAM user until all inline or attached policies violating NIST 800-53 Revision 5 have been addressed.
Note: It is recommended to keep regular audits and monitoring in place to ensure ongoing compliance with the NIST 800-53 Revision 5 guidelines.