Skip to main content

lacework-global-512

1.23 Ensure That No Custom Subscription Administrator Roles Exist (Automated)

Profile Applicability

• Level 1

Description

Follow the principle of least privilege. Assign only necessary privileges instead of allowing full administrative access.

Rationale

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.

Impact

Subscriptions will need to be handled by Administrators with permissions.

Audit

From Azure Portal

  1. From Azure Home select Subscriptions under Navigate
  2. From Azure Home select the Portal Menu
  3. Select in the left column Access control (IAM)
  4. In the row select of filters Role:, then the # Displayed
  5. In the list of checkmarks deselect Show all to display no roles.
  6. Search for Owner or select it if it already displayed to show only users with the Owner role
  7. Audit this list for accounts with the Owner Role.

From Azure CLI

az role definition list

Check for entries with assignableScope of / or a subscription, and an action of *

Verify the usage and impact of removing the role identified

From Azure PowerShell

Connect-AzAccount
Get-AzRoleDefinition |Where-Object {($_.IsCustom -eq $true) -and ($_.Name -like "Owner")}

Review output for each returned role's 'AssignableScopes' value for '/' or the current subscription, and 'Actions' containing the '*' wildcard character.

Remediation

From Azure Portal

  1. From Azure Home select the Portal Menu.
  2. Select Subscriptions.
  3. Select Access control (Identity and Access Management (IAM)).
  4. Select Roles.
  5. Click Type and select CustomRole from the drop down menu.
  6. Check the box next to each role which grants subscription administrator privileges.
  7. Select Remove.
  8. Select Yes.

From Azure CLI

List custom roles:

az role definition list --custom-role-only

Check for entries with assignableScope of / or the subscription, and an action of *.

To remove a violating role:

az role definition delete --name <role name>

Note that you must remove any role assignments before deleting a custom role.

Assess impact before deleting a custom role granting subscription administrator privileges.

References

https://docs.microsoft.com/en-us/azure/billing/billing-add-change-azure-subscription-administrator
https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-governance-strategy#gs-2-define-enterprise-segmentation-strategy
https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-governance-strategy#gs-6-define-identity-and-privileged-access-strategy
https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-privileged-access#pa-1-protect-and-limit-highly-privileged-users
https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-privileged-access#pa-5-automate-entitlement-management
https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-privileged-access#pa-2-restrict-administrative-access-to-business-critical-systems
https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-governance-strategy#gs-2-define-enterprise-segmentation-strategy
https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-governance-strategy#gs-6-define-identity-and-privileged-access-strategy
https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-privileged-access#pa-7-follow-just-enough-administration-least-privilege-principle