-
Notifications
You must be signed in to change notification settings - Fork 145
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
Please add support for authentication via (Open)LDAP #181
Comments
hi @chlarsen, thanks for raising this. i'm trying to understand in more detail how this works. i've never used ldap, but have looked at the high-level explanations a few times. some questions about ldap and how it would fit:
|
Dear Mechiel, First of all, apologies for my belated reply, and thank you for your follow-up.
Yes, OpenLDAP can either do user lookups anonymously, or you stick a read-only role with password into the application. I tend to use the latter approach.
Passwords in OpenLDAP are using SASL and/or TLS. IMHO and for my setup, a decent TLS deployment may well be sufficient, plus, of course, decent password encryption on the OpenLDAP server side. You are right, OpenLDAP, being a wild box of 1001 options and features, offers a plentiful of password exchange mechanism, yet I think plain plus TLS should be just fine.
User creation would be automatic, as soon as there is a successful login via OpenLDAP. Now, what I have not done and do not intend to do is to manage application-specific groups via OpenLDAP, because this is a level of complication that does not yield any benefits. So, my groups are "mail" for mail users, "wiki" for wiki users (not caring whether their are reviewers or editors, etc), and so forth.
This is an interesting one: Cyrus-IMAPd in LDAP mode demands domains to be configured in OpenLDAP, Dovecot does not in my experience. I prefer to keep it simple and just do the account management in OpenLDAP, where I use the official qmail scheme to allow email aliases, forwards, etc to be configured. Has worked like a charm ever since my Qmail-LDAP times... :-) Hope this helps, please sing out, if you have any questions. Thank you! |
With the goal of a potential more versatile integration, I'd like to share some thoughts. While I completely agree with the necessity of central user management in an enterprise environment, the actual experience is usually no smooth sailing. User provisioningUser provisioning – create and delete users with a standardized setup – would be critical and IMHO higher priority than authentication. But let’s take just one use-case of an employee leaving the company. Depending on internal policies I have seen following actions:
So as an application developer your options are limited. The best integration experience was usually a concise REST API to allow user management. Enterprise-level centralized user and rights management allows to define workflows for your policies with exits (calls to external systems, via LDAP/Active Directory or REST API’s). In the context of mox, I would basically suggest offering the user/account related feature set of the current mox CLI as a REST API. AuthenticationAuthentication is a major challenge. Static passwords aren't always used. In many industries (including those I've worked in), smart card/certificate-based identities dominate (Windows and Linux) and you won’t find a (user known) password in the LDAP system. Additionally, policies often require MFA. For clients which were not able to do trust- or public key-based authentication (often OAUTH2), often one-time passwords were used behind the scenes. Obviously, this requires adapted clients and integration between server and authenticator. As a way forward an authentication hook in mox I believe is beneficial. In the most basic way, it transmits the offered credentials and expects a accept/reject decision. The integration with LDAP - and to other systems - would be external to mox. I’m not sure about the complexity or feasibility in challenge-response scenarios. Multiple identitiesFurthermore, it would be for these kinds of scenarios useful if mox would support multiple identities for one account and allow rules for the usage. E.g. for one single account user1@example.com
Rules should restrict the usage to certain external factors, most probably IP ranges (i.e. Local LAN, VPN, Public). |
Dear Robert, |
With the above in place, I would drp nearly everything and came in running for mox!
Thank you!
The text was updated successfully, but these errors were encountered: