gocd / gocd/gocd-ldap-authentication-plugin

LDAP users are keyed against the wrong username.

Open
#133 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7
Forks
13
Avg merge
21m
Merged PRs (30d)
2

Description

##### Issue Type

- Bug Report
- Feature enhancement

##### Summary

When using the LDAP authentication plugin, users are keyed against the wrong username.

###### Basic environment details

GoCD Version: 20.7.0 (12097-f4f86ca8d433edaf9235ed92790c11e19d7be4ed).
LDAP Plugin: LDAP Authentication Plugin for GoCD v2.0.1-90 (bundled)

##### Steps to Reproduce

1. Setup LDAP plugin to accept both mail or uid `(|(uid={0})(mail={0}))` connected to a directory at `example.com`.
2. Login with email (nick@example.com)
3. Logout
4. Login with uid (nick)
5. Notice that two users have been created

##### Expected Results

I would expect users to be created with a username equal to their uid attribute.
Specifying either mail or uid (or any combination supported by the user filter) at login would log you into the same user.

##### Actual Results

Users are created with usernames equal to the value entered into the username field at login.
A user is created for each variant supplied in the login field, even if mapped to the same LDAP user.

##### Possible Fix

* Use the LDAP `uid` attribute to key users, rather than the user-supplied value.
* Alternatively, supply a config option on the plugin to specify how the username field should be filled.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the LDAP authentication flow described: log in with nick@example.com, then nick, against a filter accepting both mail and uid. Inspect the plugin's LDAP lookup and user-creation path; done means both login forms resolve to one user keyed by the LDAP uid, with the chosen configuration behavior covered by verification.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.