az keyvault create automatically assigns full-access policy for the signed in user
- 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
Assessment
This issue has not been assessed yet.