-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
External authentication (LDAP Support) #2316
Comments
This comment has been minimized.
This comment has been minimized.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Any news regarding this topic? |
Not interested. It’s a commercial feature I don’t plan to add to the open source mailcow ever. |
@rennerdo30 You can go ahead and fork the project anytime. I'm sure many people would like to help if you'd incorporate Gluu; Mailcow is GPLv3 after all :). |
That’s true. :) |
I wouldn't say it's a commercial only feature. Of course it's standard but people who are using this software are often IT hobbists or something like this. These kind of people are more likely to have an private LDAP or something like this. And why don't you want to add something just because it's a commercial feature? |
Sounds like sso.tax |
LDAP/central auth is not a commercial feature, and even still, don't you provide paid support for mailcow when a client wants it? I guarantee you this is a barrier to implementation for those considering alternatives to the now-not-open-source Zimbra 9. No central auth? Not even ready for actual account organisation. Oh, and there are many examples of not-commercial LDAP implementations, openLDAP, FreeIPA, etc. |
Added it :P
I have to agree, it's not. It's a security feature. Of course, the normal person don't use it, what kind of people use mailcow? Mostly IT nerds and maybe a few small companies. I would call myself an IT nerd and I run a local LDAP instance for my local stuff. I would use it in a personal environment. |
This comment has been minimized.
This comment has been minimized.
Actually yes. Microsoft with Active Directory for example. Nevertheless, I fully agree with you. I - just like many others here - would also love to see native LDAP connectivity |
This comment has been minimized.
This comment has been minimized.
Active Directory provides LDAP as a component that is LDAP DN compliant. |
@patschi since you reopened this: Is this planned or just considered not as "uninteresting" as before? |
Unfortunately there're no concrete plans implementing this as of now. I don't think it's "uninteresting" (quite the opposite for me personally actually), but there's not been a requirement or funding to get this implemented. Most regular, private users don't need external authentication via LDAP or so, so it's not a priority. If there's interest from companies, it can be funded if required to prioritize this one. |
Honestly this is a chicken and the egg thing. I can appreciate that you have limited resources (time, etc) to contribute to this project. But the harsh reality is a company typically isn't going to bankroll adding a feature if there's no guarantee of it. Companies will pass on this suite because that feature is not already implemented. So if you want to attract companies as prospective clients (paying or otherwise), you need to invest in this and other common features they care about first, otherwise you're just limiting how many will consider even trying your tool. This is ultimately going to be a you decision to make, but I guarantee you there are already companies that have decided to not consider this suite for their needs based on this one absent feature. |
So you want to provide it? When do you start? :) We have a bunch of companies using mailcow, I wonder why they don't complain. |
This comment has been minimized.
This comment has been minimized.
Can we please stop throwing shit on each other? Maybe this will be implemented or not. You are all free start committing code for feature requests and creating Pull Requests. Any did I say that you also can fork this project and implement what ever you like for your own (or pay someone else to do it)? |
Please calm down. Mailcow is a public project. Anyone can contribute to it. I would like to see external authentication as well. But this is no reason to tell @andryyy in any way how to run his business. I agree that some businesses might be more inclined to mailcow if it has support for it (I can even name one or two that are using custom tools like https://github.com/Programmierus/ldap-mailcow to add user synchronisation). Nonetheless, it is @andryyy's decision what to implement and what not to. I'm sure he would merge it right away if someone put up a PR to implement it. His time - just like all of our time - is limited. He has to decide what and when he wants to implement something. Danm it @waja was faster than me :P Nevertheless: Thank you. I'm glad that I'm not the only one with this opinion |
Thank you. :) |
As LDAP is quite easy to add using the API (there are already working projects on github doing exactly this), I really would love someone to implement OAUTH or SAML instead as this is much harder to do.. but would really add value at least when you like 2FA on your apps. |
I'm just hoping for it not being Blizzard Soon™ https://wowwiki-archive.fandom.com/wiki/Soon 🤣 |
the feature is in the nightly build now. https://mailcow.email/posts/2023/mailcow-idp/ create docker-compose.override.yml
create data/conf/nginx/site.keycloak.custom
|
@FreddleSpl0it Is the LDAP support limited to Keycloak? I'm running an OpenLDAP instance and want to use it as the authentication source. |
@NexZhu Mailcow should connect to Keycloak and your Keycloak to any user DB. It was announced there: https://mailcow.email/posts/2023/ldap-announcement/ |
@NexZhu It's limited to OIDC Identity Providers and Keycloak is the most supported one with more features like automatic user provisioning. The hardest Part was to change the way authentication works especially the Dovecot authentication. But this is now so universal designed, that we could basically add a direct LDAP support in the future. But for now, it's only OIDC and especially Keycloak. Keycloak has so many features, such as LDAP or Kerberos Providers, and even the ability to log in with social platforms like GitLab, Twitter, and so on. We didn't want to reinvent the wheel, so we chose this path. How to connect Keycloak to LDAP: https://mailcow.email/posts/2023/mailcow-idp/#ldap |
Hello, does this also allow oauth authentication at the SoGo CardDAV and CalDAV interfaces? |
@mstilkerich No, it only permits users to utilize the external IdP to log in to the mailcow UI. Within the mailcow UI, users can proceed to the SOGo Webmail or generate App Passwords for use with other applications. Could you tell me which application you use that can utilize OAuth for logging in to CardDAV and CalDAV? |
My interest is on Roundcube. I tried to setup a SSO mailcow setup with Roundcube using the builtin oauth2 provider in mailcow a while ago. I got it working with dovecot and postfix (configuration changes for both needed) if I recall correctly but failed with SoGo's carddav interface. But I am just interested in this for educational purposes / having a test env for roundcube carddav plugin with oauth authentication, for my small family server I have no need for a central authentication solution. Btw I did have a working OIDC SSO setup with roundcube, keycloak, dovecot, postfix and nextcloud (for contacts/carddav), so I know from the roundcube side this would be supported. |
First off, Great work. Thank you very much for implementing this feature! I have a few questions about how this would look in the future.
|
Will this OIDC feature be usable with Desktop / Mobile clients? Or is it exclusive for Webmails? In case it can be used in Desktop clients, how will the client prompt / redirect to the IdP login page? Or let us say, which clients are supported? |
|
@MohammedNoureldin Currently it is not supported and I don't know yet of any Client that allows the configuration of a custom oAuth provider. The client would need to be able to open a Browser and redirect the user to the IdP login. On success, it would receive a oAuth token and uses this for further authentication via IMAP or EAS |
There is RFC 7628: A Set of Simple Authentication and Security Layer (SASL) Mechanisms for OAuth, which allows the client to retrieve the provider information from the server. It is supported by the Dovecot server. There are several clients (Thunderbird, Apple Mail, Evolution, emClient, Outlook) that support OAuth with Google, Microsoft and/or Yahoo, but as of 2021 these were using static lists of OAuth providers. At least for Thunderbolt and Evolution, that still seems to be the case. |
Thank you for the info, @mkuron and @FreddleSpl0it,
So for the these clients it should be technically a matter of giving the end-user the ability to configure his IdP on the client? Is there anything we can do, except extending the code of these software, to allow the mail clients to login using our custom IdP? In other words, to allow the end-user to configure SASL in the client? |
You could check their bugtrackers for whether any work on that is planned, and file feature requests for RFC 7628 support if it isn't already planned. Also, given the lack of client support, I don't know whether Dovecot's Oauth support is well-tested and stable, so you could do some online research about whether anyone has successfully deployed it. Thunderbird has several feature requests related to various aspects of this: |
Thank you for the great feature!
|
@FreddleSpl0it Unfortunately, the repo is no longer maintained and it no longer works with the current sogo. Perhaps this approach can also be integrated directly into the mailcow stack so that the current workaround with the php script can be dispensed with? |
Some time ago, I built a hacky syncer for the linuxmuster project, which enables automatic user and mailing list provisioning and authentication from LDAP in mailcow. |
In this case, if I want to use any centralized user management (e.g., federated users in KeyCloak) you will only be able to use web interface, but not any native client for desktop or mobile, to login to your email. Right? |
As mentioned in that issue #5445 it seems that OIDC is not fully generic/not fully working. Only the KeyCloak integration seems to be working currently. |
Maybe you should do a third option or change the default oidc option for the identity provider. If you would get the informations for the endpoints from this file, it would be much easier to configure for example Authentik or other openid connect services. Maybe you could use this also to implement a custom link for getting all the users like it is there for keycloak, so it would be much easier to do a full sync with other providers than keycloak. |
Are there any news about the status of this feature? |
I am also curious about this integration... Would it be possible to run a separate script or something, to enable this functionality without having to run nightly? =) Thanks for all your work! |
Hi!, I see there are several requests for external authentation but no solution for any of them.
I would like to know what's the best approach to introduce mailcow to an ecosystem where an authentication platform is already inplace and used for all the application (LDAP/SAML/OAuth).
I usually see AD/OpenLDAP/LemonLDAP/Gluu in the wild as authentication source and would be nice to be able to do it by domain (I'm just thinking out loud).
Any thoughts on this?.
Ref:
#1483
#706
#684
The text was updated successfully, but these errors were encountered: