Azure / Azure/azure-rest-api-specs

[BUG] "web@2023-12-01" `KeyvaultReferneceIdentity` can not be reset

Open
#37,553 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/ba6bab2e42a47a66de7df007a6811b19064f7344/specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/WebApps.json#L29287C14-L29287C39

### API Spec version

2023-12-01

### Describe the bug

The `KeyvaultReferneceIdentity` only accepts "SystemAssigned"` or id of user assigned identity id.

However it's an optional propery, which will not be included in payload in most REST client. So there is no way to compose a `null` in payload.

Also, even if we compose the payload with `null`, it's still cannot be reset. For Webapp w/o identities, the behavior is a bit confusing.

At the same time, if the `identity` is set to `systemassigned`, the `KeyvaultReferneceIdentity` will be set to `SystemAssigned` automatically on service side. But when the `identity` is changed to others (userAssigned or none), the value will not be reset automatically.

### Expected behavior

The value of `KeyvaultReferneceIdentity` shall be reset to none if the `identity` is not `SystemAssigned`.
Also there shall be a way to clear this property.

### Actual behavior

1. the value is kept after `identity` changed.
2. there is no proper way to clear the value of this property.

### Reproduction Steps

n/a

### Environment

public cloud

Contributor guide

Open the contributing guide

Research direction

Read the linked WebApps.json definition around line 29287 for API version 2023-12-01 and inspect how KeyvaultReferneceIdentity is modeled. Determine how the API should represent clearing the property and how it should behave when identity is changed from SystemAssigned; done means the value can be reset or cleared consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api, backend-api-design, cloud
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.