Client-go: Azure authentication fails on acquiring consequent tokens

Created on 26 Dec 2017  路  18Comments  路  Source: kubernetes/client-go

We use kubectl with Azure authentication provider, and our devs are facing issue when access-token expired.

$ kubectl get pods
E1226 11:52:13.723835   16281 azure.go:126] Failed to acquire a token: refreshing the expired token: refreshing token: adal: Refresh request failed. Status Code = '400'
Unable to connect to the server: acquiring a token for authorization header: refreshing the expired token: refreshing token: adal: Refresh request failed. Status Code = '400'

Deleting all tokens from ~/.kube/config and authentication solves the issue until next expiring period.

lifecyclrotten

Most helpful comment

I keep having this 3-5 times every day with Azure's k8s. Any hints how to get rid of this (or on why this ticket was closed?)

All 18 comments

/assign @cosmincojocar

@ericchiang: GitHub didn't allow me to assign the following users: cosmincojocar.

Note that only kubernetes members and repo collaborators can be assigned.

In response to this:

/assign @cosmincojocar

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

I have the issue as well, and the workaround (to delete access tokens) works for me. Would still be interested if it could be solved in a different, less manual way.

Modifying this ~/.kube/configfile by deleting accessToken and refreshToken worked. Would like to know if there is a way to solve this better.

I keep having this 3-5 times every day with Azure's k8s. Any hints how to get rid of this (or on why this ticket was closed?)

I have this too on different clusters on the same tenant, which all worked flawless for months. I have to to az aks get-credentials to solve this for a short while.

Same situation, we configured sign-in frequency on Azure and it keeps displaying this error.鈥≧emoving manually the token in the kubeconfig works but it's a very dirty workaround.

The expected behaviour should be to try to authenticate again (device code etc...).
This should not be closed if not solved.

/reopen
This bug is still here.

@vladimirglazkov: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen
This bug is still here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/reopen
This is still and issue

@andyliddle: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen
This is still and issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

E1012 17:28:55.767794 4872 azure.go:154] Failed to acquire a token: unexpected error when refreshing token: refreshing token: adal: Refresh request failed. Status Code = '400'. Response body: {"error":"interaction_required","error_description":"AADSTS50078: Presented multi-factor authentication has expired due to policies configured by your administrator, you must refresh your multi-factor authentication to access ''.\rnTrace ID: \rnCorrelation ID:\rnTimestamp: 2020-10-12 16:28:55Z","error_codes":[50078],"timestamp":"2020-10-12 16:28:55Z","trace_id":"","correlation_id":"","suberror":"basic_action"}

Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:41:02Z", GoVersion:"go1.15", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:51:04Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

@ericchiang Perhaps this could be re-opened? It continues to be an issue and was not triaged prior to being closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vklonghml picture vklonghml  路  4Comments

AdheipSingh picture AdheipSingh  路  5Comments

protheusfr picture protheusfr  路  3Comments

h0tbird picture h0tbird  路  3Comments

jharshman picture jharshman  路  4Comments