Description
The principle of least privilege should be followed and only necessary privileges should be assigned instead of allowing full administrative access.
Rationaleβ
Custom roles in Azure with administrative access can obfuscate the permissions granted and introduce complexity and blind spots to the management of privileged identities. For less mature security programs without regular identity audits, the creation of Custom roles should be avoided entirely. For more mature security programs with regular identity audits, Custom Roles should be audited for use and assignment, used minimally, and the principle of least privilege should be observed when granting permissions.
Impactβ
Subscriptions will need to be handled by Administrators with permissions.
Auditβ
From Azure Portalβ
- From Azure Home select the Portal Menu.
- Select
Subscriptions
. - Select a subscription.
- Select
Access control (IAM)
. - Select
Roles
. - Click
Type
and selectCustom role
from the drop-down menu. - Select
View
next to a role. - Select
JSON
. - Check for
assignableScopes
set to the subscription, andactions
set to*
. - Repeat steps 7-9 for each custom role.
From Azure CLIβ
List custom roles:
az role definition list --custom-role-only True
Check for entries with assignableScope
of the subscription
, and an action of *
.
From PowerShellβ
Connect-AzAccount Get-AzRoleDefinition |Where-Object {($_.IsCustom -eq $true) -and ($_.Actions.contains('*'))}
Check the output for AssignableScopes
value set to the subscription.
From Azure Policyβ
If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure.
- Policy ID: a451c1ef-c6ca-483d-87ed-f49761e3ffb5 - Name:
Audit usage of custom RBAC roles
Default Valueβ
By default, no custom owner roles are created.
Referencesβ
- https://docs.microsoft.com/en-us/azure/billing/billing-add-change-azure-subscription-administrator
- https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users
- https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-3-manage-lifecycle-of-identities-and-entitlements
- https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy
- https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy
- https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-7-follow-just-enough-administration-least-privilege-principle