This rule specifies that IAM users should not be assigned any inline or attached policies.
Rule | IAM user should not have any inline or attached policies |
Framework | NIST 800-171 Revision 2 |
Severity | ✔ Low |
Rule Description:
This rule is enforced to ensure that IAM (Identity and Access Management) users do not have any inline or attached policies that are not compliant with the requirements outlined in NIST 800-171 Revision 2. NIST 800-171 is a set of security standards developed by the National Institute of Standards and Technology (NIST) to protect sensitive government information.
Remediation Steps:
To remediate this rule and ensure compliance, the following steps should be undertaken:
Identify IAM Users with Inline or Attached Policies:
Review Policies of Identified Users:
Remove Non-compliant Policies:
Verify Compliance:
Troubleshooting Steps:
In case you encounter any issues during the remediation process, the following troubleshooting steps may help you resolve common problems:
Insufficient IAM User Permissions:
Invalid Policy Names:
Dependency Issues:
Incorrect CLI Command Syntax:
CLI Commands:
Here are the CLI commands that can be used for removing non-compliant policies:
To detach an attached user policy:
aws iam detach-user-policy --user-name <IAM user name> --policy-arn <policy ARN>
To detach an attached group policy:
aws iam detach-group-policy --group-name <IAM group name> --policy-arn <policy ARN>
To delete an inline user policy:
aws iam delete-user-policy --user-name <IAM user name> --policy-name <policy name>
To delete an inline group policy:
aws iam delete-group-policy --group-name <IAM group name> --policy-name <policy name>
Please note that you need to replace
<IAM user/group name>
and <policy ARN/name>
with the appropriate values for your environment.By following these steps and performing the necessary actions, you can ensure that IAM users do not have any inline or attached policies that violate NIST 800-171 Revision 2, thereby enhancing the security posture of your AWS resources.