Skip to content

Commit

Permalink
Feature: Cluster web configuration wizard (#3241)
Browse files Browse the repository at this point in the history
* created wizard

* Create wizard form schema

* Wizard kafka cluster form (#3245)

* created wizard Kafka Cluster form

* created error message

Co-authored-by: davitbejanyan <[email protected]>

* Update schema.ts

* Wizard authentication (#3268)

* created authentication form

* changed SaslType.tsx switch case

* remove console.log

* commented unused variables

* auth validation

* auth Security Protocol

* changed schema.ts username, password

* added Delegation tokens validation schema

* changed auth form

---------

Co-authored-by: davitbejanyan <[email protected]>

* New Dashboard flow. Add an ability to configure clusters

* wizard kafka cluster validate (#3294)

* kafka cluster validate

* fixed  bootstrap server uncontrolled input  warning error

---------

Co-authored-by: davitbejanyan <[email protected]>

* Wizard schema registry (#3286)

* created schema registry

* unused variables

* Prevent Default on click

---------

Co-authored-by: davitbejanyan <[email protected]>

* feat: cleanup

* Application config API (#3242)

* wip

* wip

* wip

* wip

* OAuthProperties added to dynamic config api

* wip

* files upload endpoint added

* rbac conf api added

* rbac conf api improvements

* App configuration validation endpoint (#3264)

Co-authored-by: iliax <[email protected]>

---------

Co-authored-by: iliax <[email protected]>
Co-authored-by: Oleg Shur <[email protected]>

* add app config api client

* refactor cluster section

* refactor cluster section

* linting

* refactor Registry Form (#3311)

* refactor Registry Form

* refactor Registry

---------

Co-authored-by: davitbejanyan <[email protected]>

* auth form improvements

* refactoring

* linting

* file upload API changes

* Auth

* Start connecting to schema & payload

* Auth

* fileupload

* Wizard JMX Metrics form (#3303)

* created JMX Metrics form

* refactor JMXMetrics.tsx styles

* added cursor on checkbox, changed styles submit button

* refactor Metrics

* refactoring

* uncomment schema connect validation

---------

Co-authored-by: davitbejanyan <[email protected]>

* validate api

* refactor

* Wizard Kafka Connect form (#3300)

* created Kafka Connect form

* renaming functions and variables

* refactor

* changed button name

* refactoring kafka connect

* made handler function, reset replace with set value,

* refactoring

* uncomment schema metrics validation

---------

Co-authored-by: davitbejanyan <[email protected]>

* fixing AdminClient validation

* fixing AdminClient validation

* refactor kafka connect

* refactor metrics

* Per-cluster SSL verification settings (#3336)

* ssl configuration moved to app & cluster level

* documentations changes

* trust all removed, global app settings removed

* extracting ssl properties settings to SslPropertiesUtil

* wip

* documentation fix

---------

Co-authored-by: iliax <[email protected]>
Co-authored-by: Roman Zabaluev <[email protected]>

* SSL properties NPE fixes

* api integration

* custom fields for existing auth config

* OffsetsResetServiceTest fix

* cluster.properties structure flattening added

* kafka-ssl.yml: ssl properties moved to separate section, producer ssl properties copy added

* custom auth

* error messaging

* form submit

* feedback

* 1. defaulting metrics type to JMX
2. AdminClient id generation made uniq

* checkstyle fix

* checkstyle fix

* refactoring

* feedback

* feedback

* feedback

* feedback

* feedback

* feedback

* Wizard: Application info API (#3391)

* Application info API added, cluster features enum renamed to `ClusterFeature`

* show config for specific envs only

* refactor widget

* Cluster connection validation err msg improved

* KSQL DB section

* Refactor + deps upgrade

* experiment: get rid of babel

* BE validations refactoring

* Update kafka-ui.yaml

fixed to string type param

* fixes #3397

* linting

* #3399 adjust size of port input

* disable selects for disabled form

* Wizard: Keystore separation (#3425)

* wip

* wip

* compose fix

* dto structure fix

---------

Co-authored-by: iliax <[email protected]>

* dynamic ops enablement properties improvements

* own keystore for each section

* linting

* fix keystore submit

* fix keystore submit

* feedback

* feedback

* refactoring

* Connect config userName field renamed

* metrics configs mapping fix

* feedback

* Wizard: Jmx ssl (#3448)

JMX SSL implementation. Added ability to set specific ssl keystore for each cluster when connection to jmx endpoint.

* Review fixes

* upd compareVersionsOperation qase id

* add toBeAutomated into manual suite

* DYNAMIC_CONFIG_ENABLED property description added

* Resolve conflicts

* Fix issue with 400 error

* fix SR edit form

---------

Co-authored-by: davitbejanyan <[email protected]>
Co-authored-by: Alexander Krivonosov <[email protected]>
Co-authored-by: Oleg Shur <[email protected]>
Co-authored-by: Ilya Kuramshin <[email protected]>
Co-authored-by: iliax <[email protected]>
Co-authored-by: Roman Zabaluev <[email protected]>
Co-authored-by: bkhakimov <[email protected]>
Co-authored-by: Mgrdich <[email protected]>
Co-authored-by: VladSenyuta <[email protected]>
  • Loading branch information
10 people authored Mar 9, 2023
1 parent 334ba3d commit e72f6d6
Show file tree
Hide file tree
Showing 165 changed files with 5,324 additions and 4,148 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,16 +185,17 @@ For example, if you want to use an environment variable to set the `name` parame
|`KAFKA_CLUSTERS_0_KSQLDBSERVERAUTH_PASSWORD` | KSQL DB server's basic authentication password
|`KAFKA_CLUSTERS_0_KSQLDBSERVERSSL_KEYSTORELOCATION` |Path to the JKS keystore to communicate to KSQL DB
|`KAFKA_CLUSTERS_0_KSQLDBSERVERSSL_KEYSTOREPASSWORD` |Password of the JKS keystore for KSQL DB
|`KAFKA_CLUSTERS_0_KSQLDBSERVERSSL_TRUSTSTORELOCATION` |Path to the JKS truststore to communicate to KSQL DB
|`KAFKA_CLUSTERS_0_KSQLDBSERVERSSL_TRUSTSTOREPASSWORD` |Password of the JKS truststore for KSQL DB
|`KAFKA_CLUSTERS_0_PROPERTIES_SECURITY_PROTOCOL` |Security protocol to connect to the brokers. For SSL connection use "SSL", for plaintext connection don't set this environment variable
|`KAFKA_CLUSTERS_0_SCHEMAREGISTRY` |SchemaRegistry's address
|`KAFKA_CLUSTERS_0_SCHEMAREGISTRYAUTH_USERNAME` |SchemaRegistry's basic authentication username
|`KAFKA_CLUSTERS_0_SCHEMAREGISTRYAUTH_PASSWORD` |SchemaRegistry's basic authentication password
|`KAFKA_CLUSTERS_0_SCHEMAREGISTRYSSL_KEYSTORELOCATION` |Path to the JKS keystore to communicate to SchemaRegistry
|`KAFKA_CLUSTERS_0_SCHEMAREGISTRYSSL_KEYSTOREPASSWORD` |Password of the JKS keystore for SchemaRegistry
|`KAFKA_CLUSTERS_0_SCHEMAREGISTRYSSL_TRUSTSTORELOCATION` |Path to the JKS truststore to communicate to SchemaRegistry
|`KAFKA_CLUSTERS_0_SCHEMAREGISTRYSSL_TRUSTSTOREPASSWORD` |Password of the JKS truststore for SchemaRegistry
|`KAFKA_CLUSTERS_0_METRICS_SSL` |Enable SSL for Metrics (for PROMETHEUS metrics type). Default: false.
|`KAFKA_CLUSTERS_0_METRICS_USERNAME` |Username for Metrics authentication
|`KAFKA_CLUSTERS_0_METRICS_PASSWORD` |Password for Metrics authentication
|`KAFKA_CLUSTERS_0_METRICS_KEYSTORELOCATION` |Path to the JKS keystore to communicate to metrics source (JMX/PROMETHEUS). For advanced setup, see `kafka-ui-jmx-secured.yml`
|`KAFKA_CLUSTERS_0_METRICS_KEYSTOREPASSWORD` |Password of the JKS metrics keystore
|`KAFKA_CLUSTERS_0_SCHEMANAMETEMPLATE` |How keys are saved to schemaRegistry
|`KAFKA_CLUSTERS_0_METRICS_PORT` |Open metrics port of a broker
|`KAFKA_CLUSTERS_0_METRICS_TYPE` |Type of metrics retriever to use. Valid values are JMX (default) or PROMETHEUS. If Prometheus, then metrics are read from prometheus-jmx-exporter instead of jmx
Expand All @@ -205,11 +206,9 @@ For example, if you want to use an environment variable to set the `name` parame
|`KAFKA_CLUSTERS_0_KAFKACONNECT_0_PASSWORD`| Kafka Connect cluster's basic authentication password
|`KAFKA_CLUSTERS_0_KAFKACONNECT_0_KEYSTORELOCATION`| Path to the JKS keystore to communicate to Kafka Connect
|`KAFKA_CLUSTERS_0_KAFKACONNECT_0_KEYSTOREPASSWORD`| Password of the JKS keystore for Kafka Connect
|`KAFKA_CLUSTERS_0_KAFKACONNECT_0_TRUSTSTORELOCATION`| Path to the JKS truststore to communicate to Kafka Connect
|`KAFKA_CLUSTERS_0_KAFKACONNECT_0_TRUSTSTOREPASSWORD`| Password of the JKS truststore for Kafka Connect
|`KAFKA_CLUSTERS_0_METRICS_SSL` |Enable SSL for Metrics? `true` or `false`. For advanced setup, see `kafka-ui-jmx-secured.yml`
|`KAFKA_CLUSTERS_0_METRICS_USERNAME` |Username for Metrics authentication
|`KAFKA_CLUSTERS_0_METRICS_PASSWORD` |Password for Metrics authentication
|`KAFKA_CLUSTERS_0_POLLING_THROTTLE_RATE` |Max traffic rate (bytes/sec) that kafka-ui allowed to reach when polling messages from the cluster. Default: 0 (not limited)
|`KAFKA_CLUSTERS_0_SSL_TRUSTSTORELOCATION`| Path to the JKS truststore to communicate to Kafka Connect, SchemaRegistry, KSQL, Metrics
|`KAFKA_CLUSTERS_0_SSL_TRUSTSTOREPASSWORD`| Password of the JKS truststore for Kafka Connect, SchemaRegistry, KSQL, Metrics
|`TOPIC_RECREATE_DELAY_SECONDS` |Time delay between topic deletion and topic creation attempts for topic recreate functionality. Default: 1
|`TOPIC_RECREATE_MAXRETRIES` |Number of attempts of topic creation after topic deletion for topic recreate functionality. Default: 15
|`DYNAMIC_CONFIG_ENABLED`|Allow to change application config in runtime. Default: false.
Empty file modified documentation/compose/jaas/client.properties
100644 → 100755
Empty file.
Empty file modified documentation/compose/jaas/kafka_connect.jaas
100644 → 100755
Empty file.
Empty file modified documentation/compose/jaas/kafka_connect.password
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion documentation/compose/jaas/kafka_server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ KafkaClient {
user_admin="admin-secret";
};

Client {};
Client {};
Empty file modified documentation/compose/jaas/schema_registry.jaas
100644 → 100755
Empty file.
Empty file modified documentation/compose/jaas/schema_registry.password
100644 → 100755
Empty file.
18 changes: 8 additions & 10 deletions documentation/compose/kafka-ssl-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,25 @@ services:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_PROPERTIES_SECURITY_PROTOCOL: SSL
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka0:29092 # SSL LISTENER!
KAFKA_CLUSTERS_0_PROPERTIES_SSL_TRUSTSTORE_LOCATION: /kafka.truststore.jks
KAFKA_CLUSTERS_0_PROPERTIES_SSL_TRUSTSTORE_PASSWORD: secret
KAFKA_CLUSTERS_0_PROPERTIES_SSL_KEYSTORE_LOCATION: /kafka.keystore.jks
KAFKA_CLUSTERS_0_PROPERTIES_SSL_KEYSTORE_PASSWORD: secret
KAFKA_CLUSTERS_0_PROPERTIES_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM: '' # DISABLE COMMON NAME VERIFICATION

KAFKA_CLUSTERS_0_SCHEMAREGISTRY: https://schemaregistry0:8085
KAFKA_CLUSTERS_0_SCHEMAREGISTRYSSL_KEYSTORELOCATION: /kafka.keystore.jks
KAFKA_CLUSTERS_0_SCHEMAREGISTRYSSL_KEYSTOREPASSWORD: "secret"
KAFKA_CLUSTERS_0_SCHEMAREGISTRYSSL_TRUSTSTORELOCATION: /kafka.truststore.jks
KAFKA_CLUSTERS_0_SCHEMAREGISTRYSSL_TRUSTSTOREPASSWORD: "secret"

KAFKA_CLUSTERS_0_KSQLDBSERVER: https://ksqldb0:8088
KAFKA_CLUSTERS_0_KSQLDBSERVERSSL_KEYSTORELOCATION: /kafka.keystore.jks
KAFKA_CLUSTERS_0_KSQLDBSERVERSSL_KEYSTOREPASSWORD: "secret"
KAFKA_CLUSTERS_0_KSQLDBSERVERSSL_TRUSTSTORELOCATION: /kafka.truststore.jks
KAFKA_CLUSTERS_0_KSQLDBSERVERSSL_TRUSTSTOREPASSWORD: "secret"

KAFKA_CLUSTERS_0_KAFKACONNECT_0_NAME: local
KAFKA_CLUSTERS_0_KAFKACONNECT_0_ADDRESS: https://kafka-connect0:8083
KAFKA_CLUSTERS_0_KAFKACONNECT_0_KEYSTORELOCATION: /kafka.keystore.jks
KAFKA_CLUSTERS_0_KAFKACONNECT_0_KEYSTOREPASSWORD: "secret"
KAFKA_CLUSTERS_0_KAFKACONNECT_0_TRUSTSTORELOCATION: /kafka.truststore.jks
KAFKA_CLUSTERS_0_KAFKACONNECT_0_TRUSTSTOREPASSWORD: "secret"

KAFKA_CLUSTERS_0_SSL_TRUSTSTORELOCATION: /kafka.truststore.jks
KAFKA_CLUSTERS_0_SSL_TRUSTSTOREPASSWORD: "secret"
DYNAMIC_CONFIG_ENABLED: 'true' # not necessary for ssl, added for tests

volumes:
- ./ssl/kafka.truststore.jks:/kafka.truststore.jks
- ./ssl/kafka.keystore.jks:/kafka.keystore.jks
Expand Down
10 changes: 5 additions & 5 deletions documentation/compose/kafka-ssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ services:
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_PROPERTIES_SECURITY_PROTOCOL: SSL
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092 # SSL LISTENER!
KAFKA_CLUSTERS_0_PROPERTIES_SSL_TRUSTSTORE_LOCATION: /kafka.truststore.jks
KAFKA_CLUSTERS_0_PROPERTIES_SSL_TRUSTSTORE_PASSWORD: secret
KAFKA_CLUSTERS_0_PROPERTIES_SSL_KEYSTORE_LOCATION: /kafka.keystore.jks
KAFKA_CLUSTERS_0_PROPERTIES_SSL_KEYSTORE_PASSWORD: secret
KAFKA_CLUSTERS_0_PROPERTIES_SSL_KEYSTORE_PASSWORD: "secret"
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092 # SSL LISTENER!
KAFKA_CLUSTERS_0_SSL_TRUSTSTORELOCATION: /kafka.truststore.jks
KAFKA_CLUSTERS_0_SSL_TRUSTSTOREPASSWORD: "secret"
KAFKA_CLUSTERS_0_PROPERTIES_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM: '' # DISABLE COMMON NAME VERIFICATION
volumes:
- ./ssl/kafka.truststore.jks:/kafka.truststore.jks
Expand Down Expand Up @@ -60,4 +60,4 @@ services:
- ./ssl/creds:/etc/kafka/secrets/creds
- ./ssl/kafka.truststore.jks:/etc/kafka/secrets/kafka.truststore.jks
- ./ssl/kafka.keystore.jks:/etc/kafka/secrets/kafka.keystore.jks
command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'"
command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'"
1 change: 1 addition & 0 deletions documentation/compose/kafka-ui-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ services:
KAFKA_CLUSTERS_0_SCHEMAREGISTRY: http://schema-registry0:8085
KAFKA_CLUSTERS_0_KAFKACONNECT_0_NAME: first
KAFKA_CLUSTERS_0_KAFKACONNECT_0_ADDRESS: http://kafka-connect0:8083
DYNAMIC_CONFIG_ENABLED: 'true' # not necessary, added for tests

kafka0:
image: confluentinc/cp-kafka:7.2.1.arm64
Expand Down
69 changes: 4 additions & 65 deletions documentation/compose/kafka-ui-jmx-secured.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,21 @@ services:
image: provectuslabs/kafka-ui:latest
ports:
- 8080:8080
- 5005:5005
depends_on:
- kafka0
- schemaregistry0
- kafka-connect0
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka0:29092
KAFKA_CLUSTERS_0_SCHEMAREGISTRY: http://schemaregistry0:8085
KAFKA_CLUSTERS_0_KAFKACONNECT_0_NAME: first
KAFKA_CLUSTERS_0_KAFKACONNECT_0_ADDRESS: http://kafka-connect0:8083
KAFKA_CLUSTERS_0_METRICS_PORT: 9997
KAFKA_CLUSTERS_0_METRICS_SSL: 'true'
KAFKA_CLUSTERS_0_METRICS_USERNAME: root
KAFKA_CLUSTERS_0_METRICS_PASSWORD: password
JAVA_OPTS: >-
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
-Djavax.net.ssl.trustStore=/jmx/clienttruststore
-Djavax.net.ssl.trustStorePassword=12345678
-Djavax.net.ssl.keyStore=/jmx/clientkeystore
-Djavax.net.ssl.keyStorePassword=12345678
KAFKA_CLUSTERS_0_METRICS_KEYSTORE_LOCATION: /jmx/clientkeystore
KAFKA_CLUSTERS_0_METRICS_KEYSTORE_PASSWORD: '12345678'
KAFKA_CLUSTERS_0_SSL_TRUSTSTORE_LOCATION: /jmx/clienttruststore
KAFKA_CLUSTERS_0_SSL_TRUSTSTORE_PASSWORD: '12345678'
volumes:
- ./jmx/clienttruststore:/jmx/clienttruststore
- ./jmx/clientkeystore:/jmx/clientkeystore
Expand Down Expand Up @@ -70,65 +64,10 @@ services:
-Dcom.sun.management.jmxremote.access.file=/jmx/jmxremote.access
-Dcom.sun.management.jmxremote.rmi.port=9997
-Djava.rmi.server.hostname=kafka0
-Djava.rmi.server.logCalls=true
# -Djavax.net.debug=ssl:handshake
volumes:
- ./jmx/serverkeystore:/jmx/serverkeystore
- ./jmx/servertruststore:/jmx/servertruststore
- ./jmx/jmxremote.password:/jmx/jmxremote.password
- ./jmx/jmxremote.access:/jmx/jmxremote.access
- ./scripts/update_run.sh:/tmp/update_run.sh
command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'"

schemaregistry0:
image: confluentinc/cp-schema-registry:7.2.1
ports:
- 8085:8085
depends_on:
- kafka0
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka0:29092
SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL: PLAINTEXT
SCHEMA_REGISTRY_HOST_NAME: schemaregistry0
SCHEMA_REGISTRY_LISTENERS: http://schemaregistry0:8085

SCHEMA_REGISTRY_SCHEMA_REGISTRY_INTER_INSTANCE_PROTOCOL: "http"
SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL: INFO
SCHEMA_REGISTRY_KAFKASTORE_TOPIC: _schemas

kafka-connect0:
image: confluentinc/cp-kafka-connect:7.2.1
ports:
- 8083:8083
depends_on:
- kafka0
- schemaregistry0
environment:
CONNECT_BOOTSTRAP_SERVERS: kafka0:29092
CONNECT_GROUP_ID: compose-connect-group
CONNECT_CONFIG_STORAGE_TOPIC: _connect_configs
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
CONNECT_OFFSET_STORAGE_TOPIC: _connect_offset
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
CONNECT_STATUS_STORAGE_TOPIC: _connect_status
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
CONNECT_KEY_CONVERTER: org.apache.kafka.connect.storage.StringConverter
CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL: http://schemaregistry0:8085
CONNECT_VALUE_CONVERTER: org.apache.kafka.connect.storage.StringConverter
CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: http://schemaregistry0:8085
CONNECT_INTERNAL_KEY_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_INTERNAL_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_REST_ADVERTISED_HOST_NAME: kafka-connect0
CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components"

kafka-init-topics:
image: confluentinc/cp-kafka:7.2.1
volumes:
- ./message.json:/data/message.json
depends_on:
- kafka0
command: "bash -c 'echo Waiting for Kafka to be ready... && \
cub kafka-ready -b kafka0:29092 1 30 && \
kafka-topics --create --topic second.users --partitions 3 --replication-factor 1 --if-not-exists --bootstrap-server kafka0:29092 && \
kafka-topics --create --topic first.messages --partitions 2 --replication-factor 1 --if-not-exists --bootstrap-server kafka0:29092 && \
kafka-console-producer --bootstrap-server kafka0:29092 --topic second.users < /data/message.json'"
3 changes: 2 additions & 1 deletion documentation/compose/kafka-ui-sasl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ services:
KAFKA_CLUSTERS_0_PROPERTIES_SECURITY_PROTOCOL: SASL_PLAINTEXT
KAFKA_CLUSTERS_0_PROPERTIES_SASL_MECHANISM: PLAIN
KAFKA_CLUSTERS_0_PROPERTIES_SASL_JAAS_CONFIG: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="admin" password="admin-secret";'
DYNAMIC_CONFIG_ENABLED: true # not necessary for sasl auth, added for tests

kafka:
image: confluentinc/cp-kafka:7.2.1
Expand Down Expand Up @@ -48,4 +49,4 @@ services:
volumes:
- ./scripts/update_run.sh:/tmp/update_run.sh
- ./jaas:/etc/kafka/jaas
command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'"
command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'"
15 changes: 9 additions & 6 deletions documentation/compose/kafka-ui-serdes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ services:
kafka.clusters.0.name: SerdeExampleCluster
kafka.clusters.0.bootstrapServers: kafka0:29092
kafka.clusters.0.schemaRegistry: http://schemaregistry0:8085
# optional auth and ssl properties for SR

# optional SSL settings for cluster (will be used by SchemaRegistry serde, if set)
#kafka.clusters.0.ssl.keystoreLocation: /kafka.keystore.jks
#kafka.clusters.0.ssl.keystorePassword: "secret"
#kafka.clusters.0.ssl.truststoreLocation: /kafka.truststore.jks
#kafka.clusters.0.ssl.truststorePassword: "secret"

# optional auth properties for SR
#kafka.clusters.0.schemaRegistryAuth.username: "use"
#kafka.clusters.0.schemaRegistryAuth.password: "pswrd"
#kafka.clusters.0.schemaRegistrySSL.keystoreLocation: /kafka.keystore.jks
#kafka.clusters.0.schemaRegistrySSL.keystorePassword: "secret"
#kafka.clusters.0.schemaRegistrySSL.truststoreLocation: /kafka.truststore.jks
#kafka.clusters.0.schemaRegistrySSL.truststorePassword: "secret"

kafka.clusters.0.defaultKeySerde: Int32 #optional
kafka.clusters.0.defaultValueSerde: String #optional
Expand Down Expand Up @@ -51,7 +54,7 @@ services:
kafka.clusters.0.serde.4.properties.keySchemaNameTemplate: "%s-key"
kafka.clusters.0.serde.4.properties.schemaNameTemplate: "%s-value"
#kafka.clusters.0.serde.4.topicValuesPattern: "sr2-topic.*"
# optional auth and ssl properties for SR:
# optional auth and ssl properties for SR (overrides cluster-level):
#kafka.clusters.0.serde.4.properties.username: "user"
#kafka.clusters.0.serde.4.properties.password: "passw"
#kafka.clusters.0.serde.4.properties.keystoreLocation: /kafka.keystore.jks
Expand Down
1 change: 1 addition & 0 deletions documentation/compose/kafka-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
KAFKA_CLUSTERS_1_BOOTSTRAPSERVERS: kafka1:29092
KAFKA_CLUSTERS_1_METRICS_PORT: 9998
KAFKA_CLUSTERS_1_SCHEMAREGISTRY: http://schemaregistry1:8085
DYNAMIC_CONFIG_ENABLED: 'true'

kafka0:
image: confluentinc/cp-kafka:7.2.1
Expand Down
7 changes: 6 additions & 1 deletion kafka-ui-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ FROM azul/zulu-openjdk-alpine:17-jre
RUN apk add --no-cache gcompat # need to make snappy codec work
RUN addgroup -S kafkaui && adduser -S kafkaui -G kafkaui

# creating folder for dynamic config usage (certificates uploads, etc)
RUN mkdir /etc/kafkaui/
RUN chown kafkaui /etc/kafkaui

USER kafkaui

ARG JAR_FILE
Expand All @@ -12,4 +16,5 @@ ENV JAVA_OPTS=

EXPOSE 8080

CMD java $JAVA_OPTS -jar kafka-ui-api.jar
# see JmxSslSocketFactory docs to understand why add-opens is needed
CMD java --add-opens java.rmi/javax.rmi.ssl=ALL-UNNAMED $JAVA_OPTS -jar kafka-ui-api.jar
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.provectus.kafka.ui;

import org.springframework.boot.SpringApplication;
import com.provectus.kafka.ui.util.DynamicConfigOperations;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

Expand All @@ -12,6 +14,13 @@
public class KafkaUiApplication {

public static void main(String[] args) {
SpringApplication.run(KafkaUiApplication.class, args);
startApplication(args);
}

public static ConfigurableApplicationContext startApplication(String[] args) {
return new SpringApplicationBuilder(KafkaUiApplication.class)
.initializers(DynamicConfigOperations.dynamicConfigPropertiesInitializer())
.build()
.run(args);
}
}
Loading

0 comments on commit e72f6d6

Please sign in to comment.