# Feature OP-17668 - LDAP: Support bind-as-user when leaving system bind DN and password empty in settings

Project: OpenProject
Status: new
URL: https://community.openproject.org/work_packages/OP-17668

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Low |
| Target versions | Wish List |
| Sprint |  |
| Backlog bucket |  |
| Votes | 1 |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Authentication / LDAP |
| Feature Flag |  |
| Requires doc change | Yes |
| Enterprise plan | Community (COM) |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Feature Lead |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**As** a system integrator  
**I want to** be able to use OpenProject's LDAP feature without an LDAP system user on LDAP servers that support bind-as-user  
**so that** accounts can be created automatically on first login using just the user's credentials - without having to create an LDAP system user for OpenProject

**Technical notes**

Servers that support bind-as-user allow doing the initial connection bind before the user search with the credentials of the user attempting to log in instead of a system user. There may not even be a read-only system user configured at all.

**Implementation**

Adding support for this could be as simple as switching to the user credentials in the authenticate() method in apps/models/ldap\_auth\_source.rb if no system user bind information has been supplied in the configuration for the LDAP auth source:

> if account.blank? && account\_password.blank?  
>     Rails.logger.debug { "Attempting LDAP bind-as-user for '\#{login}'" }  
>     self.account = login  
>     self.account\_password = password  
> end

**Permissions and visibility considerations**

  - *This feature could be visible on the LDAP auth source configuration page merely as documentation for the system user bind fields. I.e. "Leaving these fields empty will instead attempt to bind using the user supplied credentials (bind-as-user)"*

**Translation considerations**

  - "bind-as-user" has many different names depending on the environment (ActiveDirectory, other LDAP etc.) so it may not be optimal to use that name for the feature

**Out of scope**

  - Other features may require a system bind user and would need to be disabled if it isn't available (i.e. cron-based LDAP group updates, ...)
