Control: 1.21 Ensure that no custom subscription owner roles are created
Description
Subscription ownership should not include permission to create custom owner roles. The principle of least privilege should be followed and only necessary privileges should be assigned instead of allowing full administrative access.
Classic subscription admin roles offer basic access management and include Account Administrator
, Service Administrator
, and Co-Administrators
. It is recommended the least necessary permissions be given initially. Permissions can be added as needed by the account holder. This ensures the account holder cannot perform actions which were not intended.
Remediation
From Command Line
- Execute to get the list of role definitions to check for entries with assignableScope of / or a subscription, and an action of * Verify the usage and impact of removing the role identified
az role definition list
- Review output for each returned role's 'AssignableScopes' value for '/' or the current subscription, and 'Actions' containing the '*' wildcard character. Based on the findings delete the role.
az role definition delete --name "rolename"
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.cis_v130_1_21
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.cis_v130_1_21 --share
SQL
This control uses a named query:
iam_no_custom_subscription_owner_roles_created