Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Feature Requests
  3. LDAP/AD Server

LDAP/AD Server

Scheduled Pinned Locked Moved Solved Feature Requests
auth
60 Posts 16 Posters 9.9k Views 19 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • marcusquinnM marcusquinn

    @fbartels Thanks, I'm running completely blind on this as I've not really found any documentation that gives any certainty on what's necessary or not, as one imagines every field has a reason and necessary action to create and highlight each value at the UCS end.

    https://docs.cloudron.io/user-management/#external-ldap

    69eda2a9-f7e6-4b2f-abbb-93d2e0d106de-image.png

    fbartelsF Offline
    fbartelsF Offline
    fbartels
    App Dev
    wrote on last edited by fbartels
    #36

    @marcusquinn I can imagine that the fields do not make much sense, if one has not really worked with ldap before.

    Something like the following should work:

    Server URL: ldaps://$your-univention-fqdn:7636
    [x] Accept Self-signed certificate (since the univention ldap has a certificate from the ca on the univention system, better would of course be to import the univention ca on the cloudron host)
    Base DN: cn=users,dc=your-univention,dc=fqdn
    Filter: (objectClass=inetOrgPerson)
    Username Field: uid
    

    For the bind user I would again recommend to create a machine account on UCS. This is done from their management ui -> devices -> computers.
    Click "add" select "Computer: Linux" as type and give the entry a name (for example "Cloudron"). After the item has been created open it and go to "Advanced settings" and unfold the "Account" entry. Here you can specify a password for your user.

    Bind DN/Username (optional):  cn=Cloudron,cn=computers,dc=your-univention,dc=fqdn
    Bind Password (optional): your choosen password
    

    Now you can click on save on Cloudron and hit that sync button. If all worked out you should now see your ucs users (like their default administrator user) in the user list of your cloudron. These external entries have then a small addressbook picture behind their name to differentiate them from the native Cloudron users.

    @nebulon feel free to use the above in your instructions at https://docs.cloudron.io/user-management/#external-ldap

    edit: since were on the topic. I am using the following settings to sync groups as well:

    Group Base DN: cn=groups,dc=your-univention,dc=fqdn
    Group Filter: (objectClass=univentionGroup)
    Groupname Field: cn
    

    This then also gets some internal groups like "computers" and "printer-admins", but that does not bother me much.

    marcusquinnM 1 Reply Last reply
    1
    • fbartelsF fbartels

      @marcusquinn I can imagine that the fields do not make much sense, if one has not really worked with ldap before.

      Something like the following should work:

      Server URL: ldaps://$your-univention-fqdn:7636
      [x] Accept Self-signed certificate (since the univention ldap has a certificate from the ca on the univention system, better would of course be to import the univention ca on the cloudron host)
      Base DN: cn=users,dc=your-univention,dc=fqdn
      Filter: (objectClass=inetOrgPerson)
      Username Field: uid
      

      For the bind user I would again recommend to create a machine account on UCS. This is done from their management ui -> devices -> computers.
      Click "add" select "Computer: Linux" as type and give the entry a name (for example "Cloudron"). After the item has been created open it and go to "Advanced settings" and unfold the "Account" entry. Here you can specify a password for your user.

      Bind DN/Username (optional):  cn=Cloudron,cn=computers,dc=your-univention,dc=fqdn
      Bind Password (optional): your choosen password
      

      Now you can click on save on Cloudron and hit that sync button. If all worked out you should now see your ucs users (like their default administrator user) in the user list of your cloudron. These external entries have then a small addressbook picture behind their name to differentiate them from the native Cloudron users.

      @nebulon feel free to use the above in your instructions at https://docs.cloudron.io/user-management/#external-ldap

      edit: since were on the topic. I am using the following settings to sync groups as well:

      Group Base DN: cn=groups,dc=your-univention,dc=fqdn
      Group Filter: (objectClass=univentionGroup)
      Groupname Field: cn
      

      This then also gets some internal groups like "computers" and "printer-admins", but that does not bother me much.

      marcusquinnM Offline
      marcusquinnM Offline
      marcusquinn
      wrote on last edited by marcusquinn
      #37

      @fbartels Thanks - so far UCS is a long way from intuitive. I feel like I got invited around for dinner and pointed at the kitchen while everyone else already ate.

      It seems strange to have to install an App for Lets Encrypt, as in that should just be a standard feature enabled for all to use or ignore.

      I have a feeling we're going to have to start again with reimagine this VPS because guesswork setups and issues are costing way more time that expected.

      The world really doesn't like solving the obvious needs in obvious ways.

      Really appreciate the instructions as I'm tearing my hair out with now over a day on something that I really don't think should be this complicated.

      It's like we have to deal with developers that think: "Well, we could make that possible, but since no-one has explicitly campaigned for it, lets just say its possible but not actually solve it, so everyone has to either learn everything we already know, or spend more time convincing us to make something obvious, then we might think about."

      My only sanctuary in persevering with all this, is that with Microsoft, Google & AWS they'd also try and sell you some certified course nonsense as well before allowing you to play their specifically different ways.

      Web Design https://www.evergreen.je
      Development https://brandlight.org
      Life https://marcusquinn.com

      marcusquinnM fbartelsF girishG 3 Replies Last reply
      0
      • marcusquinnM marcusquinn

        @fbartels Thanks - so far UCS is a long way from intuitive. I feel like I got invited around for dinner and pointed at the kitchen while everyone else already ate.

        It seems strange to have to install an App for Lets Encrypt, as in that should just be a standard feature enabled for all to use or ignore.

        I have a feeling we're going to have to start again with reimagine this VPS because guesswork setups and issues are costing way more time that expected.

        The world really doesn't like solving the obvious needs in obvious ways.

        Really appreciate the instructions as I'm tearing my hair out with now over a day on something that I really don't think should be this complicated.

        It's like we have to deal with developers that think: "Well, we could make that possible, but since no-one has explicitly campaigned for it, lets just say its possible but not actually solve it, so everyone has to either learn everything we already know, or spend more time convincing us to make something obvious, then we might think about."

        My only sanctuary in persevering with all this, is that with Microsoft, Google & AWS they'd also try and sell you some certified course nonsense as well before allowing you to play their specifically different ways.

        marcusquinnM Offline
        marcusquinnM Offline
        marcusquinn
        wrote on last edited by marcusquinn
        #38

        @girish Classic example of platform gatekeeping decisions costing every user the same inordinate amount of time.

        Option 1: Cloudron does not block external LDAP access. We can then use that with non Cloudron apps and get on with our lives.

        Option 2: Find someone that knows another platform that might do what could already be done with Option 1, if we are "allowed", then learn all the curiosities of that other platform and maintain it, just for one tiny single feature, that we could have with Option 1, if your discretion allows.

        So far option 2 has cost myself and another person the last 2 days work lost from doing anything else that we would have otherwise been progressing.

        OK, so we will learn another platform, and it might have some other useful features - but it is a forced situation based on platform owner decisions more than user needs.

        Sorry to share the frustrations upstream, but I just see extraordinary value from the simplicity of this being solved, versus vast amounts of unnecessary time from every Admin that might want to solve these time costs for their group or organisation Users.

        I cannot think of a single reason why anyone would not want this to be just a basic standard features. It's not as if the world didn't already agree LDAP is a solution. Now we have to get every LDAP platform to agree to allow it to talk to every other LDAP support platform too it seems.

        Web Design https://www.evergreen.je
        Development https://brandlight.org
        Life https://marcusquinn.com

        1 Reply Last reply
        0
        • marcusquinnM marcusquinn

          @fbartels Thanks - so far UCS is a long way from intuitive. I feel like I got invited around for dinner and pointed at the kitchen while everyone else already ate.

          It seems strange to have to install an App for Lets Encrypt, as in that should just be a standard feature enabled for all to use or ignore.

          I have a feeling we're going to have to start again with reimagine this VPS because guesswork setups and issues are costing way more time that expected.

          The world really doesn't like solving the obvious needs in obvious ways.

          Really appreciate the instructions as I'm tearing my hair out with now over a day on something that I really don't think should be this complicated.

          It's like we have to deal with developers that think: "Well, we could make that possible, but since no-one has explicitly campaigned for it, lets just say its possible but not actually solve it, so everyone has to either learn everything we already know, or spend more time convincing us to make something obvious, then we might think about."

          My only sanctuary in persevering with all this, is that with Microsoft, Google & AWS they'd also try and sell you some certified course nonsense as well before allowing you to play their specifically different ways.

          fbartelsF Offline
          fbartelsF Offline
          fbartels
          App Dev
          wrote on last edited by
          #39

          @marcusquinn said in LDAP/AD Server:

          so far UCS is a long way from intuitive

          Yes, I can imagine if you have no experience with windows domain administration there are a lot of foreign concepts in ucs. Plus its a system that has evolved over more than a decade by now so it lacks a few more modern approaches that Cloudron serves very well.

          On the other hand I always get too much already when only seeing a Wordpress login form 😄

          marcusquinnM 1 Reply Last reply
          1
          • marcusquinnM marcusquinn

            @fbartels Thanks - so far UCS is a long way from intuitive. I feel like I got invited around for dinner and pointed at the kitchen while everyone else already ate.

            It seems strange to have to install an App for Lets Encrypt, as in that should just be a standard feature enabled for all to use or ignore.

            I have a feeling we're going to have to start again with reimagine this VPS because guesswork setups and issues are costing way more time that expected.

            The world really doesn't like solving the obvious needs in obvious ways.

            Really appreciate the instructions as I'm tearing my hair out with now over a day on something that I really don't think should be this complicated.

            It's like we have to deal with developers that think: "Well, we could make that possible, but since no-one has explicitly campaigned for it, lets just say its possible but not actually solve it, so everyone has to either learn everything we already know, or spend more time convincing us to make something obvious, then we might think about."

            My only sanctuary in persevering with all this, is that with Microsoft, Google & AWS they'd also try and sell you some certified course nonsense as well before allowing you to play their specifically different ways.

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #40

            @marcusquinn said in LDAP/AD Server:

            @fbartels Thanks - so far UCS is a long way from intuitive. I feel like I got invited around for dinner and pointed at the kitchen while everyone else already ate.

            A bit off topic but I love your analogies 🙂

            1 Reply Last reply
            1
            • fbartelsF fbartels

              @marcusquinn said in LDAP/AD Server:

              so far UCS is a long way from intuitive

              Yes, I can imagine if you have no experience with windows domain administration there are a lot of foreign concepts in ucs. Plus its a system that has evolved over more than a decade by now so it lacks a few more modern approaches that Cloudron serves very well.

              On the other hand I always get too much already when only seeing a Wordpress login form 😄

              marcusquinnM Offline
              marcusquinnM Offline
              marcusquinn
              wrote on last edited by
              #41

              @fbartels I keep trying to forget my Windows years but it seems the rest of the world is still there 😅

              We'll keep plugging away at this. Considering all we're looking for is just one master LDAP server. It seems a ripe opportunity for Cloudron to be that. Having a whole other VPS, OS & Platform for a single feature is kinda inefficient, but then the other options all look like vendor-lockin options.

              Web Design https://www.evergreen.je
              Development https://brandlight.org
              Life https://marcusquinn.com

              1 Reply Last reply
              1
              • infogulchI infogulch

                @friep2 As a fellow regular user, could I ask you to elaborate a bit on why it would be inappropriate to package up the "open-source / self-developed" apps to run inside Cloudron directly? This is an honest question, I'm quite curious about how different people perceive the limits of Cloudron. I'm sure you have considered many different options for deployment.

                F Offline
                F Offline
                friep2
                wrote on last edited by
                #42

                @infogulch to be fair i did not look too much into the process of wrapping up apps in cloudron. if it's quite easy and flexible that could be an alternative for us 🙂

                Still, sometimes i guess it's just easier / more convenient to keep things separated and integrate via LDAP. E.g. in cases where you might not want to give people access to the cloudron server (which i suppose they'd need to deploy the app).

                1 Reply Last reply
                1
                • F Offline
                  F Offline
                  friep2
                  wrote on last edited by
                  #43

                  uff just having read the whole thread: i didn't want to open up a Pandoras box with my comment for anyone, especially @marcusquinn. 😄 Thanks for looking into it!!
                  it's definitely more a nice-to-have feature for our organisation, so its absence won't keep me from pursuing cloudron 🙂

                  marcusquinnM 1 Reply Last reply
                  1
                  • F friep2

                    uff just having read the whole thread: i didn't want to open up a Pandoras box with my comment for anyone, especially @marcusquinn. 😄 Thanks for looking into it!!
                    it's definitely more a nice-to-have feature for our organisation, so its absence won't keep me from pursuing cloudron 🙂

                    marcusquinnM Offline
                    marcusquinnM Offline
                    marcusquinn
                    wrote on last edited by
                    #44

                    @friep2 haha, someone has to be the lucky person to start any thread.

                    Just happens to be one I need to get to a "once and for all" solution now as it's a PITA without, nothing more frustrating than time wasted that doesn't need to be.

                    Making progress with the UCS setup alternative, and will try and post a step-by-step guide once we've gathered all those good pointers and followed it all through to working.

                    Web Design https://www.evergreen.je
                    Development https://brandlight.org
                    Life https://marcusquinn.com

                    1 Reply Last reply
                    0
                    • marcusquinnM Offline
                      marcusquinnM Offline
                      marcusquinn
                      wrote on last edited by
                      #45

                      OK, so we have Cloudron and Univention Corporate Server (UCS) connected and seemingly working.

                      A couple of questions:

                      1. "Automatically create users when they login to Cloudron" - is this just creating Cloudron Users when someone tries to login that has a USC login/pass but not yet a Cloudron User?
                      2. Is there any way to sync Cloudron Users upstream to UCS?
                      3. Does this support SSO?
                        • https://www.univention.com/blog-en/2018/06/one-password-for-all-services-and-networks-with-single-sign-on/

                      Web Design https://www.evergreen.je
                      Development https://brandlight.org
                      Life https://marcusquinn.com

                      luckowL fbartelsF 2 Replies Last reply
                      2
                      • marcusquinnM marcusquinn

                        OK, so we have Cloudron and Univention Corporate Server (UCS) connected and seemingly working.

                        A couple of questions:

                        1. "Automatically create users when they login to Cloudron" - is this just creating Cloudron Users when someone tries to login that has a USC login/pass but not yet a Cloudron User?
                        2. Is there any way to sync Cloudron Users upstream to UCS?
                        3. Does this support SSO?
                          • https://www.univention.com/blog-en/2018/06/one-password-for-all-services-and-networks-with-single-sign-on/
                        luckowL Offline
                        luckowL Offline
                        luckow
                        translator
                        wrote on last edited by
                        #46

                        @marcusquinn

                        1. It's only creates users in Cloudron, if the user exists in UCS. This is where the self-service platform comes in.
                        2. No. (not in my understanding of the external LDAP connection from Cloudron side).
                        3. good question 🙂 If you've tried it out, please share your wisdom with us.

                        Attention:

                        • The allowed characters for UCS & Cloudron users are different. You can create UCS users which never allowed to login into Cloudron because of the character limitations in Cloudron. https://docs.cloudron.io/user-management/#valid-usernames
                          Sorry I never managed a kind of policy to disallow special characters on UCS.
                        • The email address which Cloudron needs (without an email, the user doesn't exist) is labeled primary email addresson UCS side.

                        Pronouns: he/him | Primary language: German

                        1 Reply Last reply
                        2
                        • marcusquinnM marcusquinn

                          OK, so we have Cloudron and Univention Corporate Server (UCS) connected and seemingly working.

                          A couple of questions:

                          1. "Automatically create users when they login to Cloudron" - is this just creating Cloudron Users when someone tries to login that has a USC login/pass but not yet a Cloudron User?
                          2. Is there any way to sync Cloudron Users upstream to UCS?
                          3. Does this support SSO?
                            • https://www.univention.com/blog-en/2018/06/one-password-for-all-services-and-networks-with-single-sign-on/
                          fbartelsF Offline
                          fbartelsF Offline
                          fbartels
                          App Dev
                          wrote on last edited by
                          #47

                          @marcusquinn said in LDAP/AD Server:

                          Does this support SSO?

                          That is why I suggested to run UCS in your local network. You could SSO with Kerberos from your workstation and then be directly signed into configured saml and oidc applications (and Kerberos of course as well). This only has two downsides:

                          • their sso clashes with their lets encrypt app, which requires manual work after the first certificate has been retrieved.
                          • this all does not touch Cloudron anymore, except you mod applications on Cloudron for one of the above auth methods
                          1 Reply Last reply
                          3
                          • marcusquinnM Offline
                            marcusquinnM Offline
                            marcusquinn
                            wrote on last edited by
                            #48

                            Thank you both @luckow & @fbartels I feel this thread is a useful repo for gathering all the experience and getting this it's own Cloudron documentation.

                            We'll add anything we've learned and steps along the way to get whatever we can working.

                            Something I'm not sure that anyone knew before was that both Hetzner and Contabo will offer access to the custom ISO to install from if you ask them nicely and send them the correct public link to it.

                            Hetzner I know we can create a Network within, I've not needed to try that with Contabo yet though.

                            I've also learned about Proxmox, and that could be worthy of it's own dedicated how-to thread and documentation here, given the utility it can offer self-hosting on bare metal on premises or leased.

                            The community experience here is priceless!

                            Web Design https://www.evergreen.je
                            Development https://brandlight.org
                            Life https://marcusquinn.com

                            1 Reply Last reply
                            3
                            • fbartelsF Offline
                              fbartelsF Offline
                              fbartels
                              App Dev
                              wrote on last edited by
                              #49

                              Replying here since this is the largest collection of ldap specific topics on this forum.

                              My cloudron installation is around longer than the cloudron external ldap support. When configuring an external ldap users with a conflicting username (same username already exists on cloudron) get skipped on synchronisation. Which is generally a good thing. But I still wanted to transfer password management for some of these users to my ldap.

                              This can be done by running the following command from the shell of the cloudron host (only change the-user-i-want-to-change to the actual user):

                              mysql -uroot -ppassword -e 'update users set source="ldap" where username="the-user-i-want-to-change";'
                              
                              fbartelsF 1 Reply Last reply
                              6
                              • fbartelsF fbartels

                                Replying here since this is the largest collection of ldap specific topics on this forum.

                                My cloudron installation is around longer than the cloudron external ldap support. When configuring an external ldap users with a conflicting username (same username already exists on cloudron) get skipped on synchronisation. Which is generally a good thing. But I still wanted to transfer password management for some of these users to my ldap.

                                This can be done by running the following command from the shell of the cloudron host (only change the-user-i-want-to-change to the actual user):

                                mysql -uroot -ppassword -e 'update users set source="ldap" where username="the-user-i-want-to-change";'
                                
                                fbartelsF Offline
                                fbartelsF Offline
                                fbartels
                                App Dev
                                wrote on last edited by
                                #50

                                I have also made a writeup of this on my blog

                                luckowL 1 Reply Last reply
                                3
                                • girishG girish

                                  @robi said in LDAP/AD Server:

                                  VPN to Cloudron for LDAP is reasonable.

                                  I think that would then mean that the external app has to be in the VPN, no?

                                  LonkleL Offline
                                  LonkleL Offline
                                  Lonkle
                                  wrote on last edited by
                                  #51

                                  @girish said in LDAP/AD Server:

                                  @robi said in LDAP/AD Server:

                                  VPN to Cloudron for LDAP is reasonable.

                                  I think that would then mean that the external app has to be in the VPN, no?

                                  I'll be releasing my VPN Client for Cloudron over summer if that helps. 😅

                                  1 Reply Last reply
                                  0
                                  • fbartelsF fbartels

                                    I have also made a writeup of this on my blog

                                    luckowL Offline
                                    luckowL Offline
                                    luckow
                                    translator
                                    wrote on last edited by
                                    #52

                                    @fbartels Top post. Thank you.
                                    One (maybe) last question: do you have a solution for the different allowed characters in UCS and Cloudron usernames? My idea is to have some kind of profile with only allowed characters on the UCS side. See https://docs.cloudron.io/user-management/#valid-usernames for characters allowed in Cloudron.

                                    Pronouns: he/him | Primary language: German

                                    fbartelsF 1 Reply Last reply
                                    1
                                    • luckowL luckow

                                      @fbartels Top post. Thank you.
                                      One (maybe) last question: do you have a solution for the different allowed characters in UCS and Cloudron usernames? My idea is to have some kind of profile with only allowed characters on the UCS side. See https://docs.cloudron.io/user-management/#valid-usernames for characters allowed in Cloudron.

                                      fbartelsF Offline
                                      fbartelsF Offline
                                      fbartels
                                      App Dev
                                      wrote on last edited by
                                      #53

                                      Thanks @luckow

                                      Yes, I have seen the question that @BrutalBirdie posted at https://help.univention.com/t/restrict-username-allowed-characters/17280 as well. But no, I am not aware of a way to limit characters with the ucs self registration.

                                      1 Reply Last reply
                                      3
                                      • marcusquinnM Offline
                                        marcusquinnM Offline
                                        marcusquinn
                                        wrote on last edited by
                                        #54

                                        Related: https://forum.cloudron.io/topic/5636/quite-urgent-accessing-cloudron-ldap-from-an-external-instance-of-espocrm

                                        Web Design https://www.evergreen.je
                                        Development https://brandlight.org
                                        Life https://marcusquinn.com

                                        1 Reply Last reply
                                        0
                                        • fbartelsF Offline
                                          fbartelsF Offline
                                          fbartels
                                          App Dev
                                          wrote on last edited by fbartels
                                          #55

                                          Not sure if it was already mentioned here, but there is https://github.com/mitchellurgero/cloudron-ldap-proxy by @murgero. It's downside is however that the connection is not encrypted.

                                          A potential improvement over this would be to have a small app, that generates a custom ssl ca and serves its root cert over a small webserver. Then you use the same ca to provide a certificate to stunnel, which simply passes through the otherwise internal Cloudron ldap.

                                          Then at least the communication would be secured, but it may still be an idea to limit who can actually reach that port through your firewall.

                                          As a custom build this is quite easily doable, as an official app its probably too special.

                                          marcusquinnM 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search