Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Storage Account doesn't clear sasPolicy via PUT #31949

Open
magodo opened this issue Dec 23, 2024 · 0 comments
Open

[BUG] Storage Account doesn't clear sasPolicy via PUT #31949

magodo opened this issue Dec 23, 2024 · 0 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.

Comments

@magodo
Copy link
Contributor

magodo commented Dec 23, 2024

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:

    "sasPolicy": {
      "expirationAction": "Log",
      "sasExpirationPeriod": "1.15:5:05"
    },

Then I want to use PUT to update the storage account by leaving sasPolicy absent:

{
  "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

@magodo magodo added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.
Projects
None yet
Development

No branches or pull requests

1 participant