Skip to main content
Version 3.0

Who gets into the Kafka UI
and who talks to the broker.

Four scenarios: people's login to the Kafka UI, authentication on the broker, the applications' users, and what the UI itself can do on the broker. Each one covers: the chart default, what changes in the cluster, and the values file commented line by line.

ChartVersion3.0.3TypeapplicationAppVersion4.1.0
CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+

The tdp-kafka chart brings up the Kafka UI with a login form and the brokers without authentication. Security has two independent fronts, both in the values file: people's login to the Kafka UI, through a local user or the company's LDAP or Active Directory, and authentication on the broker, where each application, and the UI itself, has a Kafka user with its ACLs and authenticates through SCRAM-SHA-512 or a TLS certificate.

Your environment

If you fill in your environment details here, the examples and commands on the page use what you entered. The namespace, the release name, and the values file are your choices, not the chart's.

Scenarios​

Replace the temporary password or validate people against LDAP or Active Directory.

The Kafka UI comes with a login form and a local user, admin, with a temporary password, the same default password as the TDP charts. Before using the UI for anything beyond testing, you set a password of your own in a private values file or start validating people against the company directory. With LDAP or Active Directory, the UI performs the bind, the authenticated connection to the directory, with a service account whose password lives in a Secret, and looks up the user and the groups in the bases you provide. This choice changes only people's login: the UI's connection to the broker stays the same.

Chart default

Login form (kafka-ui.applicationConfig.auth.type: LOGIN_FORM), admin user, temporary password in kafka-ui.applicationConfig.spring.security.user.password. LDAP off.

With LDAP or AD

auth.type: LDAP, the local user off (spring.security: null), the directory in kafka-ui.applicationConfig.spring.ldap, and the bind password in the tdp-kafka-ui-ldap-secret Secret.

Login to the Kafka UI

How people sign in to the Kafka UI

Your choice changes the commands and passages below.

namespace <NAMESPACE>PeoplebrowserKafka UIlogin: formApplicationsno credentialKafka brokersno authenticationNo authorization
  1. Who uses the Kafka UI. They sign in with the Kafka UI local user, defined in the values file. Chart default: login form, admin user. (kafka-ui.applicationConfig.auth.type)
  2. Kafka UI. The person's login and the UI's connection to the broker are independent. The UI always talks to the broker through the same technical user, configured in kafka-ui.connection.authentication. Chart default: LOGIN_FORM. (kafka-ui.applicationConfig.auth.type)
  3. Producers and consumers. Without security on the broker, any client that reaches a listener reads and writes. Chart default: no authentication. (security.users)
  4. Brokers. They accept any client that reaches the listeners. Chart default: security.enabled: false. (security.enabled · security.authorization.provider)
  5. Authorization. provider none: the broker does not check permissions. Chart default: none. (security.authorization.provider)

How people sign in to the Kafka UI: Form, local user (default)

namespace <NAMESPACE>PeoplebrowserKafka UIlogin: formApplicationsno credentialKafka brokersno authenticationNo authorization
  1. Who uses the Kafka UI. They sign in with the Kafka UI local user, defined in the values file. Chart default: login form, admin user. (kafka-ui.applicationConfig.auth.type)
  2. Kafka UI. The person's login and the UI's connection to the broker are independent. The UI always talks to the broker through the same technical user, configured in kafka-ui.connection.authentication. Chart default: LOGIN_FORM. (kafka-ui.applicationConfig.auth.type)
  3. Producers and consumers. Without security on the broker, any client that reaches a listener reads and writes. Chart default: no authentication. (security.users)
  4. Brokers. They accept any client that reaches the listeners. Chart default: security.enabled: false. (security.enabled · security.authorization.provider)
  5. Authorization. provider none: the broker does not check permissions. Chart default: none. (security.authorization.provider)

How people sign in to the Kafka UI: LDAP

