-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Implement Microsoft (Azure AD) connector #1131
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 Thanks -- this is a great addition IMHO 🎉
First I thought this was mainly to workaround the OIDC quirks of Azure, but with the groups queries, it really is a fabulous addition. LGTM!
Documentation/microsoft-connector.md
Outdated
logged in user, an explicit organization administrator consent is required. To | ||
obtain the consent do the following: | ||
|
||
- when registering dex application on [https://apps.dev.microsoft.com]() add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
markdown: those links don't go anywhere like this. Random markdown cheatsheet suggests https://apps.dev.microsoft.com
or <https://apps.dev.microsoft.com>
tests:
- https://apps.dev.microsoft.com (this is without anything)
- https://apps.dev.microsoft.com (this is wrapped in
<..>
)
Documentation/microsoft-connector.md
Outdated
|
||
## Configuration | ||
|
||
Register a new application on [https://apps.dev.microsoft.com]() via `Add an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same link thing (see above)
|
||
## Overview | ||
|
||
One of the login options for dex uses the Microsoft OAuth2 flow to identify the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] it sometimes says "dex" and sometimes "Dex" in here
connector/microsoft implements authorization strategy via Microsoft's OAuth2 endpoint + Graph API. It allows to choose what kind of tenants are allowed to authenticate in Dex via Microsoft: * common - both personal and business/school accounts * organizations - only business/school accounts * consumers - only personal accounts * <tenant uuid> - only account of specific tenant Signed-off-by: Pavel Borzenkov <[email protected]>
Microsoft connector now provides support for 'groups' claim in case 'tenant' is configured in Dex config for the connector. It's possible to deny user authentication if the user is not a member of at least one configured groups. Signed-off-by: Pavel Borzenkov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 😃
🏓 @ericchiang I'm just an interested bystander, but I wonder if we could get this reviewed/approved? 😉 |
✅ I've just tested this against an Azure AD instance -- and it works as advertised 🎉 (Thanks again, @pborzenkov) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @srenatus for the review. I haven't tried this manually, but the code lgtm.
Implement Microsoft (Azure AD) connector
The connector provides an ability to authenticate in Dex via Microsoft with both personal and organization accounts. It's possible to restrict authentication based on the type of account or even to require accounts to belong to specific tenant.
Groups are also supported and will be queried if
groups
claim is present in the request andtenant
is configured in Dex configuration file. Groups support is not without caveats, though. See Documentation/microsoft-connector.md for details.