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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved How to enable LDAP support in LAMP app?

    LAMP
    ldap
    7
    13
    1077
    Loading More Posts
    • 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.
    • subven
      subven last edited by girish

      I'm a bit confused...

      At first I thought LDAP is enabled in LAMP out of the box. This seems not the case and LDAP is not mentioned in the LAMP app documentation. According to the documentation, LDAP is available as addon and can be activated in the "CloudronManifest.json". So far so good.

      When browsing the appsdata folder I just found a config.json for LAMP with seems to be analog to CloudronManifest.json. I enabled LDAP addon there and restarted the app. But...it seems not to work this way. When I search for the exposed LDAP variables with env inside the LAMP terminal I only get mysql, redis and so on.

      What do I miss? My goal is to have LDAP variables exposed as environment variables to use it it within my configuration.

      Context: I try to use LDAP module of freescout

      1 Reply Last reply Reply Quote 1
      • nebulon
        nebulon Staff last edited by

        You are right, the LDAP addon is not enabled for the LAMP app. The manifest is also coming from the app package itself and changing that in hindsight as you explained does not change anything. The only way to solve this is, if we release a new LAMP app with LDAP enabled. I will discuss this with @girish to check if there are any obvious issues with it. As far as I remember, it was not put there, to avoid random php scripts getting hold of the username+password during logins. But maybe this is not actually a real concern.

        1 Reply Last reply Reply Quote 0
        • subven
          subven last edited by subven

          Okay I see. I found https://cloudron.io/blog/2017-02-27-lamp.html and it stated that LDAP is enabled by default. Your explanation makes sense but I ask myself if I'm the first one who stumbled over this. It would be nice but not crucial. Would it be possible to make features like ldap, redis etc adjustable by checkbox within the app configuration?

          murgero 1 Reply Last reply Reply Quote 0
          • murgero
            murgero App Dev @subven last edited by

            @subven I needed this for a PHP app and I just built a custom LAMP app for personal development, but if the official LAMP app got LDAP (or maybe a version of the app that has it enabled in the same likeness of how wordpress and unmanaged wordpress have different apps) it would be nice since so many self-hosted options are PHP and ldap is almost always a must have.

            --
            https://urgero.org
            ~ Professional Nerd. Freelance Programmer. ~
            Matrix: @murgero:urgero.org

            Lonkle 1 Reply Last reply Reply Quote 0
            • Lonkle
              Lonkle @murgero last edited by

              @murgero said in How to enable LDAP support in LAMP app?:

              @subven I needed this for a PHP app and I just built a custom LAMP app for personal development, but if the official LAMP app got LDAP (or maybe a version of the app that has it enabled in the same likeness of how wordpress and unmanaged wordpress have different apps) it would be nice since so many self-hosted options are PHP and ldap is almost always a must have.

              Do you have the code for this. I'm making a custom LAMP app and can't seem to get the LDAP environment variables to show up despite adding this to CloudronManifest.json:

                "addons": {
                  "localstorage": {},
                  "mysql": {},
                  "ldap": {}
              

              This getenv("CLOUDRON_LDAP_SERVER") still shows up as null? Did I miss a step?

              1 Reply Last reply Reply Quote 0
              • Lonkle
                Lonkle last edited by Lonkle

                After way too long debugging this, I've come to realize that I needed to uninstall the app and re-install it as cloudron update does not initialize those environment variables.

                Works perfectly now. #thelittlethings

                girish 1 Reply Last reply Reply Quote 3
                • girish
                  girish Staff @Lonkle last edited by

                  @Lonk said in How to enable LDAP support in LAMP app?:

                  After way too long debugging this, I've come to realize that I needed to uninstall the app and re-install it as cloudron update does not initialize those environment variables.

                  Correct! The "ldap" bit can only be set/unset at first install time. This is something we need to look into making it more dynamic in future releases.

                  Lonkle 1 Reply Last reply Reply Quote 1
                  • Lonkle
                    Lonkle @girish last edited by

                    @girish said in How to enable LDAP support in LAMP app?:

                    @Lonk said in How to enable LDAP support in LAMP app?:

                    After way too long debugging this, I've come to realize that I needed to uninstall the app and re-install it as cloudron update does not initialize those environment variables.

                    Correct! The "ldap" bit can only be set/unset at first install time. This is something we need to look into making it more dynamic in future releases.

                    I can't believe I didn't think of update being different than install in an add-on sense - but little things like that have to be weighed out on what's easiest for the developer (the minority) vs what's most efficient (what customer's, being the majority notice) as to what to cache in containers or not. So, I get it.

                    1 Reply Last reply Reply Quote 0
                    • imc67
                      imc67 translator last edited by

                      @girish and @nebulon I just noticed that LDAP is still not in this app? Can we or when can we expect this?

                      I really need Resourcespace (https://forum.cloudron.io/topic/2036/resourcespace-digital-asset-management-dam) and was thinking of installing it manually in LAMP. However I need to have LDAP to authenticate the 30 users of our Cloudron.

                      mehdi girish 2 Replies Last reply Reply Quote 1
                      • mehdi
                        mehdi App Dev @imc67 last edited by

                        @imc67 Should be quite easy to put it in a custom app. Plus, you'd gain a nice App Dev badge 😛

                        imc67 1 Reply Last reply Reply Quote 0
                        • imc67
                          imc67 translator @mehdi last edited by

                          @mehdi said in How to enable LDAP support in LAMP app?:

                          Plus, you'd gain a nice App Dev badge

                          well, I consider myself more as an experienced user, administrator, manager than a App Dev like you professionals are 🙂

                          1 Reply Last reply Reply Quote 0
                          • girish
                            girish Staff @imc67 last edited by

                            @imc67 said in How to enable LDAP support in LAMP app?:

                            @girish and @nebulon I just noticed that LDAP is still not in this app? Can we or when can we expect this?

                            SFTP change has been made for 6.0 already. So, I think we can make the LAMP app have LDAP support already. There is of course a small window between now and release of Cloudron 6 where non-admins can have SFTP access, so it's something to be aware of (guess it's not much of a worry for LAMP app anyway).

                            1 Reply Last reply Reply Quote 1
                            • girish
                              girish Staff last edited by

                              The latest LAMP app now has LDAP addon enabled. For existing installations, LDAP will still be off (sorry).

                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post
                              Powered by NodeBB