-
Notifications
You must be signed in to change notification settings - Fork 160
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
add support for Azure OIDC #2745
Conversation
Would be great if a maintainer could have a look at this |
- allow disabling "groups" scope - combine roles with groups
This is also relevant to Google OIDC. The |
any chance this get merged any soon? this would be useful for us too |
any ETA when this will be merged? |
@foot would you be able to take a look at this, please? 🙏🏻 |
Same issue with AWS Cognito. |
Closing. Since #3234 you can override scopes using secret's If you use Azure's App Roles you can also use claim's roles as groups just set secret's Longer version:
Related solution: #2507 (comment) |
I tried your solution, but I am stuck with the error
I tried setting the claimUsername to various things such as email, upn and preferred_username, but they all give the same error. In chrome dev tools I see the cookie containing id_token and access_token. Inspecting them further it shows that the id_token does contain |
Double check if authorization request has email in scope. If you use Is email associated with Azure AD account that you are using? Try adding optional claim:
Reference: |
I just did a test and you can impersonate groups with the following configuration:
Then it works with groups |
@LukaszRacon Thanks for the advice. I tested around a bit, and realized that the My
and additional args
I've added optional claims for both id_token and access_token for Copy pasting the tokens from developer console into jwt.ms, the required claims are clearly there in both the access AND id tokens. I'm confused as to what the gitops-server is actually seeing, because the logs clearly still state |
It seems I made the above work by changing the issuerURL to use the v1 AAD endpoint ref. #2507 (comment)
not really sure why this is required, but I am able to sign in using OIDC for the first time, so that's a start! |
Scopes are different between v1/v2. So you can use upn as email is not an scope on v1. But upn is not an scope within v2, so it fail when you configure it as username-claim |
Two things are needed to support Azure OIDC:
There are a number ways of indicating intent: env var, cmd option, based on issuer url. I will leave decision on what is the best approach to Weave Works team.
PR uses env var - helm chart config:
Another idea for handling groups in Azure would be to map between group uuid and group on k8s side (this is how Argo team handled it).
Closes #2507, #2334
In case this is tested with
impersonationResources: ["groups"]
there is helm chart configuration issue: #2696 that warrants chart and documentation update.