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.
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
- 1 · Initial credentials
- 2 · Authentication on the broker
- 3 · Application users
- 4 · Kafka UI permissions
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.
Login form (kafka-ui.applicationConfig.auth.type: LOGIN_FORM), admin user, temporary password in kafka-ui.applicationConfig.spring.security.user.password. LDAP off.
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
- 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) - 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) - Producers and consumers. Without security on the broker, any client that reaches a listener reads and writes. Chart default:
no authentication. (security.users) - Brokers. They accept any client that reaches the listeners. Chart default:
security.enabled: false. (security.enabled · security.authorization.provider) - 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)
- 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) - 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) - Producers and consumers. Without security on the broker, any client that reaches a listener reads and writes. Chart default:
no authentication. (security.users) - Brokers. They accept any client that reaches the listeners. Chart default:
security.enabled: false. (security.enabled · security.authorization.provider) - Authorization. provider none: the broker does not check permissions. Chart default:
none. (security.authorization.provider)
How people sign in to the Kafka UI: LDAP
- Who uses the Kafka UI. They sign in with the company directory account. Chart default:
login form, admin user. (kafka-ui.applicationConfig.auth.type) - 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) - 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) - 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) - Producers and consumers. Without security on the broker, any client that reaches a listener reads and writes. Chart default:
no authentication. (security.users) - Brokers. They accept any client that reaches the listeners. Chart default:
security.enabled: false. (security.enabled · security.authorization.provider) - 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
- Who uses the Kafka UI. They sign in with the company directory account. Chart default:
login form, admin user. (kafka-ui.applicationConfig.auth.type) - 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) - 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) - Directory. Active Directory is configured through the same path as LDAP, with the filter by sAMAccountName. (
kafka-ui.applicationConfig.spring.ldap) - Producers and consumers. Without security on the broker, any client that reaches a listener reads and writes. Chart default:
no authentication. (security.users) - Brokers. They accept any client that reaches the listeners. Chart default:
security.enabled: false. (security.enabled · security.authorization.provider) - Authorization. provider none: the broker does not check permissions. Chart default:
none. (security.authorization.provider)
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_FORM5 spring:6 security:7 user:8 name: admin9 password: "<PASSWORD>"
The chart default.
- Login form (linha 4). The chart default.
- Password (linha 9). Replace the placeholder with your password, only in the private values file.
Apply the values file
The block above, in your values file.
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
admin user's login with the new password.If the login does not work
The Kafka UI logs show the failure:
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-secret6 keyName: bind-password7applicationConfig:8 auth:9 type: LDAP10 spring:11 security: null12 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.
- 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.
- Login through the directory (linha 9). Replaces the local form with LDAP.
- No local user (linha 11). Turns off the form's admin user.
- Bind account (linha 14). DN or userPrincipalName of the service account that queries the directory.
- Bind password (linha 15). Reference to the environment variable. The password stays only in the Secret.
- User DN (linha 16). DN pattern of whoever signs in. {0} is the typed name.
- User search (linha 17). Base and filter for searching users.
- Group search (linha 19). Base for searching groups.
Create the bind account Secret
Before helm upgrade --install, in the Kafka namespace.
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.
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
If the login does not work
The Kafka UI logs show the failure:
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:
- Login name. AD identifies each person by
sAMAccountName, in place ofuid, in the user search filter. - 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.
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-secret6 keyName: bind-password7applicationConfig:8 auth:9 type: LDAP10 spring:11 security: null12 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.
- 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.
- Login through the directory (linha 9). Replaces the local form with the LDAP bind in AD.
- No local user (linha 11). Turns off the form's admin user.
- Bind account (linha 14). DN or userPrincipalName of the service account that queries AD.
- Bind password (linha 15). Reference to the environment variable. The password stays only in the Secret.
- User DN (linha 16). DN pattern in the domain's Users container. {0} is the typed name.
- sAMAccountName (linha 18). The Windows login, in place of uid.
- Group search (linha 19). Group search base, also in CN=Users.
Create the bind account Secret
Before helm upgrade --install, in the Kafka namespace.
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.
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
If the login does not work
The Kafka UI logs show the failure:
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.
Enable SCRAM-SHA-512 and ACLs, with the Kafka UI's technical user.
With the defaults, any client that reaches a listener reads and writes any topic. You want each client to authenticate and do only what its ACLs allow. Enabling security changes three things. The chosen listener starts requiring SCRAM-SHA-512, the Kafka username and password login. The broker starts evaluating each user's ACLs, the rules that say what the user can do on each topic, consumer group, and the cluster (provider: simple). And the users declared in security.users become KafkaUser resources, whose credentials Strimzi generates in a Secret. The Kafka UI itself starts needing a Kafka user: without one, rendering fails.
security.enabled: false, authentication off, and security.authorization.provider: none. No KafkaUser is created.
scram-sha-512 authentication on the security.listener listener, ACLs with provider: simple, one KafkaUser per security.users item, and the Kafka UI connected through the kafka-ui.connection.authentication user, with SASL_PLAINTEXT on the plain listener or SASL_SSL on tls.
provider: ranger hands authorization over to Ranger, in place of ACLs: see Integrations - Kafka.
The clients authenticated on the broker
- 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) - 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) - Producers and consumers. Each application authenticates with its own Kafka user: with a SCRAM-SHA-512 user and password, using the password from the Secret generated by Strimzi. Chart default:
no authentication. (security.users) - Brokers. They authenticate each client and evaluate the Kafka user's ACLs, never those of the person who signed in to the UI. Chart default:
security.enabled: false. (security.enabled · security.authorization.provider) - Authorization. With the simple provider, each user's ACLs come from the values file, and superusers need no ACLs. Chart default:
none. (security.authorization.provider) - Kafka users. Each item in security.users becomes a KafkaUser resource, with its ACLs. The resources are created only with security on. Chart default:
[]. (security.users) - Generated credentials. For each user, Strimzi generates a Secret with the same name: with the SCRAM password. The application mounts this Secret; the Kafka UI references it in kafka-ui.connection.authentication.existingSecret.
- Entity Operator. With security on, Strimzi's user operator syncs the KafkaUser resources with the cluster and generates the Secrets. Chart default:
on. (entityOperator.enabled)
The values file
1security:2enabled: true3listener: plain4authentication:5 enabled: true6 type: scram-sha-5127authorization:8 provider: simple9 superUsers:10 - platform-admin11 - kafka-ui12users:13 - name: kafka-ui1415kafka-ui:16connection:17 authentication:18 username: kafka-ui19 existingSecret:20 name: kafka-ui21 passwordKey: password
Enables authentication, authorization, and the creation of the KafkaUser resources.
- Security on (linha 2). Enables authentication, authorization, and the creation of the KafkaUser resources.
- Listener (linha 3). plain or tls. The chosen listener must be enabled in listeners.
- SCRAM-SHA-512 (linha 6). User and password, with the password generated by Strimzi.
- provider (linha 8). The only authorization key the chart reads: none, simple, or ranger. security.authorization.type and security.authorization.enabled are rejected at rendering.
- Superusers (linha 9). The principals with full access, which need no ACLs. Here, the Kafka UI. The alternative is in scenario 4.
- UI user (linha 13). Becomes a KafkaUser. Strimzi creates the kafka-ui Secret with the password.
- UI connection (linha 18). The chart requires the user and the Secret when security is on, and builds the connection's SASL protocol on its own.
security.authorization.provider is the only authorization keysecurity.authorization.type and security.authorization.enabled are rejected at rendering: they are not chart keys. In earlier releases, these keys were silently ignored, and the broker was left without authorization.
Apply the values file
The block above, with the application users from scenario 3.
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 user and the Secret generated by Strimzi exist, and the UI lists the topics:
kubectl -n <NAMESPACE> get kafkauser kafka-ui -o yaml
kubectl -n <NAMESPACE> get secret kafka-ui -o yaml
If rendering fails or the UI lists no topics
helm shows the chart's message. Look it up in When something goes wrong.
One Kafka user per application, with a SCRAM password or a TLS certificate.
With security on, each producer or consumer application must authenticate with its own Kafka identity, never with the Kafka UI's user. You declare one user per application in security.users, with only the ACLs it needs, and Strimzi generates the credentials in a Secret with the same name as the user. The application authenticates in one of two ways: SCRAM-SHA-512, with user and password, or TLS certificate, where it proves its identity with the certificate and the private key, through the tls listener. TLS also encrypts the connection.
No users: security.users: []. Each user's authentication follows security.authentication.type, unless the user itself defines authentication.type.
The chart's listeners are internal: the examples assume a client that reaches the chosen listener. Access from outside the cluster requires exposing an additional listener, outside these examples.
The credentials of each application
How the application authenticates
- 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) - 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) - Producers and consumers. Each application authenticates with its own Kafka user: with a SCRAM-SHA-512 user and password, using the password from the Secret generated by Strimzi. Chart default:
no authentication. (security.users) - Brokers. They authenticate each client and evaluate the Kafka user's ACLs, never those of the person who signed in to the UI. Chart default:
security.enabled: false. (security.enabled · security.authorization.provider) - Authorization. With the simple provider, each user's ACLs come from the values file, and superusers need no ACLs. Chart default:
none. (security.authorization.provider) - Kafka users. Each item in security.users becomes a KafkaUser resource, with its ACLs. The resources are created only with security on. Chart default:
[]. (security.users) - Generated credentials. For each user, Strimzi generates a Secret with the same name: with the SCRAM password. The application mounts this Secret; the Kafka UI references it in kafka-ui.connection.authentication.existingSecret.
- Entity Operator. With security on, Strimzi's user operator syncs the KafkaUser resources with the cluster and generates the Secrets. Chart default:
on. (entityOperator.enabled)
How the application authenticates: SCRAM-SHA-512
- 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) - 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) - Producers and consumers. Each application authenticates with its own Kafka user: with a SCRAM-SHA-512 user and password, using the password from the Secret generated by Strimzi. Chart default:
no authentication. (security.users) - Brokers. They authenticate each client and evaluate the Kafka user's ACLs, never those of the person who signed in to the UI. Chart default:
security.enabled: false. (security.enabled · security.authorization.provider) - Authorization. With the simple provider, each user's ACLs come from the values file, and superusers need no ACLs. Chart default:
none. (security.authorization.provider) - Kafka users. Each item in security.users becomes a KafkaUser resource, with its ACLs. The resources are created only with security on. Chart default:
[]. (security.users) - Generated credentials. For each user, Strimzi generates a Secret with the same name: with the SCRAM password. The application mounts this Secret; the Kafka UI references it in kafka-ui.connection.authentication.existingSecret.
- Entity Operator. With security on, Strimzi's user operator syncs the KafkaUser resources with the cluster and generates the Secrets. Chart default:
on. (entityOperator.enabled)
How the application authenticates: TLS certificate
- 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) - 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) - Producers and consumers. Each application authenticates with its own Kafka user: with the certificate and key generated by Strimzi, through the tls listener. Chart default:
no authentication. (security.users) - Brokers. They authenticate each client and evaluate the Kafka user's ACLs, never those of the person who signed in to the UI. Chart default:
security.enabled: false. (security.enabled · security.authorization.provider) - Authorization. With the simple provider, each user's ACLs come from the values file, and superusers need no ACLs. Chart default:
none. (security.authorization.provider) - Kafka users. Each item in security.users becomes a KafkaUser resource, with its ACLs. The resources are created only with security on. Chart default:
[]. (security.users) - Generated credentials. For each user, Strimzi generates a Secret with the same name: with ca.crt, user.crt, user.key, user.p12, and user.password. The application mounts this Secret; the Kafka UI references it in kafka-ui.connection.authentication.existingSecret.
- Entity Operator. With security on, Strimzi's user operator syncs the KafkaUser resources with the cluster and generates the Secrets. Chart default:
on. (entityOperator.enabled)
SCRAM-SHA-512. A producer and a consumer of the same topic, each with its own user.
1security:2users:3 - name: producer-app4 acls:5 - resource:6 type: topic7 name: orders.events8 patternType: literal9 operations:10 - Write11 - Create12 - Describe13 - resource:14 type: cluster15 operations:16 - IdempotentWrite
Becomes the producer-app KafkaUser and the producer-app Secret.
- User (linha 3). Becomes the producer-app KafkaUser and the producer-app Secret.
- Topic (linha 7). The example topic, by exact name (literal).
- Producer operations (linha 10). Write, Create, and Describe on the topic.
- Idempotent production (linha 16). IdempotentWrite on the cluster, for idempotent producers.
1security:2users:3 - name: consumer-app4 acls:5 - resource:6 type: topic7 name: orders.events8 patternType: literal9 operations:10 - Read11 - Describe12 - resource:13 type: group14 name: orders-consumer15 patternType: literal16 operations:17 - Read
Read and Describe on the topic.
- Consumer operations (linha 10). Read and Describe on the topic.
- Consumer group (linha 14). Read on the application's consumer group.
Strimzi generates a Secret for each user. Hand the password to the application by mounting or injecting that Secret. Do not copy the password into code or into versioned values files.
kubectl -n <NAMESPACE> get kafkauser producer-app -o yaml
kubectl -n <NAMESPACE> get secret producer-app -o yaml
kubectl -n <NAMESPACE> get secret producer-app -o jsonpath='{.data.password}' | base64 -d
Typical properties of SCRAM clients, through the plain listener:
bootstrap.servers=tdp-kafka-kafka-bootstrap:9092
security.protocol=SASL_PLAINTEXT
sasl.mechanism=SCRAM-SHA-512
sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="producer-app" password="<PASSWORD>";
bootstrap.servers=tdp-kafka-kafka-bootstrap:9092
group.id=orders-consumer
security.protocol=SASL_PLAINTEXT
sasl.mechanism=SCRAM-SHA-512
sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="consumer-app" password="<PASSWORD>";
TLS certificate. The user defines authentication.type: tls and the application connects through the tls listener.
1security:2listener: tls3users:4 - name: consumer-tls5 authentication:6 type: tls7 acls:8 - resource:9 type: topic10 name: orders.events11 patternType: literal12 operations:13 - Read14 - Describe15 - resource:16 type: group17 name: orders-consumer18 patternType: literal19 operations:20 - Read
The connection goes through the tls listener, which must be enabled.
- TLS listener (linha 2). The connection goes through the tls listener, which must be enabled.
- Certificate authentication (linha 6). Strimzi generates the user's certificate and key, in place of a password.
- Operations (linha 13). The same ACLs as a SCRAM consumer.
Strimzi generates the certificate material in a Secret with the user's name, which normally contains ca.crt, user.crt, user.key, user.p12, and user.password:
kubectl -n <NAMESPACE> get kafkauser consumer-tls -o yaml
kubectl -n <NAMESPACE> get secret consumer-tls -o yaml
Typical client properties with the PEM files, mounted from the Secret:
bootstrap.servers=tdp-kafka-kafka-bootstrap:9093
security.protocol=SSL
ssl.truststore.type=PEM
ssl.keystore.type=PEM
ssl.truststore.certificates=/etc/kafka-user/ca.crt
ssl.keystore.certificate.chain=/etc/kafka-user/user.crt
ssl.keystore.key=/etc/kafka-user/user.key
Administrator user as a superuser
A superuser needs no ACLs: the user is declared in security.users, which makes it a KafkaUser, and full access comes from security.authorization.superUsers.
security:
authorization:
superUsers:
- admin-user
users:
- name: admin-user
Superuser or read ACLs for the UI, and the RBAC that limits each person.
With security on, everything someone does in the Kafka UI reaches the broker as the technical user kafka-ui, not as the person who signed in. For example, the LDAP user fry signs in to the UI, the UI connects as kafka-ui, and creating a topic or reading messages is evaluated by Kafka for kafka-ui. This user needs permission on the broker, or the UI lists no topics. You decide between making it a superuser, the supported configuration, or giving it explicit ACLs. With the superuser, the UI's RBAC, the Kafka UI's own role-based access control, becomes what limits each person.
Technical user kafka-ui in kafka-ui.connection.authentication.username, with no Secret provided. UI RBAC off (kafka-ui.rbac.enabled: false).
With kafka-ui in superUsers, whoever has administrative access to the UI indirectly runs privileged operations on Kafka. Restrict UI access to a few trusted people and always enable RBAC.
Superuser or read ACLs
Scenario 2 already declares kafka-ui as a superuser. If a superuser is not acceptable, give the UI user explicit ACLs. A read-only UI needs, at a minimum:
1security:2users:3 - name: kafka-ui4 acls:5 - resource: { type: cluster }6 operations: [Describe, DescribeConfigs]7 - resource: { type: topic, name: "*", patternType: literal }8 operations: [Describe, DescribeConfigs, Read]9 - resource: { type: group, name: "*", patternType: literal }10 operations: [Describe, Read]
Remove kafka-ui from security.authorization.superUsers.
- No superuser (linha 3). Remove kafka-ui from security.authorization.superUsers.
- Topics (linha 7). For people to also manage topics through the UI, add Create, Delete, Alter, and AlterConfigs to this resource.
Kafka UI RBAC
The kafka-ui.rbac block restricts each person's actions in the UI, without granting administrative access to every authenticated user. The recommended model: a few trusted people with full permission, the rest read-only.
1kafka-ui:2rbac:3 enabled: true4 roles:5 - name: admins6 clusters:7 - TDP8 subjects:9 - provider: ldap10 type: user11 value: fry12 permissions:13 - resource: topic14 value: ".*"15 actions: all16 - name: readonly17 clusters:18 - TDP19 subjects:20 - provider: ldap21 type: user22 value: leela23 permissions:24 - resource: topic25 value: ".*"26 actions:27 - view28 - messages_read
With kafka-ui as a superuser, RBAC must always be on.
- RBAC on (linha 3). With kafka-ui as a superuser, RBAC must always be on.
- Cluster (linha 7). The UI's cluster, with the name from kafka-ui.connection.clusterName.
- Administrator (linha 11). fry uses the whole UI.
- Reader (linha 22). leela browses the topics and reads messages.
Even with RBAC, Kafka still sees the operations of fry and leela as those of the kafka-ui user.
Apply the values file
The ACLs or the RBAC, together with the scenario 2 security block.
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
If the UI does not start after enabling RBAC
Resources or actions that the Kafka UI version does not support prevent startup. The logs show which:
kubectl -n <NAMESPACE> logs deployment/<RELEASE_NAME>-kafka-ui
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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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-uiuser 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
Alland superusers, except when strictly necessary. - With
kafka-uias 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
| Parameter | Description | Chart default |
|---|---|---|
security.enabledBroker | Enables authentication, authorization, and the creation of the KafkaUser resources | false |
security.listenerBroker | Protected listener: plain or tls | plain |
security.authentication.enabledBroker | Authentication on the broker | false |
security.authentication.typeBroker | Default authentication type for users | scram-sha-512 |
security.authorization.providerBroker | Authorization: none, simple (ACLs), or ranger | none |
security.authorization.superUsersBroker | Principals with full access, without ACLs | [] |
security.usersBroker | Kafka users (KafkaUser), with optional acls and authentication.type | [] |
kafka-ui.applicationConfig.auth.typeUI login | UI login: LOGIN_FORM or LDAP | LOGIN_FORM |
kafka-ui.applicationConfig.spring.security.user.nameUI login | UI local user | admin |
kafka-ui.applicationConfig.spring.security.user.passwordUI login | Temporary password of the local user | ChangeMe!T3c |
kafka-ui.applicationConfig.spring.ldapUI login | LDAP or AD server, bind account, and search bases | not defined |
kafka-ui.envs.secretMappingsUI login | UI environment variables read from Secrets (bind password) | not defined |
kafka-ui.connection.authentication.usernameUI connection | UI Kafka user | kafka-ui |
kafka-ui.connection.authentication.existingSecret.nameUI connection | Secret with the UI user's password (required with security on) | "" |
kafka-ui.connection.authentication.existingSecret.passwordKeyUI connection | Password key in the Secret | password |
kafka-ui.rbac.enabledUI RBAC | Kafka UI RBAC | false |
kafka-ui.rbac.rolesUI RBAC | RBAC roles: clusters, people, and permissions | [] |