-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify behaviour of kubernetes_users
role field in docs
#18495
Comments
It appears this PR introduced this field and provides some additional context: #3404 |
Hi @strideynet, since this issue was opened, we added some more explanation of how the Kubernetes Service processes Teleport roles: https://goteleport.com/docs/kubernetes-access/controls/ Does this take care of this issue? Thanks! |
This explanation is a significant improvement, it captures my understanding of the topic well. I think my concerns re: https://goteleport.com/docs/kubernetes-access/getting-started/#kubernetes-authentication are still valid. We instruct users to run the following command: kubectl config view \
-o jsonpath="{.contexts[?(@.name==\"$(kubectl config current-context)\")].context.user}" The output of this command returns the Teleport cluster name and the name of the Kubernetes cluster in Teleport concatenated: noah.teleport.sh-example-cluster We then instruct the user to insert this value into the This doesn't make any sense to me at all. It's causing all Kubernetes requests made by that user to be impersonated as Unless someone more familiar with this chimes in to correct me, I recommend dropping the |
Closes #18495 Edit the partial at `docs/pages/includes/kubernetes-access/rbac.mdx` so it does not require enabling access to an awkwardly named Kubernetes user based on the current context. Instead, have the user check whether they can already access Kubernetes users/groups, and if not, assign their Teleport user a role that can access a view-only group.
Closes #18495 Edit the partial at `docs/pages/includes/kubernetes-access/rbac.mdx` so it does not require enabling access to an awkwardly named Kubernetes user based on the current context. Instead, have the user check whether they can already access Kubernetes users/groups, and if not, assign their Teleport user a role that can access a view-only group.
Closes #18495 Edit the partial at `docs/pages/includes/kubernetes-access/rbac.mdx` so it does not require enabling access to an awkwardly named Kubernetes user based on the current context. Instead, have the user check whether they can already access Kubernetes users/groups, and if not, assign their Teleport user a role that can access a view-only group.
Closes #18495 Edit the partial at `docs/pages/includes/kubernetes-access/rbac.mdx` so it does not require enabling access to an awkwardly named Kubernetes user based on the current context. Instead, have the user check whether they can already access Kubernetes users/groups, and if not, assign their Teleport user a role that can access a view-only group.
Closes #18495 Edit the partial at `docs/pages/includes/kubernetes-access/rbac.mdx` so it does not require enabling access to an awkwardly named Kubernetes user based on the current context. Instead, have the user check whether they can already access Kubernetes users/groups, and if not, assign their Teleport user a role that can access a view-only group.
Closes #18495 Edit the partial at `docs/pages/includes/kubernetes-access/rbac.mdx` so it does not require enabling access to an awkwardly named Kubernetes user based on the current context. Instead, have the user check whether they can already access Kubernetes users/groups, and if not, assign their Teleport user a role that can access a view-only group.
Closes #18495 Edit the partial at `docs/pages/includes/kubernetes-access/rbac.mdx` so it does not require enabling access to an awkwardly named Kubernetes user based on the current context. Instead, have the user check whether they can already access Kubernetes users/groups, and if not, assign their Teleport user a role that can access a view-only group.
Applies To
https://goteleport.com/docs/kubernetes-access/getting-started/#kubernetes-authentication
Kubernetes docs in general.
Details
The behaviour of the
allow.kubernetes_users
role field is quite complex, and we don't do a good job of describing its behaviour anywhere in the documentation.From my brief exploration:
kubernetes_user
set. Specifying this is done with the--as
when usingkubectl
. Failure of the client to specify a user it wishes to impersonate will lead to an error rather than a successful request.Suggested fixes
Remove mention of
kubernetes_users
from Getting StartedAs far as I can tell, this value in the getting started documentation not necessary. If nothing is configured here, then the user's username will be used for impersonation, which is a sane default.
I would go as far as to suggest that the current value we suggest users set is actually harmful. In my case:
The docs would have me set the user to "root.tele.ottr.sh-docker-desktop" - which is certainly far less descriptive and useful than "noahstride".
Include an explicit section in the FAQs of Kubernetes Access on
kubernetes_users
I think we need to not only capture the behaviour of this field, but also why it is useful and in what circumstances you should want to use it.
The text was updated successfully, but these errors were encountered: