azure-cosmosdb-account-write-permission

explicit azure emits HasPermission

match (effective permission)

{ "action": "Microsoft.DocumentDB/databaseAccounts/write", "resource_type": "Microsoft.DocumentDB/databaseAccounts" }

emit

source typeIdentity
target typeNoSQLDatabase
source<principal>
target<databaseAccount node>
permissionsMicrosoft.DocumentDB/databaseAccounts/write

Narrative

{principal.name} has effective permission databaseAccounts/write on {account.name} (via role: {role.name}), allowing modification of account properties (firewall, CMK, disableLocalAuth).

Raw rule rules/explicit/azure-cosmosdb.yaml

id: azure-cosmosdb-account-write-permission
emits: HasPermission
applies_to:
- azure
match_effective_permission:
  action: Microsoft.DocumentDB/databaseAccounts/write
  resource_type: Microsoft.DocumentDB/databaseAccounts
emit:
  source_type: Identity
  target_type: NoSQLDatabase
  source: <principal>
  target: <databaseAccount node>
  permissions:
  - Microsoft.DocumentDB/databaseAccounts/write
  narrative: '{principal.name} has effective permission databaseAccounts/write on {account.name} (via
    role: {role.name}), allowing modification of account properties (firewall, CMK, disableLocalAuth).'
move · open · esc close