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

[BUG] AKS - cannot use kubectl auth can-i on AAD users/groups #4743

Open
amithkk opened this issue Jan 13, 2025 · 1 comment
Open

[BUG] AKS - cannot use kubectl auth can-i on AAD users/groups #4743

amithkk opened this issue Jan 13, 2025 · 1 comment

Comments

@amithkk
Copy link

amithkk commented Jan 13, 2025

Describe the bug

kubectl auth can-i can be used to check if a specific user/group/svcaccount can access a specific resource by using the --as parameter. However, trying to run this with an AAD OID for a group or user results in the following error:

$ kubectl auth can-i get pods -n dev --as 4d1f21fa-2a27-4822-9222-3fff48f6ac21
no - Azure does not have opinion for this non AAD user. If you are an AAD user, please set Extra:oid parameter for impersonated user in the kubeconfig

To Reproduce
Steps to reproduce the behavior:

  1. Run command kubectl auth can-i get pods -n dev --as <valid-AAD-oid>
  2. See error

Expected behavior

AAD RBAC states whether access is granted

Environment (please complete the following information):

  • kubectl version: 1.30
  • Kubernetes version 1.30

Additional Info

This has been reported before, but has been closed with no resolution as stale:

Copy link
Contributor

@miwithrow, @CocoWang-wql would you be able to assist?

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

No branches or pull requests

2 participants