kubernetes-client / kubernetes-client/java
GCP authentication does not support refreshing tokens
- Dominant language
- Java
- Stars
- 4k
- Forks
- 2.1k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 16
Description
This relates to #143.
GCPAuthenticator does not implement the refresh() method.
How can the client be used without manually refreshing the access token if it is expired?
for reference, initializing the client (i.e. running the example) with an expired token will result in:
`Caused by: java.lang.IllegalStateException: Unimplemented
at io.kubernetes.client.util.authenticators.GCPAuthenticator.refresh(GCPAuthenticator.java:49)
at io.kubernetes.client.util.KubeConfig.getAccessToken(KubeConfig.java:188)
at io.kubernetes.client.util.credentials.KubeconfigAuthentication.(KubeconfigAuthentication.java:33)
at io.kubernetes.client.util.ClientBuilder.kubeconfig(ClientBuilder.java:165)
at io.kubernetes.client.util.ClientBuilder.standard(ClientBuilder.java:80)
at io.kubernetes.client.util.Config.defaultClient(Config.java:104)
at serivces.KubernetesService.(KubernetesService.groovy:23)
... 2 more`
Contributor guide
Research direction
Start with GCPAuthenticator.java at refresh(), then trace the expired-token path through KubeConfig.java at getAccessToken() and the ClientBuilder initialization shown in the stack trace. Run the referenced client example with an expired token; done means initialization refreshes the token instead of throwing Unimplemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gcp, java
- Domain
- authentication, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100