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. Discourse
  3. How to configure LDAP in Discourse?

How to configure LDAP in Discourse?

Scheduled Pinned Locked Moved Unsolved Discourse
25 Posts 5 Posters 4.8k Views 8 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.
  • jimcavoliJ Offline
    jimcavoliJ Offline
    jimcavoli
    App Dev
    wrote on last edited by
    #2

    This was the app that I had running via cloudron OAuth that got broken! I knew there was one...this has just become a bit of a problem for me too

    1 Reply Last reply
    0
    • jimcavoliJ Offline
      jimcavoliJ Offline
      jimcavoli
      App Dev
      wrote on last edited by
      #3

      If the LDAP add-on is enabled for the app at least, it should be able to bind and authenticate even if it means manually copying credentials. I may have to steal them from another app (bad!) in the mean time though since I'm getting complaints from users

      1 Reply Last reply
      0
      • jimcavoliJ Offline
        jimcavoliJ Offline
        jimcavoli
        App Dev
        wrote on last edited by
        #4

        It would also be pretty trivial for me to fork and update this plugin to work more automatically with limited configuration for cloudron specifically and cleaning up things like that en_US.login.ldap.name which is an i18n key

        1 Reply Last reply
        0
        • yusfY Offline
          yusfY Offline
          yusf
          wrote on last edited by yusf
          #5

          @jimcavoli said in How to configure LDAP in Discourse?:

          fork and update this plugin to work more automatically

          Do you mean that you would be able to address the non-automatic account creation?

          jimcavoliJ 1 Reply Last reply
          0
          • yusfY yusf

            @jimcavoli said in How to configure LDAP in Discourse?:

            fork and update this plugin to work more automatically

            Do you mean that you would be able to address the non-automatic account creation?

            jimcavoliJ Offline
            jimcavoliJ Offline
            jimcavoli
            App Dev
            wrote on last edited by
            #6

            @yusf I'm not gonna say yes at this point since syncing requires some sort of cron-like setup and I'm just not sure how involved that would be - I mostly meant reading those settings in from the LDAP add-on without having to copy them into the admin UI from the app's console.

            I wouldn't rule it out, but if we could get that to be the only outstanding "issue" it strikes me that would be substantial progress for a start

            1 Reply Last reply
            1
            • yusfY Offline
              yusfY Offline
              yusf
              wrote on last edited by yusf
              #7

              I see. I don't know where the plugin data is stored but I suppose the official package can be modified to include the LDAP addon, the plugin and its settings.

              My personal incentive however, is to improve the experience for users (wrt the bullets above). Package automation can come later.

              1 Reply Last reply
              0
              • jimcavoliJ Offline
                jimcavoliJ Offline
                jimcavoli
                App Dev
                wrote on last edited by
                #8

                Gets a little technical about ruby and how discourse manages the plugins, but that all sort of goes hand-in-hand. Depending how the next day or two go, I'll see about doing something that we can use in order to keep the conversation moving and have a base to tackle some of those features from. Appreciate the context of your goals; I'll bear that in mind when the code starts flying πŸ™‚

                yusfY 1 Reply Last reply
                2
                • jimcavoliJ jimcavoli

                  Gets a little technical about ruby and how discourse manages the plugins, but that all sort of goes hand-in-hand. Depending how the next day or two go, I'll see about doing something that we can use in order to keep the conversation moving and have a base to tackle some of those features from. Appreciate the context of your goals; I'll bear that in mind when the code starts flying πŸ™‚

                  yusfY Offline
                  yusfY Offline
                  yusf
                  wrote on last edited by
                  #9

                  @jimcavoli Did any code start flying? πŸ˜‰

                  jimcavoliJ 1 Reply Last reply
                  1
                  • yusfY yusf

                    @jimcavoli Did any code start flying? πŸ˜‰

                    jimcavoliJ Offline
                    jimcavoliJ Offline
                    jimcavoli
                    App Dev
                    wrote on last edited by
                    #10

                    @yusf Not as of yet...last few weeks have been very long hours for me on a litany of other things. I'll hopefully be getting some time back in a week or two

                    1 Reply Last reply
                    2
                    • yusfY Offline
                      yusfY Offline
                      yusf
                      wrote on last edited by
                      #11

                      @girish Can we have the Discourse app updated with LDAP addon included in the Cloudron manifest? (MR here)

                      1 Reply Last reply
                      1
                      • girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by
                        #12

                        Were the issues related to account creation sorted out?

                        yusfY 1 Reply Last reply
                        0
                        • girishG girish

                          Were the issues related to account creation sorted out?

                          yusfY Offline
                          yusfY Offline
                          yusf
                          wrote on last edited by
                          #13

                          @girish It was not. As mentioned earlier I did some light digging into the issue but as you can see in this issue that is where it's at currently.

                          I figured there's no harm in enabling the Cloudron LDAP addon in the package but I realize that as maintainer you may have another view on that matter.

                          1 Reply Last reply
                          0
                          • girishG Offline
                            girishG Offline
                            girish
                            Staff
                            wrote on last edited by
                            #14

                            @yusf If I understand the current situation, if the LDAP plugin is enabled:

                            • User logs in.
                            • User sees a screen to 'create new account'. User has to just click through.

                            Is this the case? If so, that does not seem like a major issue.

                            yusfY 1 Reply Last reply
                            0
                            • girishG girish

                              @yusf If I understand the current situation, if the LDAP plugin is enabled:

                              • User logs in.
                              • User sees a screen to 'create new account'. User has to just click through.

                              Is this the case? If so, that does not seem like a major issue.

                              yusfY Offline
                              yusfY Offline
                              yusf
                              wrote on last edited by
                              #15

                              @girish That's correct. There are more oddities around depending on what default use case you would go with for the package. (walled garden, open registration+ldap etc)

                              1 Reply Last reply
                              0
                              • girishG Offline
                                girishG Offline
                                girish
                                Staff
                                wrote on last edited by
                                #16

                                @yusf To keep you updated, I looked into this a bit further. The issue is that when we add ldap as addon, Cloudron UI selects this as the default. For an app like discourse, using LDAP is uncommon since it's mostly a publicly forum use case.

                                I think before we add LDAP support to nodebb/discourse etc, we need to fix Cloudron to support "dynamic addons". This way one can toggle LDAP support on/off whenever they want. That's the best way to fix this. Otherwise, I suspect, people will blindly install Discourse with LDAP, then disable LDAP inside Discourse and this will only lead to problems (since in Cloudron packages currently we assume that LDAP support is never removed like that inside an app).

                                yusfY jdaviescoatesJ 3 Replies Last reply
                                3
                                • girishG girish

                                  @yusf To keep you updated, I looked into this a bit further. The issue is that when we add ldap as addon, Cloudron UI selects this as the default. For an app like discourse, using LDAP is uncommon since it's mostly a publicly forum use case.

                                  I think before we add LDAP support to nodebb/discourse etc, we need to fix Cloudron to support "dynamic addons". This way one can toggle LDAP support on/off whenever they want. That's the best way to fix this. Otherwise, I suspect, people will blindly install Discourse with LDAP, then disable LDAP inside Discourse and this will only lead to problems (since in Cloudron packages currently we assume that LDAP support is never removed like that inside an app).

                                  yusfY Offline
                                  yusfY Offline
                                  yusf
                                  wrote on last edited by
                                  #17

                                  @girish Seems like an apt solution to the problem. Thanks for looking into it.

                                  For what it’s worth I’m often faced with the opposite use-case: some group need internal forum software, apart from other Cloudron services. So I’m interested in doing the same thing with NodeBB.

                                  1 Reply Last reply
                                  2
                                  • girishG girish

                                    @yusf To keep you updated, I looked into this a bit further. The issue is that when we add ldap as addon, Cloudron UI selects this as the default. For an app like discourse, using LDAP is uncommon since it's mostly a publicly forum use case.

                                    I think before we add LDAP support to nodebb/discourse etc, we need to fix Cloudron to support "dynamic addons". This way one can toggle LDAP support on/off whenever they want. That's the best way to fix this. Otherwise, I suspect, people will blindly install Discourse with LDAP, then disable LDAP inside Discourse and this will only lead to problems (since in Cloudron packages currently we assume that LDAP support is never removed like that inside an app).

                                    jdaviescoatesJ Offline
                                    jdaviescoatesJ Offline
                                    jdaviescoates
                                    wrote on last edited by
                                    #18

                                    @girish said in How to configure LDAP in Discourse?:

                                    For an app like discourse, using LDAP is uncommon since it's mostly a publicly forum use case.

                                    Even in those cases it'd still be nice to have LDAP, like we can in Rocket.Chat right now, i.e. Cloudron uses can use LDAP to login to Rocket.Chat using their Clourdon credentials, and non-Cloudron users can just register and login as normal too.

                                    I'd like the same UX for Discourse too, best of both worlds! πŸ™‚

                                    I use Cloudron with Gandi & Hetzner

                                    1 Reply Last reply
                                    1
                                    • girishG girish

                                      @yusf To keep you updated, I looked into this a bit further. The issue is that when we add ldap as addon, Cloudron UI selects this as the default. For an app like discourse, using LDAP is uncommon since it's mostly a publicly forum use case.

                                      I think before we add LDAP support to nodebb/discourse etc, we need to fix Cloudron to support "dynamic addons". This way one can toggle LDAP support on/off whenever they want. That's the best way to fix this. Otherwise, I suspect, people will blindly install Discourse with LDAP, then disable LDAP inside Discourse and this will only lead to problems (since in Cloudron packages currently we assume that LDAP support is never removed like that inside an app).

                                      yusfY Offline
                                      yusfY Offline
                                      yusf
                                      wrote on last edited by
                                      #19

                                      @girish And meanwhile if I want to go venture off with a forked Discourse app with the only difference being that the LDAP addon is added, I should be able to stay compatible with the official one within foreseeable future, right?

                                      1 Reply Last reply
                                      1
                                      • girishG Offline
                                        girishG Offline
                                        girish
                                        Staff
                                        wrote on last edited by
                                        #20

                                        @yusf Yes, it should remain compatible. I haven't gotten time to updating the Dockerfile to have the LDAP plugin pre-installed and pre-configured. If you have the code for that, I can look into merging it.

                                        jdaviescoatesJ 1 Reply Last reply
                                        2
                                        • girishG girish

                                          @yusf Yes, it should remain compatible. I haven't gotten time to updating the Dockerfile to have the LDAP plugin pre-installed and pre-configured. If you have the code for that, I can look into merging it.

                                          jdaviescoatesJ Offline
                                          jdaviescoatesJ Offline
                                          jdaviescoates
                                          wrote on last edited by jdaviescoates
                                          #21

                                          @girish yet another reason for having the LDAP plugin for Discourse pre-installed and pre-configured on Cloudron would be so that we can start to try and reverse engineer the new Discourse Teams as much as possible (sadly it's not all open source, although as I understand it lots of the features are just using open source plugins)

                                          More info about the difference between Discourse and Discourse Teams:

                                          https://support.teams.discourse.com/docs?topic=85
                                          https://meta.discourse.org/t/comparing-discourse-for-teams-with-discourse/168423/7

                                          Edit: and following my prompts they've now added the list of open source plugins they use in Teams to that support link, i.e.

                                          Ships with the following official plugins: akismet, assign, cakeday, calendar, chat-integration, checklist, code-review, docs, encrypt, footnote, github, graphviz, math, openid-connect, policy, rss-polling, solved, spoiler-alert

                                          I use Cloudron with Gandi & Hetzner

                                          1 Reply Last reply
                                          1
                                          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