hashicorp / hashicorp/vault-helm

Improved admissions controll

Open Beginner friendly
#941 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Shell
Stars
1.3k
Forks
898
Avg merge
3d 1h
Merged PRs (30d)
1

Description

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
This is not a problem but an improvement for LEAST PRIVILAGED access. We believe that providing too much access for admissionregistration.k8s.io to ALL resources is bad practice.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

Restrict rules access for the injector-clusterrole in the following template file: charts/vault/templates/injector-clusterrole.yaml:

Original/current code:

rules:

- apiGroups: ["[admissionregistration.k8s.io](http://admissionregistration.k8s.io/)"]

resources: ["mutatingwebhookconfigurations"]

verbs:

- "get"

- "list"

- "watch"

- "patch"

NEW proposed code: (remove patch from all resources and specify it to only to the vault-agent-injector-cfg resource):

- apiGroups: ["[admissionregistration.k8s.io](http://admissionregistration.k8s.io/)"]

resources: ["mutatingwebhookconfigurations"]

verbs:

- "get"

- "list"

- "watch"

- apiGroups: ["[admissionregistration.k8s.io](http://admissionregistration.k8s.io/)"]

resources: ["mutatingwebhookconfigurations"]

resourceNames:

- vault-agent-injector-cfg

verbs:

- "patch"

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

Research direction

Start with charts/vault/templates/injector-clusterrole.yaml and inspect the injector-clusterrole rules for admissionregistration.k8s.io. Restrict patch access to the vault-agent-injector-cfg resource while retaining the listed read verbs for mutatingwebhookconfigurations; done means the rendered rule matches the proposed access scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes, yaml
Domain
devops, security
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.