aws / aws/containers-roadmap

[EKS] [request]: enforce authentication for /version

Open
#1,363 0 comments 3 reactions 0 assignees View on GitHub
EKS Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

**Tell us about your request**

The unauthenticated `/version` endpoint on the Kubernetes API exposes a lot of information about the cluster:

```
{
"major": "1",
"minor": "19+",
"gitVersion": "v1.19.6-eks-49a6c0",
"gitCommit": "49a6c0bf091506e7bafcdb1b142351b69363355a",
"gitTreeState": "clean",
"buildDate": "2020-12-23T22:10:21Z",
"goVersion": "go1.15.5",
"compiler": "gc",
"platform": "linux/amd64"
}
```

When public access is enabled, this lets anyone gleam information about the cluster that could be useful to an attacker (knowing the k8s version for example) or the fact that it's a k8s cluster in the first place.

It seems unnecessary to publish this much information without requiring authentication. The primary reason I can imagine for this is to make `kubectl version` work, but my expectation would be that it's able to use the authentication information provided in the kubeconfig context to do that request (since `version` is dependent on the active context).

**Which service(s) is this request for?**

EKS

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**

I'd like to not have a bunch of information about my cluster available to the public, even though I'd like public API access available to make developer's lives more convenient (and as such set the API IP whitelist to `0.0.0.0/0`).

**Are you currently working around this issue?**

No, though there's been discussions about forcing stuff through a proxy/VPN and disabling public access in order to mitigate the metadata leak.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the unauthenticated Kubernetes API /version endpoint and how kubectl version uses authentication from the active kubeconfig context. Done means public EKS API access no longer exposes /version without authentication while authenticated kubectl version requests continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes
Domain
authentication, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.