Azure / Azure/azure-cli

az keyvault create automatically assigns full-access policy for the signed in user

Open
#13,391 5 comments 0 reactions 1 assignee Claimed by @houk-ms View on GitHub
act-identity-squad customer-reported feature-request KeyVault
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Is your feature request related to a problem? Please describe.**
Last week I was reviewing some of the CI pipelines used in my company and somehow got surprised with outcome of `az keyvault create` command with default parameters. It turned out, that if you omit `--no-self-perms`, you automatically get an access policy, which assigns full access to keys, certificates, secrets and son on. It's a completely different approach as opposite to using ARM templates, where you have to explicitly pass policies, which should be created. It requires app teams to be aware of side effects of a command, what's rarely a case.

**Describe the solution you'd like**
I think `--no-self-perms` should be opt-in, not opt-out to avoid confusion. Giving a principal automatic access to KV, which is considered a hardened and secure storage, is a bad security practice.

**Describe alternatives you've considered**
The only alternative is reviewing pipelines so we can be sure nobody is creating a KV without `--no-self-perms`.

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.