Skip to content
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

Add audience for teleport-proxy kubernetes service account token in teleport-cluster chart #49761

Conversation

verdel
Copy link
Contributor

@verdel verdel commented Dec 4, 2024

After backporting changes that allow the kubernetes in-cluster joining mechanism to use tokens with the clusterName specified in the audience, authorization for teleport-proxy in GKE (Google Cloud Kubernetes Engine) clusters breaks.

This happens because the TokenReview request now includes an audience that contains both https://kubernetes.default.svc and clusterName. However, in GKE, the default audience for ServiceAccount tokens is https://container.googleapis.com/v1/projects/PROJECT/locations/LOCATION/clusters/NAME. As a result, teleport-auth rejects the token from teleport-proxy.

Fixes #49756

Copy link

github-actions bot commented Dec 4, 2024

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@CLAassistant
Copy link

CLAassistant commented Dec 4, 2024

CLA assistant check
All committers have signed the CLA.

@verdel
Copy link
Contributor Author

verdel commented Dec 4, 2024

I have read the CLA Document and I hereby sign the CLA

@hugoShaka
Copy link
Contributor

Hello @verdel , thank you for quickly identifying the problem and contributing a fix, this is greatly appreciated 👍

Failing to join on clusters with custom domains was a regression in 16.4.9 and 17.0.3. I preferred fixing the Kube joining method by dynamically detecting audiences instead of doing a chart-only fix as some users rely on custom charts chart to deploy teleport on kube.

16.4.10 and 17.0.4 should work again on every cluster, please reopen the issue if this does not work for you.

Done in: #49796

@hugoShaka hugoShaka closed this Dec 6, 2024
@verdel
Copy link
Contributor Author

verdel commented Dec 6, 2024

@hugoShaka, Yes, I agree. I was just about to write a message to ask if I should close this PR.
Thank you for fixing the issue so quickly!

@verdel verdel deleted the chart-telepor-cluste-add-audience-proxy-kubernetes-token branch December 6, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[helm/teleport-cluster] Add audience into serviceAccountToken for proxy service
3 participants