namespace <NAMESPACE>PeoplebrowserKafka UIlogin: LDAPBind Secrettdp-kafka-ui-ldap-secretLDAP server<LDAP_HOST>Applicationsno credentialKafka brokersno authenticationNo authorization
  1. Who uses the Kafka UI. They sign in with the company directory account. Chart default: login form, admin user. (kafka-ui.applicationConfig.auth.type)
  2. Kafka UI. The person's login and the UI's connection to the broker are independent. The UI always talks to the broker through the same technical user, configured in kafka-ui.connection.authentication. Chart default: LOGIN_FORM. (kafka-ui.applicationConfig.auth.type)
  3. Bind account password. The password of the service account the UI uses to query the directory. It lives in a Secret, key bind-password, and reaches the UI as an environment variable. Chart default: does not exist. (kafka-ui.envs.secretMappings)
  4. Directory. The UI binds with the service account and looks up the user and the groups in the given bases. (kafka-ui.applicationConfig.spring.ldap)
  5. Producers and consumers. Without security on the broker, any client that reaches a listener reads and writes. Chart default: no authentication. (security.users)
  6. Brokers. They accept any client that reaches the listeners. Chart default: security.enabled: false. (security.enabled · security.authorization.provider)
  7. Authorization. provider none: the broker does not check permissions. Chart default: none. (security.authorization.provider)

How people sign in to the Kafka UI: Active Directory

namespace <NAMESPACE>PeoplebrowserKafka UIlogin: Active DirectoryBind Secrettdp-kafka-ui-ldap-secretActive Directory<LDAP_HOST>Applicationsno credentialKafka brokersno authenticationNo authorization
  1. Who uses the Kafka UI. They sign in with the company directory account. Chart default: login form, admin user. (kafka-ui.applicationConfig.auth.type)
  2. Kafka UI. The person's login and the UI's connection to the broker are independent. The UI always talks to the broker through the same technical user, configured in kafka-ui.connection.authentication. Chart default: LOGIN_FORM. (kafka-ui.applicationConfig.auth.type)
  3. Bind account password. The password of the service account the UI uses to query the directory. It lives in a Secret, key bind-password, and reaches the UI as an environment variable. Chart default: does not exist. (kafka-ui.envs.secretMappings)
  4. Directory. Active Directory is configured through the same path as LDAP, with the filter by sAMAccountName. (kafka-ui.applicationConfig.spring.ldap)
  5. Producers and consumers. Without security on the broker, any client that reaches a listener reads and writes. Chart default: no authentication. (security.users)
  6. Brokers. They accept any client that reaches the listeners. Chart default: security.enabled: false. (security.enabled · security.authorization.provider)
  7. Authorization. provider none: the broker does not check permissions. Chart default: none. (security.authorization.provider)
Choose above: with LDAP or AD, the directory and the bind account Secret appear.

Form, with your password. Set the admin user's password in a private values file, which does not go into version control.

1kafka-ui:
2applicationConfig:
3 auth:
4 type: LOGIN_FORM
5 spring:
6 security:
7 user:
8 name: admin
9 password: "<PASSWORD>"

The chart default.

  1. Login form (linha 4). The chart default.
  2. Password (linha 9). Replace the placeholder with your password, only in the private values file.
Kafka UI local user password

Apply the values file

The block above, in your values file.

Terminal input
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-kafka \
--version 3.0.3 \
-n <NAMESPACE> \
-f <VALUES_FILE>

It worked when

The Kafka UI accepts the admin user's login with the new password.
If the login does not work

The Kafka UI logs show the failure:

Terminal input
kubectl -n <NAMESPACE> logs deployment/<RELEASE_NAME>-kafka-ui

More in When something goes wrong.

LDAP. The block enables login through the directory and turns off the local user. The bind account password does not appear in the file: it comes from the Secret, as an environment variable.

1kafka-ui:
2envs:
3 secretMappings:
4 KAFKA_UI_LDAP_BIND_PASSWORD:
5 name: tdp-kafka-ui-ldap-secret
6 keyName: bind-password
7applicationConfig:
8 auth:
9 type: LDAP
10 spring:
11 security: null
12 ldap:
13 urls: "ldap://<LDAP_HOST>:389"
14 admin-user: "<LDAP_BIND_DN>"
15 admin-password: "${KAFKA_UI_LDAP_BIND_PASSWORD}"
16 base: "uid={0},ou=people,dc=<DOMAIN>,dc=com"
17 user-filter-search-base: "ou=people,dc=<DOMAIN>,dc=com"
18 user-filter-search-filter: "(&(uid={0})(objectClass=inetOrgPerson))"
19 group-filter-search-base: "ou=groups,dc=<DOMAIN>,dc=com"

Carries the bind-password key from the tdp-kafka-ui-ldap-secret Secret to the KAFKA_UI_LDAP_BIND_PASSWORD variable.

  1. Bind password (linha 3). Carries the bind-password key from the tdp-kafka-ui-ldap-secret Secret to the KAFKA_UI_LDAP_BIND_PASSWORD variable.
  2. Login through the directory (linha 9). Replaces the local form with LDAP.
  3. No local user (linha 11). Turns off the form's admin user.
  4. Bind account (linha 14). DN or userPrincipalName of the service account that queries the directory.
  5. Bind password (linha 15). Reference to the environment variable. The password stays only in the Secret.
  6. User DN (linha 16). DN pattern of whoever signs in. {0} is the typed name.
  7. User search (linha 17). Base and filter for searching users.
  8. Group search (linha 19). Base for searching groups.
LDAP login in the Kafka UI

Create the bind account Secret

Before helm upgrade --install, in the Kafka namespace.

Terminal input
kubectl create secret generic tdp-kafka-ui-ldap-secret \
--from-literal=bind-password=<LDAP_BIND_PASSWORD> \
-n <NAMESPACE>

Apply the values file

The block above, in your values file.

Terminal input
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-kafka \
--version 3.0.3 \
-n <NAMESPACE> \
-f <VALUES_FILE>

It worked when

The Kafka UI accepts the login with a directory account.
If the login does not work

The Kafka UI logs show the failure:

Terminal input
kubectl -n <NAMESPACE> logs deployment/<RELEASE_NAME>-kafka-ui

More in When something goes wrong.

Active Directory. The company directory is an Active Directory (AD). The block turns on the AD login, through the LDAP bind, and turns off the local user. The bind account password does not appear in the file: it comes from the Secret, as an environment variable. Two points are specific to AD:

  1. Login name. AD identifies each person by sAMAccountName, in place of uid, in the user search filter.
  2. Where the accounts live. In AD, accounts and groups live in the domain's CN=Users: it is the base of the user DN and of the searches.
Use the LDAP bind, not oauth2.ldap.activeDirectory

The Kafka UI recognizes the oauth2.ldap.activeDirectory and oauth2.ldap.domain options, but with them every Active Directory login fails, even with correct credentials. The path the chart supports is the LDAP bind, with the adjustments above.

1kafka-ui:
2envs:
3 secretMappings:
4 KAFKA_UI_LDAP_BIND_PASSWORD:
5 name: tdp-kafka-ui-ldap-secret
6 keyName: bind-password
7applicationConfig:
8 auth:
9 type: LDAP
10 spring:
11 security: null
12 ldap:
13 urls: "ldap://<LDAP_HOST>:389"
14 admin-user: "<LDAP_BIND_DN>"
15 admin-password: "${KAFKA_UI_LDAP_BIND_PASSWORD}"
16 base: "CN={0},CN=Users,DC=<DOMAIN>,DC=<TLD>"
17 user-filter-search-base: "CN=Users,DC=<DOMAIN>,DC=<TLD>"
18 user-filter-search-filter: "(&(sAMAccountName={0})(objectClass=user))"
19 group-filter-search-base: "CN=Users,DC=<DOMAIN>,DC=<TLD>"

Carries the bind-password key from the tdp-kafka-ui-ldap-secret Secret to the KAFKA_UI_LDAP_BIND_PASSWORD variable.

  1. Bind password (linha 3). Carries the bind-password key from the tdp-kafka-ui-ldap-secret Secret to the KAFKA_UI_LDAP_BIND_PASSWORD variable.
  2. Login through the directory (linha 9). Replaces the local form with the LDAP bind in AD.
  3. No local user (linha 11). Turns off the form's admin user.
  4. Bind account (linha 14). DN or userPrincipalName of the service account that queries AD.
  5. Bind password (linha 15). Reference to the environment variable. The password stays only in the Secret.
  6. User DN (linha 16). DN pattern in the domain's Users container. {0} is the typed name.
  7. sAMAccountName (linha 18). The Windows login, in place of uid.
  8. Group search (linha 19). Group search base, also in CN=Users.
Active Directory login in the Kafka UI

Create the bind account Secret

Before helm upgrade --install, in the Kafka namespace.

Terminal input
kubectl create secret generic tdp-kafka-ui-ldap-secret \
--from-literal=bind-password=<LDAP_BIND_PASSWORD> \
-n <NAMESPACE>

Apply the values file

The block above, in your values file.

Terminal input
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-kafka \
--version 3.0.3 \
-n <NAMESPACE> \
-f <VALUES_FILE>

It worked when

The Kafka UI accepts the login with an Active Directory account.
If the login does not work

The Kafka UI logs show the failure:

Terminal input
kubectl -n <NAMESPACE> logs deployment/<RELEASE_NAME>-kafka-ui

Also check that the configuration does not use oauth2.ldap.activeDirectory. More in When something goes wrong.

When something goes wrong​

Troubleshooting

Paste the error message or pick the symptom. The answer comes with the cause, what to do, and the command.

  1. Rendering error: security.authorization.type ... are not read. Cause: The values file uses security.authorization.type or security.authorization.enabled, which are not chart keys. What to do: Use only security.authorization.provider, with none, simple, or ranger.
  2. Rendering error: security.listener requires listeners. Cause: The listener chosen in security.listener is off. What to do: Enable the corresponding listener (listeners.plain.enabled or listeners.tls.enabled) or choose the other one.
  3. Rendering error: kafka-ui.connection.authentication ... is required. Cause: With security on, the Kafka UI needs a Kafka user of its own, and the chart requires the user and its Secret. What to do: Fill in kafka-ui.connection.authentication.username and existingSecret.name, as in scenario 2.
  4. Rendering error: security.users[...] defines ACLs. Cause: A user in security.users carries ACLs, but authorization is not simple. What to do: Use security.authorization.provider: simple, or remove the ACLs from the users.
  5. The Kafka UI lists no topics. Cause: The UI's technical user has no permission on the broker: with the simple provider, the broker denies DESCRIBE. What to do: Declare the UI user in security.users and make it a superuser or give it the read ACLs from scenario 4.
  6. Kafka UI does not connect to the broker. Cause: Bootstrap address, Kafka credentials, or the Secret referenced by the UI. What to do: Check the bootstrap, the UI's Kafka user, and the Secret in kafka-ui.connection.authentication.existingSecret.
  7. Kafka UI does not start after enabling RBAC. Cause: RBAC resources or actions that the Kafka UI image version does not support. What to do: Check the resources and actions in kafka-ui.rbac.roles.
  8. Active Directory login always fails. Cause: The configuration uses oauth2.ldap.activeDirectory, which rejects correct credentials. What to do: Configure Active Directory through the LDAP path, with the base and the sAMAccountName filter from scenario 1.

Best practices​

  • One Kafka user per application or security boundary, with only the ACLs it needs. Never reuse the kafka-ui user in applications.
  • Let Strimzi generate and manage the credentials, and deliver the Secret or the certificate to the application securely, without copying passwords into code or into versioned values files.
  • Administration and maintenance tools have their own identities, separate from those of producers and consumers.
  • Avoid All and superusers, except when strictly necessary.
  • With kafka-ui as a superuser, restrict access to the Kafka UI to a few trusted people and enable RBAC.

All parameters​

Filter by name or by group. This chart's keys live at the root of the values file, without a prefix.

17 of 17 parameters

ParameterDescriptionChart default
security.enabledBrokerEnables authentication, authorization, and the creation of the KafkaUser resourcesfalse
security.listenerBrokerProtected listener: plain or tlsplain
security.authentication.enabledBrokerAuthentication on the brokerfalse
security.authentication.typeBrokerDefault authentication type for usersscram-sha-512
security.authorization.providerBrokerAuthorization: none, simple (ACLs), or rangernone
security.authorization.superUsersBrokerPrincipals with full access, without ACLs[]
security.usersBrokerKafka users (KafkaUser), with optional acls and authentication.type[]
kafka-ui.applicationConfig.auth.typeUI loginUI login: LOGIN_FORM or LDAPLOGIN_FORM
kafka-ui.applicationConfig.spring.security.user.nameUI loginUI local useradmin
kafka-ui.applicationConfig.spring.security.user.passwordUI loginTemporary password of the local userChangeMe!T3c
kafka-ui.applicationConfig.spring.ldapUI loginLDAP or AD server, bind account, and search basesnot defined
kafka-ui.envs.secretMappingsUI loginUI environment variables read from Secrets (bind password)not defined
kafka-ui.connection.authentication.usernameUI connectionUI Kafka userkafka-ui
kafka-ui.connection.authentication.existingSecret.nameUI connectionSecret with the UI user's password (required with security on)""
kafka-ui.connection.authentication.existingSecret.passwordKeyUI connectionPassword key in the Secretpassword
kafka-ui.rbac.enabledUI RBACKafka UI RBACfalse
kafka-ui.rbac.rolesUI RBACRBAC roles: clusters, people, and permissions[]

Next steps​