Azure / Azure/azure-cli

`az keyvault update --default-action Deny` specifies bypasses AzureServices by default.

Open
#26,200 5 comments 0 reactions 1 assignee Claimed by @evelyn-ys View on GitHub
act-identity-squad Auto-Assign customer-reported KeyVault Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

## Describe the bug

**Command Name**
`az keyvault update`

**Errors:**
Executing the following command: `az keyvault update --debug --resource-group {} --name {} --default-action Deny`
Also specifies `bypass=AzureServices` by default. It sends a request body with:
```
"networkAcls": {"bypass": "AzureServices", "defaultAction": "Deny"},
```
## To Reproduce:

- Create a keyvault with public access
- Run `az keyvault update --debug --resource-group {} --name {} --default-action Deny` to deny public access
- In the portal, the key vault's network tab has the "Allow public access from specific virtual networks and IP addresses" and the "Allow trusted Microsoft services to bypass this firewall" is checked.

## Expected Behavior

The `bypass` value should be none. [az keyvault update](https://learn.microsoft.com/en-us/cli/azure/keyvault?view=azure-cli-latest#az-keyvault-update-hsm-optional-parameters)

## Environment Summary
```
Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.31, Ubuntu 20.04.5 LTS
Python 3.10.10
Installer: DEB

azure-cli 2.47.0

Extensions:
ssh 1.1.5

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0
```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.