-
Notifications
You must be signed in to change notification settings - Fork 178
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
Misc cleanup + fixes #95
Conversation
- Fixes jupyterhub#44 Empty DN templates are now ignored - Fixes jupyterhub#93 search_filter and allowed_groups are no longer mutually exclusive
@djrobstep, @ermakovpetr - it would be great if you could verify if this branch fixes the problem you observed in #44 |
@mfriedemann - it would be great if you could verify if this branch fixes the problem you had in #93 or clarify what else needs to be done to support your usecase. |
ok! I will definitely look in the coming days |
@dhirschfeld cool, i'll give it a look when I can |
@dhirschfeld As hinted at earlier, we bind to AD, but aren't keen on using a technical account to do it. Instead, we take the username that is entered (basically the sAMAccountName), and by using the bind_dn_template to append an '@' and the AD domain, we construct the userPrincipalName (which looks like an email address, and is not a DN). For AD, you can authenticate the user with this userPrincipalName and the password. Note that in this case, you haven't gotten a DN for the user, yet, you would need to do a search first. FWIW, I added the group check to the search filter (luckily, AD represents group membership on both ends) and made it work that way. HTH, |
In the interests of moving forward I'll merge then iterate... |
This cleans up the code a bit and as such helps clarify the underlying logic. In the process I've hopefully resolved a couple of issues:
Empty DN templates are now ignored
search_filter and allowed_groups are no longer mutually exclusive