aws / aws/amazon-eks-pod-identity-webhook
Support annotations for limiting expose of the web identity token file to particular containers
- Dominant language
- Go
- Stars
- 691
- Forks
- 202
- Avg merge
- 4h 38m
- Merged PRs (30d)
- 1
Description
**What would you like to be added**:
Annotations (say `eks.amazonaws.com/include-containers`, `eks.amazonaws.com/exclude-containers`,`eks.amazonaws.com/include-init-containers`, `eks.amazonaws.com/exclude-init-containers`) to whitelist/blacklist containers/init containers from having access to the injected projected ServiceAccount token
**Why is this needed**:
Currently injection gives permissions to all containers within a Pod even though in a lot of cases only a single container would need permissions. Currently the only way to skip injection is to create env vars/volume mounts of the same name https://github.com/aws/amazon-eks-pod-identity-webhook/blob/e77f0898a277d407cb95124f17f2ed7eba6cc9bf/pkg/handler/handler.go#L110-L122
Contributor guide
Research direction
Start in pkg/handler/handler.go around the existing environment-variable and volume-mount checks at lines 110-122. Trace how projected ServiceAccount token injection is applied to containers and init containers, then verify that the requested include and exclude annotations limit access only to the selected containers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go, kubernetes
- Domain
- authentication, backend-api-design, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100