Azure / Azure/azure-rest-api-specs
[BUG] Storage Account doesn't clear `sasPolicy` via PUT
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 6k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json
### API Spec version
2023-01-01
### Describe the bug
I have a storage account created with `sasPolicy` defined:
```json
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:5:05"
},
```
Then I want to use `PUT` to update the storage account by leaving `sasPolicy` absent:
```json
{
"identity": {
"type": "None",
"userAssignedIdentities": null
},
"kind": "StorageV2",
"location": "westus2",
"properties": {
"accessTier": "Hot",
"allowBlobPublicAccess": true,
"allowCrossTenantReplication": false,
"allowSharedKeyAccess": true,
"defaultToOAuthAuthentication": false,
"dnsEndpointType": "Standard",
"encryption": {
"keySource": "Microsoft.Storage",
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2024-12-23T01:03:34.7455723Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2024-12-23T01:03:34.7455723Z"
}
}
},
"isHnsEnabled": false,
"isLocalUserEnabled": true,
"isNfsV3Enabled": false,
"isSftpEnabled": false,
"minimumTlsVersion": "TLS1_2",
"networkAcls": {
"bypass": "AzureServices",
"defaultAction": "Allow",
"ipRules": [],
"resourceAccessRules": [],
"virtualNetworkRules": []
},
"publicNetworkAccess": "Enabled",
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"tags": {}
}
```
(correlation request id: bf194019-4316-4982-a915-0b668273c8e3)
Whilst the response of the above request still returns the `sasPolicy` un-changed.
### Expected behavior
The `PUT` with no `sasPolicy` shall remove the `sasPolicy` from the model per the definition of `PUT`.
### Actual behavior
`sasPolicy` is stil there.
### Reproduction Steps
As is mentioned above.
### Environment
_No response_
Contributor guide
Research direction
Start with specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json, reviewing the sasPolicy definition and the storage-account PUT request and response schemas. Determine whether the specification defines omission as removal; done means the spec-backed behavior is clarified or the service issue is confirmed for maintainers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100