This rule ensures that IAM policies do not contain statements with admin access.
Rule | IAM policy should not have statements with admin access |
Framework | CISA-cyber-essentials |
Severity | ✔ High |
Rule Description
IAM policies should not include statements with administrative access for the CISA Cyber Essentials framework. This rule ensures that users and roles are not granted excessive privileges that could potentially compromise the security and integrity of the CISA Cyber Essentials environment.
Troubleshooting Steps
No specific troubleshooting steps are required for this rule. However, if there are any issues related to users or roles lacking administrative access, they should be addressed on a case-by-case basis.
Necessary Code
No specific code is required for this rule. However, to enforce this policy, you can use the AWS Command Line Interface (CLI) or AWS Management Console to modify IAM policies.
Step-by-Step Guide for Remediation
To remediate this rule, follow these step-by-step instructions:
"Action": "*"
, "Resource": "*"
, "Effect": "Allow"
).It is important to strike a balance between security and usability when modifying IAM policies to avoid either over-permissioning or under-permissioning users and roles.
CLI Command Examples
Here are some sample CLI commands that can be used to modify IAM policies:
List IAM Policies: To list all IAM policies in your account, use the following command:
aws iam list-policies
Get Policy Versions: To retrieve all versions of a specific policy, use the following command:
aws iam list-policy-versions --policy-arn <policy-arn>
Update Policy: To update a policy by removing or modifying an existing statement, use the following command:
aws iam create-policy-version --policy-arn <policy-arn> --policy-document file://<policy-file.json> --set-as-default
Replace
<policy-arn>
with the ARN (Amazon Resource Name) of the policy and <policy-file.json>
with the JSON file containing the updated policy document.Keep in mind that these are just examples, and you should tailor the commands based on your specific use case and requirements.
By following these steps and using the appropriate CLI commands, you can ensure that IAM policies do not contain statements with admin access for the CISA Cyber Essentials framework, promoting a more secure and controlled environment.