Key Vault keys and secrets are current not available for enforcement. Built-in policies will be available in the next month or so. Custom policies don't have an ETA at the moment.
Not able to enforce azure policy for for keyvault
nimishmehta8779
1
Reputation point
I am trying to implement azure custom policy for key vault where I want to enforce user to enable nbf and exp, without that it shouldn't be allowed. It directly comes as compliance without showing any resource validation. There is also no reference of activity logs and event in azure policy and Keyvault.
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.KeyVault/vaults"
},
{
"anyOf": [
{
"field": "Microsoft.KeyVault/vaults/secrets/attributes.enabled",
"notEquals": "true"
},
{
"field": "Microsoft.KeyVault/vaults/secrets/attributes.nbf",
"equals": "null"
},
{
"field": "Microsoft.KeyVault/vaults/secrets/attributes.exp",
"equals": "null"
},
]
}
]
},
"then": {
"effect": "Deny"
}
1 answer
Sort by: Most helpful
-
Kenieva-MSFT 161 Reputation points Microsoft Employee
2020-09-17T16:55:50.263+00:00