-
Notifications
You must be signed in to change notification settings - Fork 329
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
Enable Azure AD v2 tokens #320
Conversation
@bnfinet would it be possible to add the label “hacktoberfest-accepted” to this PR (if it’s accepted)? |
@simongottschlag Sorry for the delay in reviewing. I should have some time over these next few days to pay attention to the outstanding PRs. Is this no longer a viable solution? Was curious why you closed the PR. |
@bnfinet I was cleaning up all abandoned tasks and PRs I had 😊 I've reopened it again! |
yes please merge, rather have this in main branch than maintain a custom build |
…to pr/simongottschlag/320
I have pulled this code and tested it, but a bug was introduced into pkg/cfg/oauth.go during a merge (commit 2175fcb) where configureOauthClient() is no longer being called, which leads to a panic during login. This is pretty straightforward to fix, but I can't fork a PR, and I'm not sure on the etiquette of just copying @simongottschlag changes into my own fork and submitting a PR. As it's only one line, it's a simple patch:
After that fix, the login flow works perfectly for Azure, both for guest users (fixing #314 ) and full tenant users. Full log with a simple example config is available at https://gist.github.com/iamareuben/540e1b0b170abab0f0df1a3807538967 Please note that for guest user login to work with this setup, an extra claim needs to be set up in the Azure AD portal for preferred_username (screenshot attached). As per your config.yml file, this can either be set up as a id_token or an access_token Let me know if any further info is required to test out this PR. VP is an awesome piece of software which makes deploying internal web apps for my business super easy so I'm keen to contribute however I can. |
thanks for the contribution and analysis @iamareuben I'll add that patch to the PR, push to Simon's branch and then ask you to test again. Thanks also for the kind words and the offer to help. Always appreciated. |
Also tested this PR, it works great. See log file here: https://gist.github.com/acm-073/c7d91bca67c882c1e22e2aa8b4499bc4 I would really be glad to see this merged. |
Thanks @acm-073, Just to clarify, you made the adjustment to the code that's suggested by @iamareuben prior to generating your log, is that correct? |
@bnfinet that change is already in git, see commit 6d8b79a I just checked out HEAD of branch https://github.com/simongottschlag/vouch-proxy/tree/azureadv2 and used docker build to build the image. |
merged! @iamareuben @acm-073 @simongottschlag thanks all for the collective effort |
@bnfinet great, thanks! |
Changes:
oauth.azure_token
(access_token
andid_token
are possible configurations)preferred_username
if UPN is emptyTries to fix: #314