Skip to content

Commit 4d72bc4

Browse files
authored
[Fix-17797][Helm] fix broken LDAP auth and missing search filter (#17802)
1 parent 04af57c commit 4d72bc4

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

deploy/kubernetes/dolphinscheduler/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,9 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
306306
| security.authentication.ldap.ssl.jksbase64content | string | `""` | LDAP jks file base64 content. If you use macOS, please run `base64 -b 0 -i /path/to/your.jks`. If you use Linux, please run `base64 -w 0 /path/to/your.jks`. If you use Windows, please run `certutil -f -encode /path/to/your.jks`. Then copy the base64 content to below field in one line |
307307
| security.authentication.ldap.ssl.truststore | string | `"/opt/ldapkeystore.jks"` | LDAP jks file absolute path, do not change this value |
308308
| security.authentication.ldap.ssl.truststorepassword | string | `""` | LDAP jks password |
309-
| security.authentication.ldap.urls | string | `"ldap://ldap.forumsys.com:389/"` | LDAP urls |
310-
| security.authentication.ldap.user.admin | string | `"read-only-admin"` | Admin user account when you log-in with LDAP |
309+
| security.authentication.ldap.url | string | `"ldap://ldap.forumsys.com:389/"` | LDAP url |
310+
| security.authentication.ldap.user.adminuserfilter | string | `"(&(uid={0})(memberOf=cn=admin-group,ou=apps,dc=example,dc=com))"` | Any user matching this filter becomes an Admin. If set to `""`, ignore this option |
311+
| security.authentication.ldap.user.adminusername | string | `"read-only-admin"` | Admin user account when you log-in with LDAP. If the filter doesn't match anything this also acts as fallback. Set to `""` to ignore this option if you want to use filter only |
311312
| security.authentication.ldap.user.emailattribute | string | `"mail"` | LDAP user email attribute |
312313
| security.authentication.ldap.user.identityattribute | string | `"uid"` | LDAP user identity attribute |
313314
| security.authentication.ldap.user.notexistaction | string | `"CREATE"` | action when ldap user is not exist,default value: CREATE. Optional values include(CREATE,DENY) |

deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,16 +195,18 @@ Create a security environment variables.
195195
- name: SECURITY_AUTHENTICATION_TYPE
196196
value: {{ .Values.security.authentication.type | quote }}
197197
{{- if eq .Values.security.authentication.type "LDAP" }}
198-
- name: SECURITY_AUTHENTICATION_LDAP_URLS
199-
value: {{ .Values.security.authentication.ldap.urls | quote }}
198+
- name: SECURITY_AUTHENTICATION_LDAP_URL
199+
value: {{ .Values.security.authentication.ldap.url | quote }}
200200
- name: SECURITY_AUTHENTICATION_LDAP_BASE_DN
201201
value: {{ .Values.security.authentication.ldap.basedn | quote }}
202202
- name: SECURITY_AUTHENTICATION_LDAP_USERNAME
203203
value: {{ .Values.security.authentication.ldap.username | quote }}
204204
- name: SECURITY_AUTHENTICATION_LDAP_PASSWORD
205205
value: {{ .Values.security.authentication.ldap.password | quote }}
206-
- name: SECURITY_AUTHENTICATION_LDAP_USER_ADMIN
207-
value: {{ .Values.security.authentication.ldap.user.admin | quote }}
206+
- name: SECURITY_AUTHENTICATION_LDAP_USER_ADMIN_USERNAME
207+
value: {{ .Values.security.authentication.ldap.user.adminusername | quote }}
208+
- name: SECURITY_AUTHENTICATION_LDAP_USER_ADMIN_USER_FILTER
209+
value: {{ .Values.security.authentication.ldap.user.adminuserfilter | quote }}
208210
- name: SECURITY_AUTHENTICATION_LDAP_USER_IDENTITY_ATTRIBUTE
209211
value: {{ .Values.security.authentication.ldap.user.identityattribute | quote }}
210212
- name: SECURITY_AUTHENTICATION_LDAP_USER_EMAIL_ATTRIBUTE

deploy/kubernetes/dolphinscheduler/values.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,17 +221,19 @@ security:
221221
type: PASSWORD
222222
# IF you set type `LDAP`, below config will be effective
223223
ldap:
224-
# -- LDAP urls
225-
urls: ldap://ldap.forumsys.com:389/
224+
# -- LDAP url
225+
url: ldap://ldap.forumsys.com:389/
226226
# -- LDAP base dn
227227
basedn: dc=example,dc=com
228228
# -- LDAP username
229229
username: cn=read-only-admin,dc=example,dc=com
230230
# -- LDAP password
231231
password: password
232232
user:
233-
# -- Admin user account when you log-in with LDAP
234-
admin: read-only-admin
233+
# -- Any user matching this filter becomes an Admin. If set to `""`, ignore this option
234+
adminuserfilter: (&(uid={0})(memberOf=cn=admin-group,ou=apps,dc=example,dc=com))
235+
# -- Admin user account when you log-in with LDAP. If the filter doesn't match anything this also acts as fallback. Set to `""` to ignore this option if you want to use filter only
236+
adminusername: read-only-admin
235237
# -- LDAP user identity attribute
236238
identityattribute: uid
237239
# -- LDAP user email attribute

0 commit comments

Comments
 (0)