ExpressRoute should not use Authorization keys: Policy does not exists today
Nobody has claimed this yet.
- Dominant language
- Open Policy Agent
- Stars
- 1.7k
- Forks
- 1.2k
- Avg merge
- 2d 54m
- Merged PRs (30d)
- 3
Description
Details of the scenario you tried and the problem that is occurring
The ExpressRoute authorization keys are used for cross-subscription/tenant networking.
This should be controlled by a defined process owned by the network team and any attempt to create an authorization key without following the process should be denied or audited.
Suggested solution to the issue
Implement the suggest policy
Suggested policy
{
"properties": {
"displayName": "ExpressRoute should not use Authorization keys",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "This policy denies the creation of Authorization keys for the ExpressRoute. Authorization keys are used to enable cross-subscription/cross-tenant networking functionality to the ExpressRoute. This should be reviewed by the network security team. https://learn.microsoft.com/en-us/azure/expressroute/expressroute-howto-linkvnet-portal-resource-manager",
"metadata": {
"version": "1.0.0",
"category": "Network"
},
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Deny or Audit the use of authorization key for ExpressRoute"
},
"allowedValues": [
"Deny",
"Audit",
"Disabled"
],
"defaultValue": "Deny"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Network/expressRouteCircuits"
},
{
"count": {
"field": "Microsoft.Network/expressRouteCircuits/authorizations[*]"
},
"greaterOrEquals": 1
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
}
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/14856350-e609-4aa5-a34f-b2f59fc92173",
"name": "14856350-e609-4aa5-a34f-b2f59fc92173"
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides the complete suggested Azure Policy JSON, but names no repository file, test, or entry point. Start by locating the built-in policy definition layout in this repository and compare nearby Network policies. Done means the ExpressRoute authorization-key policy is added using the supplied rule and metadata.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, json
- Domain
- cloud, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100