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

Authentication fails using Azure CLI login #752

Closed
laudibert opened this issue Dec 8, 2021 · 1 comment
Closed

Authentication fails using Azure CLI login #752

laudibert opened this issue Dec 8, 2021 · 1 comment

Comments

@laudibert
Copy link
Contributor

Describe the bug
Authentication fails using Azure. The "expires-on" property when using Azure authentication is in seconds but is expected in milliseconds.

Client Version
0.16.1

To Reproduce

  • az login
  • az get-credentials --resource-group xxx --name aks-name --subscription xxx
  • Any kubectl command to authenticate to the cluster
  • Execute:
const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const appApi = kc.makeApiClient(k8s.AppsV1Api);
await appApi.readNamespacedDeployment('xxx', 'xxx');

Throws Error: Token is expired!

Expected behavior
Should not try to refresh token when it is not expired (just generated).

Additional context
The user authProvider.config has this set:

  environment: 'AzurePublicCloud',
  'expires-in': '4410',
  'expires-on': '1638979372', // in seconds
@laudibert
Copy link
Contributor Author

Fixed with #753

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

No branches or pull requests

1 participant