Azure / Azure/azure-rest-api-specs
[keyvault] bypass is set to AzureServices but returns None when creating a soft deleted key vault
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
The value of `bypass` is set to `AzureServices` but returns `None` when creating a soft deleted key vault by [create API ](https://github.com/Azure/azure-rest-api-specs/blob/132c5d1c4e97ce56601d6f50143d52e653e35bff/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/keyvault.json#L18).
Repro Steps:
1. Create a keyvault with the following request body by create api:
```
{
"location":"germanywestcentral",
"properties":{
"accessPolicies":[
{
"tenantId":"xxx",
"objectId":"xxx",
"permissions":{
"keys":[
],
"secrets":[
"Delete",
"Get",
"List",
"Set"
],
"certificates":[
"Get",
"Update",
"Import",
"Delete",
"Purge"
],
"storage":[
]
}
}
],
"createMode":"recover",
"enableRbacAuthorization":false,
"enableSoftDelete":true,
"enabledForDeployment":false,
"enabledForDiskEncryption":false,
"enabledForTemplateDeployment":false,
"networkAcls":{
"bypass":"AzureServices",
"defaultAction":"Deny",
"ipRules":[
],
"virtualNetworkRules":[
]
},
"sku":{
"family":"A",
"name":"standard"
},
"softDeleteRetentionInDays":7,
"tenantId":"xxx"
},
"tags":{
}
}
```
2. Navigate to the key vault created in step1 in the portal, select Networking and set "Allow trusted Microsoft services to bypass this firewall" to "No".
3. Recreate key vault with the same request body in step1 by create api.
**Actual**: `bypass` value returned in the response body is `None`.
```
response body:
...
"networkAcls": {
"bypass": "None",
"defaultAction": "Deny",
"ipRules": [],
"virtualNetworkRules": []
},
...
```
**Expected**: `bypass` value returned in the response body is `AzureServices`.
Contributor guide
Research direction
Start with specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/keyvault.json, linked from the issue, and inspect the create API definition and networkAcls.bypass field. Compare the documented behavior with the create-and-recover repro; done means the specification or ownership path clearly accounts for the expected AzureServices value, with any required validation documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100