LDAP Setup for Discourse

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.

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

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

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.

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

2 Likes

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.

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

3 Likes

Hi,

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

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

1 Like

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

Which version of Discourse is installed?

Installed version:

v2.0.0.beta10 +230

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 ?

1 Like

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

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.

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

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

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

yes I am his colleague.

1 Like

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.