Integrate an LDAP account database with Taiga

The hacky solution I’m currently thinking of:

The taiga-docker setup uses an Nginx reverse proxy (taiga-gateway) that handles all the HTTP requests. You could probably configure Nginx to redirect /forgot-password to the link to reset the LDAP password.

Untested setup instructions

  1. I assume you have the taiga-docker repository cloned somewhere on the server you’re hosting Taiga on.

  2. Edit the file taiga-gateway/taiga.conf in that repository: Insert the following things above # Frontend:

    location /forgot-password {
        return https://example.com/wherever-your-password-reset-page-is
    }
    
  3. Replace https://example.com/wherever-your-password-reset-page-is with the URL of the password reset page you want to use

  4. Use docker compose down; docker compose up -d to restart

I haven’t tested the instructions, but this is what I’d try.

1 Like

Thank you, i will try this and update you! we are using nginx, but not dockerized but i think it is very good trick and should work

1 Like

There is no “easy” way that does not involve a rebuild of the code of the frontend and a rebuild of the customized taiga-front docker image.

Using the taiga-gateway, or an external nginx, to do the “magic” seems the most straightforward solution.

Above technique worked now forgot password redirects to our required page! thanks

1 Like

Hi dear @TuringTux

I have recently installed Taiga updated version 6.7, this LDAP plugins is loaded but i am not able to login with ldap credentials. No logs observed. Same plugin is working on our taiga 6.5.

can your please advice

I just checked my instance, I think I am running Taiga 6.7.0 (via Docker).

I have intermittent login problems, which are fixed for a short while if I recreate the containers. I haven’t yet had time to investigate this more closely.

If restarting the entire instance fixes login for you, we might have the same problem.

Good day, can I ask you for help in solving the integration of Ldap and taiga? I looked through your instructions, but unfortunately I did not achieve success

Hello!

Sure, I can try to help you to the extent I’m capable.

What exactly have you done? Which commands did you execute? Do you have a link to the guide you followed?

Are there any error messages or logs you can share?

Hi bro,

Restartin

Hi bro,

I have restarted the VPS, but it does not solve my problem. No ldap related logs are being generated

LDAP Configuration in config.py

INSTALLED_APPS += [“taiga_contrib_ldap_auth_ext”]
LDAP_SERVER = “ldap://sso.mydomain.com”
LDAP_PORT = 389
LDAP_BIND_DN = “CN=admin,DC=mydomain,DC=com”
LDAP_BIND_PASSWORD = “password”
LDAP_SEARCH_BASE = ‘OU=people,DC=mydomain,DC=com’
LDAP_USERNAME_ATTRIBUTE = “uid”
LDAP_EMAIL_ATTRIBUTE = “mail”
LDAP_FULL_NAME_ATTRIBUTE = “cn”
LDAP_SAVE_LOGIN_PASSWORD = False
LDAP_MAP_USERNAME_TO_UID = None

Hi Turing
i have deployed latest taiga on my server i also want to set up ldap plugin on it i have followed the same procedure as above but no success

Hi @Anzal_Ahmed,

what exactly did you do? Can I see your configuration files, maybe log files or a screenshot of the error message?

I haven’t yet come around to adding more logging (cc @Zohaib09, I haven’t forgotten about your problem), so I’m afraid I’ll probably have to stick to poking into the dark, sorry.

Kind regards
TuringTux

sure @TuringTux
Firstly I excecuted

source venv/bin/activate (using taiga user)

then I run
pip install git+https://github.com/TuringTux/taiga-contrib-ldap-auth-ext-2.git

Here is my config.py
INSTALLED_APPS += [“taiga_contrib_ldap_auth_ext”]
LDAP_SERVER = “ldap://LDAP_SERVER_IP”
LDAP_PORT = LDAP_PORT_NUMBER
LDAP_BIND_DN = “CN=admin,DC=mydomain,DC=tech”
LDAP_BIND_PASSWORD = “my_LDAP_PASSWORD”
LDAP_SEARCH_BASE = ‘OU=people,DC=mydomain,DC=tech’
LDAP_USERNAME_ATTRIBUTE = “uid”
LDAP_EMAIL_ATTRIBUTE = “mail”
LDAP_FULL_NAME_ATTRIBUTE = “cn”
LDAP_SAVE_LOGIN_PASSWORD = False
LDAP_MAP_USERNAME_TO_UID = None

after that
sudo systemctl restart taiga
No progress!

Hi @Anzal_Ahmed,

your backend config looks fine (although you can also just use pip install taiga-contrib-ldap-auth-ext to install the package).

Have you adjusted the frontend configuration (see https://github.com/Monogramm/taiga-contrib-ldap-auth-ext/blob/master/README.md#taiga-front-1)?

If not, that might be the reason why it doesn’t work.

Kind regards
TuringTux