-
Notifications
You must be signed in to change notification settings - Fork 102
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
Support for separate users in same client #159
Comments
First of all, we removed token caching behavior from I think the root of the issue is that you are sharing multiple users using the same environment. The CLI, regardless of az or kubelogin, needs a hint ( |
As I can be logged in with multiple users in the az cli I hoped that either kubelogin could notice which one has permissions (it seemed to behave like this when I was not using kubelogin yet in older az cli versions, where as long as I was logged in with both users I had access to both clusters) or give me a way to define which user should be used. |
i'm also in need of multiple users support, and want to switch between them all the time. workaround -> set argument suggestion -> add support for argument for adding extra oidc arguments, this way we can utilize it for adding login_hint or domain_hint for example. |
Scenario:
I have two clusters in the same tenant, different subscriptions.
I have a separate account for each cluster with no permissions for the other cluster.
I'm just getting the credentials via
az aks get-credentials
and then using Device code flow or Azure CLI token login but it ended in the same issue.Issue:
The account for whatever cluster I add first is used for all clusters. Works fine for the first cluster, but when switching to the other cluster it results in:
Error from server (Forbidden): pods is forbidden: User "xxx" cannot list resource "pods" in API group "" in the namespace "default": User does not have access to the resource in Azure. Update role assignment to allow access.
Whether the configuration reside in the same kubeconfig or different ones does not change the behavior.
There is always only one aad token file in the .kube/cache/kubelogin
By executing
kubelogin remove-tokens
I can reset this and reauthenticate with the correct user, but I would expect there to be a seemless solution?Example kubeconfig for reference, as the exec part is completly identical this might be the issue?:
How do I work around this?
The text was updated successfully, but these errors were encountered: