[stable/kafka-manager] Add LDAP authentication configurable features (#20777)

* Add LDAP authentication configurable features

Signed-off-by: Parth Kolekar <parthkolekar@indeed.com>

* Minor version bump as per review

Signed-off-by: Parth Kolekar <parthkolekar@indeed.com>

* Fix spelling of password

Signed-off-by: Parth Kolekar <parthkolekar@indeed.com>
This commit is contained in:
Parth Laxmikant Kolekar
2020-02-24 04:32:48 -08:00
committed by GitHub
parent 5fe981ebac
commit 6914e76c33
5 changed files with 53 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: kafka-manager
version: 2.2.1
version: 2.3.0
appVersion: 1.3.3.22
kubeVersion: "^1.8.0-0"
description: A tool for managing Apache Kafka.
+9
View File
@@ -53,6 +53,15 @@ Parameter | Description | Default
`basicAuth.enabled` | If true, enable basic authentication | `false`
`basicAuth.username` | Username for basic auth | `admin`
`basicAuth.password` | Password for basic auth | `""`
`basicAuth.ldap.enabled` | If true, enable LDAP authentication | `false`
`basicAuth.ldap.server` | FQDN of the LDAP server | `""`
`basicAuth.ldap.port` | Port used for LDAP | `""`
`basicAuth.ldap.username` | Optional LDAP DN to bind for query | `""`
`basicAuth.ldap.pasword` | Optional LDAP password for the DN | `""`
`basicAuth.ldap.searchBaseDn` | LDAP search base | `""`
`basicAuth.ldap.searchFilter` | LDAP search filter for a valid account | `""`
`basicAuth.ldap.connectionPoolSize` | LDAP connection pool size | `10`
`basicAuth.ldap.ssl` | Enable LDAPS (not StartTLS) | `false`
`javaOptions` | Java runtime options | `""`
`service.type` | Kafka-manager service type | `ClusterIP`
`service.port` | Kafka-manager service port | `9000`
@@ -51,6 +51,30 @@ spec:
secretKeyRef:
name: {{ template "kafka-manager.fullname" . }}
key: basicAuthPassword
- name: KAFKA_MANAGER_LDAP_ENABLED
value: {{ .Values.basicAuth.ldap.enabled | quote }}
- name: KAFKA_MANAGER_LDAP_SERVER
value: {{ .Values.basicAuth.ldap.server | quote }}
- name: KAFKA_MANAGER_LDAP_PORT
value: {{ .Values.basicAuth.ldap.port | quote }}
- name: KAFKA_MANAGER_LDAP_USERNAME
valueFrom:
secretKeyRef:
name: {{ template "kafka-manager.fullname" . }}
key: basicAuthLDAPUsername
- name: KAFKA_MANAGER_LDAP_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "kafka-manager.fullname" . }}
key: basicAuthLDAPPassword
- name: KAFKA_MANAGER_LDAP_SEARCH_BASE_DN
value: {{ .Values.basicAuth.ldap.searchBaseDn | quote }}
- name: KAFKA_MANAGER_LDAP_SEARCH_FILTER
value: {{ .Values.basicAuth.ldap.searchFilter | quote }}
- name: KAFKA_MANAGER_LDAP_CONNECTION_POOL_SIZE
value: {{ .Values.basicAuth.ldap.connectionPoolSize | quote }}
- name: KAFKA_MANAGER_LDAP_SSL
value: {{ .Values.basicAuth.ldap.ssl | quote }}
livenessProbe:
{{ toYaml .Values.livenessProbe | indent 12 }}
readinessProbe:
@@ -21,3 +21,9 @@ data:
{{ else }}
basicAuthPassword: {{ randAlphaNum 10 | b64enc | quote }}
{{ end }}
basicAuthLDAPUsername: {{ .Values.basicAuth.ldap.username | b64enc | quote }}
{{ if .Values.basicAuth.ldap.password }}
basicAuthLDAPPassword: {{ .Values.basicAuth.ldap.password | b64enc | quote }}
{{ else }}
basicAuthLDAPPassword: {{ randAlphaNum 10 | b64enc | quote }}
{{ end }}
+13
View File
@@ -99,6 +99,19 @@ basicAuth:
## Defaults to a random 10-character alphanumeric string if not set
##
password: ""
## LDAP Authentication
## Ref : https://github.com/yahoo/CMAK#authenticating-a-user-with-ldap
##
ldap:
enabled: false
server: ""
port: 389
username: ""
password: ""
searchBaseDn: ""
searchFilter: "(uid=$capturedLogin$)"
connectionPoolSize: 10
ssl: false
## Java runtime options. Passed through the JAVA_OPTS environmental variable
##