LDAP Setup for Discourse


(pprp) #1

Hi,

I have followed and added almost every thing (LDAP plugin and LDAP configuration at /admin/site_settings/category/ldap) as per below links to set up LDAP for Discourse:


But I still can’t see LDAP option in login page UI.

Could you please let me know, if any other instructions need to follow… ? to get the LDAP option in login page.

Thank you.


(pprp) #2

Hi,

I can directly access with “https://discourse-xxx.xxx/auth/ldap” for LDAP login, but I don’t see LDAP pop up after clicking on login button ( as shown in below screen shot).

Can any one please let me know if I will need to modify the Login form in the initial Discourse page to include an extra button that can allow me to redirect to “https://discourse-xxx.xx/auth/ldap”.

I have installed Discourse in Ubuntu Ubuntu 16.04.3 server and the Discourse version is v2.0.0.beta10


(Michael Friedrich) #3

Did you disable local logins like shown here? This is what we use in a setup.


(pprp) #4

Hi, Thanks very much for the response.

When i disable local login (unchecked " enable local logins" option) and clicking on login button, and I got below blank pop up.


(Rafael dos Santos Silva) #5

Did you enable the LDAP plugin and did the basic configuration?


(pprp) #6

Hi,

Thank you.

Yes, I have enabled the LDAP plugin and did the basic configuration, which is why I was able to do LDAP authentication with direct URL (“https://discourse-xxx.xxx/auth/ldap” )as mentioned in above posts.


(Rafael dos Santos Silva) #7

Can you restart the docker container ( ./launcher restart app ) ?


(pprp) #8

Hi,

I did restart the docker container as suggested, but it still does not work.


(Michael Friedrich) #9

Browser dev console has some errors or hints on the matter?


(pprp) #10

Hi, Thank you for the hint.

I checked by cliking F12 in google chrome, and it has below errors in home page: image

Uncaught TypeError: Cannot read property ‘addPreProcessor’ of undefined
at _plugin-third-party-bbf5e2e3e7e7a22c7391a8d01a610ce18dd03367259d13426ed3751e26a14552.js:23
at _plugin-third-party-bbf5e2e3e7e7a22c7391a8d01a610ce18dd03367259d13426ed3751e26a14552.js:24


(Michael Friedrich) #11

Which version of Discourse is installed?


(pprp) #12

Installed version:

v2.0.0.beta10 +230


(Rafael dos Santos Silva) #13

So it looks like you are using a third-party plugin that is broken. And it’s not the LDAP one.

Can you try safe-mode ?


(sepideh Javdani) #14

Hi,
I think we might have modify site_setting.yml to be able to see login with ldap button.
Do you know any idea?


(Michael Friedrich) #15

We don’t have that in our setup. The JS error should be solved, that’s probably causing the page to not render properly.

@pprp
Please share the installed plugin lines from your app.yml and any modifications you’ve made to your theme with custom JS in the header, footer, etc. sections.


(sepideh Javdani) #16

Plugins go here

see https://meta.discourse.org/t/19157 for details

hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/discourse/discourse-solved.git
- git clone https://github.com/Jake-Shadle/discourse_jira.git
- git clone https://github.com/PoloGT/abbreviation-discourse-plugin.git
- git clone https://github.com/jonmbake/discourse-ldap-auth.git
- git clone https://github.com/ShaohuaSmile/discourse-jira.git


(sepideh Javdani) #17

where is files for " your theme with custom JS in the header, footer, etc. sections." ?


(Michael Friedrich) #18

Not sure why you are answering instead of @pprp here, is that a colleague of yours?


(sepideh Javdani) #19

yes I am his colleague.


(Michael Friedrich) #20

I’d say you disable the jira and abbreviation plugins one by one and try to eliminate the error (each line removal with an app rebuild). Those plugins look dated, last commit was 2016. Not sure if they’re still compatible with Discourse, nor if they’re supported.

The abbreviation and jira onebox plugins for example were moved to #plugin:broken-plugin in 2016.

Theme customization happens in the frontend in your admin console, /admin/customize/themes. I doubt that this helps though as you’re using plugins which seem broken.