Skip to content

Commit 0835076

Browse files
first versio of doc for option to disable login with empty pass
1 parent 00312f6 commit 0835076

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

  • docs/admin-manual/auth/authentication

docs/admin-manual/auth/authentication/ldap.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ In LDAP, data is organized in a tree structure. Here's an example of a typical L
5757
ldap_group_basedn = ou=group,o=emr
5858
# specify ldap_use_ssl to true to use to switch to secured LDAPS protocol, specify false or comment property to use default behavior with plain LDAP
5959
ldap_use_ssl = true
60+
# specify ldap_allow_empty_pass to false to prohibit login with non specified LDAP password, specify true or comment property to use default behavior and allow login with empty LDAP password
61+
ldap_allow_empty_pass = false
6062
```
6163
6264
> To enable LDAPS (encrypted connection to the LDAP server), see the [LDAPS (Encrypted Connection)](#ldaps-encrypted-connection) section below.
@@ -136,6 +138,12 @@ LDAP authentication means password verification through LDAP service to suppleme
136138
2. If the user doesn't exist in LDAP, it falls back to Doris local password verification.
137139
3. If the LDAP password is correct but there's no corresponding account in Doris, a temporary user is created for login.
138140
141+
> Note on Empty Passwords:
142+
>
143+
> By default, Doris allows login with an empty password if the user exists in LDAP (`ldap_allow_empty_pass = true`).
144+
> This behavior can be disabled by setting `ldap_allow_empty_pass = false` in `ldap.conf`.
145+
> With such setting Doris will reject all login attempts with empty password and return an error message.
146+
139147
### Login Behavior Overview
140148
141149
After enabling LDAP, login behaviors under different user states are as follows:
@@ -144,8 +152,11 @@ After enabling LDAP, login behaviors under different user states are as follows:
144152
| --------- | ---------- | ------------- | ------------ | -------------- |
145153
| Exists | Exists | LDAP password | Success | Doris user |
146154
| Exists | Exists | Doris password | Failed | - |
155+
| Exists | Exists | Empty password | Success if `ldap_allow_empty_pass = true`, otherwise Failed | Doris user (if allowed) |
147156
| Not exists | Exists | Doris password | Success | Doris user |
148157
| Exists | Not exists | LDAP password | Success | LDAP temporary user |
158+
| Exists | Not exists | Empty password | Success if `ldap_allow_empty_pass = true`, otherwise Failed | LDAP temporary user (if allowed) |
159+
149160
150161
> **About Temporary Users:**
151162
>
@@ -154,6 +165,12 @@ After enabling LDAP, login behaviors under different user states are as follows:
154165
> - Temporary user permissions are determined by LDAP group authorization (see "Group Authorization" section below).
155166
> - If temporary users have no corresponding group permissions, they default to `select_priv` on `information_schema`.
156167
168+
> **About Empty Password Security:**
169+
>
170+
> The ldap_allow_empty_pass configuration provides additional security control:
171+
> When `true` (default): Users can accidentally or intentionally log in without a password, which might be convenient for development environments but poses security risks in production.
172+
> When `false`: Empty passwords are strictly rejected, ensuring all users must provide valid credentials. This is recommended for production environments to prevent unauthorized access.
173+
157174
### Login Examples
158175
159176
The following examples assume LDAP authentication is enabled, configured with `ldap_user_filter = (&(uid={login}))`, and the client has set `LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN=1`.
@@ -303,6 +320,7 @@ You can refresh the cache with the `refresh ldap` statement. See [REFRESH-LDAP](
303320

304321
- Doris's LDAP functionality only supports cleartext password verification for the client-to-FE segment, meaning that when users log in, passwords are transmitted in plaintext between `client` and `fe`. SSL/TLS encryption between the client and Doris FE must be configured separately (see [Client Connection](#step-2-client-connection)).
305322
- For the FE-to-LDAP segment, the connection is unencrypted by default (`ldap_use_ssl = false`). To encrypt this segment, set `ldap_use_ssl = true` to use LDAPS (see [LDAPS (Encrypted Connection)](#ldaps-encrypted-connection)).
323+
- Empty password behavior: By default, Doris allows login with an empty password if the user exists in LDAP (`ldap_allow_empty_pass = true`). This can be disabled by setting `ldap_allow_empty_pass = false` in `ldap.conf`.
306324

307325
## FAQ
308326

0 commit comments

Comments
 (0)