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

XdsKubernetesService Does Not Use the Latest OAuth Token #1084

Open
minwoox opened this issue Jan 2, 2025 · 5 comments
Open

XdsKubernetesService Does Not Use the Latest OAuth Token #1084

minwoox opened this issue Jan 2, 2025 · 5 comments
Labels

Comments

@minwoox
Copy link
Contributor

minwoox commented Jan 2, 2025

When fetching Kubernetes information, the OAuth token must first be stored in the credentials.
The XdsKubernetesService relies on this stored credential for its operation.

Problem:
Currently, XdsKubernetesService only uses the credentials when creating a KubernetesEndpointGroup.
If the credentials are updated, the KubernetesEndpointGroup is not recreated to reflect the change.

Potential Solutions

  1. Store the OAuth token directly in the Kubernetes configuration to ensure the latest token is always used.
  2. Implement a mechanism to refetch the credentials under certain conditions, such as when an authentication exception occurs.
@minwoox minwoox added the defect label Jan 2, 2025
@ikhoon
Copy link
Contributor

ikhoon commented Jan 7, 2025

It seems that ConfigBuilder.withOauthTokenProvider() could be used to dynamically update the OAuth token.

@minwoox
Copy link
Contributor Author

minwoox commented Jan 8, 2025

That's cool. 👍 Does it refetch the token when the authentication fails?

@minwoox
Copy link
Contributor Author

minwoox commented Jan 8, 2025

I've realized that we can't use it because it's not asynchronous. 😢

@ikhoon
Copy link
Contributor

ikhoon commented Jan 8, 2025

I thought we could implement an OauthTokenProvider using RepositoryListener to update a new token automatically.

@minwoox
Copy link
Contributor Author

minwoox commented Jan 8, 2025

Ah, that probably works. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants