kubernetes-client / kubernetes-client/java

GCP authentication does not support refreshing tokens

Open
#290 33 comments 24 reactions 0 assignees View on GitHub
lifecycle/frozen
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.