azure-mhsm-can-sign

explicit azure emits CanSignAs

match (effective permission)

{ "action": "Microsoft.KeyVault/managedHsm/keys/sign/action", "resource_type": "Microsoft.KeyVault/managedHSMs/keys" }

where

effective grant is a Managed HSM LOCAL role dataAction carrying keys/sign/action (Crypto User only — Crypto Officer does NOT hold any crypto data action), NOT Azure RBAC key.keyOps includes 'sign'

emit

source typeIdentity
target typeSigningKey
source<principal>
target<key node (SigningKey)>
permissionsMicrosoft.KeyVault/managedHsm/keys/sign/action

Narrative

{principal.name} can sign with {key.name} (Managed HSM local Crypto role).

Raw rule rules/explicit/azure-managedhsm.yaml

id: azure-mhsm-can-sign
emits: CanSignAs
applies_to:
- azure
match_effective_permission:
  action: Microsoft.KeyVault/managedHsm/keys/sign/action
  resource_type: Microsoft.KeyVault/managedHSMs/keys
where:
- "effective grant is a Managed HSM LOCAL role dataAction carrying keys/sign/action (Crypto User only\
  \ \u2014 Crypto Officer does NOT hold any crypto data action), NOT Azure RBAC"
- key.keyOps includes 'sign'
emit:
  source_type: Identity
  target_type: SigningKey
  source: <principal>
  target: <key node (SigningKey)>
  api_source: GET {hsm}/RoleAssignments + roleDefinition dataActions
  permissions:
  - Microsoft.KeyVault/managedHsm/keys/sign/action
  narrative: '{principal.name} can sign with {key.name} (Managed HSM local Crypto role).'
move · open · esc close