Skip to content

[v12] Fix tsh kube credentials when root cluster roles don't allow Kube access#33227

Merged
tigrato merged 1 commit intobranch/v12from
bot/backport-33014-branch/v12
Oct 11, 2023
Merged

[v12] Fix tsh kube credentials when root cluster roles don't allow Kube access#33227
tigrato merged 1 commit intobranch/v12from
bot/backport-33014-branch/v12

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Oct 10, 2023

Backport of #33014 to branch/v12

…ccess (#33014)

* Fix `tsh kube credentials` when root cluster roles don't allow Kube access

This PR fixes an edge case where an error message is printed to the
users without proper knowledge of the role mappings between root and
leaf clusters.

The user certificates include the `kubernetes_users` and
`kubernetes_groups` allowed in the root cluster but nothing prevents the
access to be sucessfull if the leaf cluster roles after the mapping
introduce the kubernetes principals.

This PR prevents tsh from failing when generating certificates for leaf
Kubernetes clusters.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* Update tool/tsh/common/kube.go

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* add check to tsh proxy

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
@github-actions github-actions Bot added backport size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Oct 10, 2023
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from smallinsky October 11, 2023 08:37
@tigrato tigrato added this pull request to the merge queue Oct 11, 2023
Merged via the queue into branch/v12 with commit 8f8e31c Oct 11, 2023
@tigrato tigrato deleted the bot/backport-33014-branch/v12 branch October 11, 2023 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants