From a977fad63559bf1d5aafeafa27298bdb87c680e6 Mon Sep 17 00:00:00 2001 From: conorbros Date: Wed, 14 Feb 2024 15:51:26 +1100 Subject: [PATCH 1/4] kafka sasl tests --- shotover-proxy/config/config.yaml | 8 +- shotover-proxy/tests/kafka_int_tests/mod.rs | 28 +++ .../tests/kafka_int_tests/test_cases.rs | 16 ++ .../kafka/cluster-sasl/docker-compose.yaml | 46 ++++ .../cluster-sasl/tls/docker-compose.yaml | 16 ++ .../cluster-sasl/tls/topology-with-key.yaml | 17 ++ .../kafka/cluster-sasl/tls/topology.yaml | 15 ++ .../kafka/cluster-sasl/topology-single.yaml | 10 + .../kafka/cluster-sasl/topology1.yaml | 13 ++ .../kafka/cluster-sasl/topology2.yaml | 13 ++ .../kafka/cluster-sasl/topology3.yaml | 13 ++ .../certs/kafka-generate-ssl.sh | 207 ++++++++++++++++++ .../passthrough-sasl/certs/kafka.keystore.jks | Bin 0 -> 4814 bytes .../certs/kafka.truststore.jks | Bin 0 -> 1286 bytes .../passthrough-sasl/docker-compose.yaml | 32 +++ .../kafka/passthrough-sasl/save.yaml | 24 ++ .../passthrough-sasl/topology-encode.yaml | 12 + .../kafka/passthrough-sasl/topology.yaml | 9 + test-helpers/src/docker_compose.rs | 7 +- 19 files changed, 481 insertions(+), 5 deletions(-) create mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/docker-compose.yaml create mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/docker-compose.yaml create mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology-with-key.yaml create mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology.yaml create mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology-single.yaml create mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology1.yaml create mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology2.yaml create mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology3.yaml create mode 100755 shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka-generate-ssl.sh create mode 100644 shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka.keystore.jks create mode 100644 shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka.truststore.jks create mode 100644 shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml create mode 100644 shotover-proxy/tests/test-configs/kafka/passthrough-sasl/save.yaml create mode 100644 shotover-proxy/tests/test-configs/kafka/passthrough-sasl/topology-encode.yaml create mode 100644 shotover-proxy/tests/test-configs/kafka/passthrough-sasl/topology.yaml diff --git a/shotover-proxy/config/config.yaml b/shotover-proxy/config/config.yaml index 85830d979..72664ac38 100644 --- a/shotover-proxy/config/config.yaml +++ b/shotover-proxy/config/config.yaml @@ -1,5 +1,5 @@ -# configure the first `info` to set the log level for dependencies -# configure `shotover=info` to set the log level for shotover itself -# set `shotover::connection_span=info` to `shotover::connection_span=debug` to attach connection info to most log events, this is disabled by default due to a minor performance hit. -main_log_level: "info, shotover=info, shotover::connection_span=info" +# configure the first `debug` to set the log level for dependencies +# configure `shotover=debug` to set the log level for shotover itself +# set `shotover::connection_span=debug` to `shotover::connection_span=debug` to attach connection info to most log events, this is disabled by default due to a minor performance hit. +main_log_level: "debug, shotover=debug, shotover::connection_span=debug" observability_interface: "0.0.0.0:9001" diff --git a/shotover-proxy/tests/kafka_int_tests/mod.rs b/shotover-proxy/tests/kafka_int_tests/mod.rs index 0195e449e..740692543 100644 --- a/shotover-proxy/tests/kafka_int_tests/mod.rs +++ b/shotover-proxy/tests/kafka_int_tests/mod.rs @@ -62,6 +62,34 @@ async fn passthrough_encode() { shotover.shutdown_and_then_consume_events(&[]).await; } +#[cfg(feature = "rdkafka-driver-tests")] +#[tokio::test] +async fn passthrough_sasl() { + let _docker_compose = + docker_compose("tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml"); + let shotover = shotover_process("tests/test-configs/kafka/passthrough-sasl/topology.yaml") + .start() + .await; + + test_cases::basic_sasl("127.0.0.1:9192").await; + + shotover.shutdown_and_then_consume_events(&[]).await; +} + +#[cfg(feature = "rdkafka-driver-tests")] +#[tokio::test] +async fn passthrough_sasl_encode() { + let _docker_compose = + docker_compose("tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml"); + let shotover = shotover_process("tests/test-configs/kafka/passthrough-sasl/topology.yaml") + .start() + .await; + + test_cases::basic_sasl("127.0.0.1:9192").await; + + shotover.shutdown_and_then_consume_events(&[]).await; +} + #[cfg(feature = "rdkafka-driver-tests")] #[tokio::test] async fn cluster_single_shotover() { diff --git a/shotover-proxy/tests/kafka_int_tests/test_cases.rs b/shotover-proxy/tests/kafka_int_tests/test_cases.rs index 77a428455..e91d5561f 100644 --- a/shotover-proxy/tests/kafka_int_tests/test_cases.rs +++ b/shotover-proxy/tests/kafka_int_tests/test_cases.rs @@ -308,3 +308,19 @@ pub async fn basic(address: &str) { } admin_cleanup(client.clone()).await; } + +pub async fn basic_sasl(address: &str) { + let mut client = ClientConfig::new(); + client + .set("bootstrap.servers", address) + .set("sasl.mechanisms", "PLAIN") + .set("sasl.username", "user") + .set("sasl.password", "password") + .set("security.protocol", "SASL_PLAINTEXT") + // internal driver debug logs are emitted to tokio tracing, assuming the appropriate filter is used by the tracing subscriber + .set("debug", "all"); + admin(client.clone()).await; + produce_consume(client.clone()).await; + produce_consume_acks0(client.clone()).await; + admin_cleanup(client.clone()).await; +} diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/docker-compose.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/docker-compose.yaml new file mode 100644 index 000000000..b7a3fe4a7 --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/docker-compose.yaml @@ -0,0 +1,46 @@ +version: "3" +networks: + cluster_subnet: + name: cluster_subnet + driver: bridge + ipam: + driver: default + config: + - subnet: 172.16.1.0/24 + gateway: 172.16.1.1 +services: + kafka0: + image: &image 'bitnami/kafka:3.4.0-debian-11-r22' + networks: + cluster_subnet: + ipv4_address: 172.16.1.2 + environment: &environment + KAFKA_CFG_LISTENERS: "PLAINTEXT://:9092,CONTROLLER://:9093" + KAFKA_CFG_ADVERTISED_LISTENERS: "PLAINTEXT://172.16.1.2:9092" + ALLOW_PLAINTEXT_LISTENER: "yes" + KAFKA_KRAFT_CLUSTER_ID: "abcdefghijklmnopqrstuv" + KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: "0@kafka0:9093,1@kafka1:9093,2@kafka2:9093" + KAFKA_CFG_NODE_ID: 0 + volumes: &volumes + - type: tmpfs + target: /bitnami/kafka + kafka1: + image: *image + networks: + cluster_subnet: + ipv4_address: 172.16.1.3 + environment: + <<: *environment + KAFKA_CFG_ADVERTISED_LISTENERS: "PLAINTEXT://172.16.1.3:9092" + KAFKA_CFG_NODE_ID: 1 + volumes: *volumes + kafka2: + image: *image + networks: + cluster_subnet: + ipv4_address: 172.16.1.4 + environment: + <<: *environment + KAFKA_CFG_ADVERTISED_LISTENERS: "PLAINTEXT://172.16.1.4:9092" + KAFKA_CFG_NODE_ID: 2 + volumes: *volumes diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/docker-compose.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/docker-compose.yaml new file mode 100644 index 000000000..22a18a91f --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/docker-compose.yaml @@ -0,0 +1,16 @@ +version: "3.3" +services: + cassandra-one: + image: shotover/cassandra-test:4.0.6-r1 + ports: + - "9042:9042" + environment: + MAX_HEAP_SIZE: "400M" + MIN_HEAP_SIZE: "400M" + HEAP_NEWSIZE: "48M" + volumes: + - type: tmpfs + target: /var/lib/cassandra + - type: bind + source: "./certs/keystore.p12" + target: "/etc/cassandra/certs/keystore.p12" diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology-with-key.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology-with-key.yaml new file mode 100644 index 000000000..4ccf1acc7 --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology-with-key.yaml @@ -0,0 +1,17 @@ +--- +sources: + - Cassandra: + name: "cassandra" + listen_addr: "127.0.0.1:9043" + tls: + certificate_path: "tests/test-configs/cassandra/tls/certs/localhost.crt" + private_key_path: "tests/test-configs/cassandra/tls/certs/localhost.key" + chain: + - CassandraSinkSingle: + remote_address: "localhost:9042" + connect_timeout_ms: 3000 + tls: + certificate_authority_path: "tests/test-configs/cassandra/tls/certs/localhost_CA.crt" + certificate_path: "tests/test-configs/cassandra/tls/certs/localhost.crt" + private_key_path: "tests/test-configs/cassandra/tls/certs/localhost.key" + verify_hostname: true diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology.yaml new file mode 100644 index 000000000..92ada6cf6 --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology.yaml @@ -0,0 +1,15 @@ +--- +sources: + - Cassandra: + name: "cassandra" + listen_addr: "127.0.0.1:9043" + tls: + certificate_path: "tests/test-configs/cassandra/tls/certs/localhost.crt" + private_key_path: "tests/test-configs/cassandra/tls/certs/localhost.key" + chain: + - CassandraSinkSingle: + remote_address: "localhost:9042" + connect_timeout_ms: 3000 + tls: + certificate_authority_path: "tests/test-configs/cassandra/tls/certs/localhost_CA.crt" + verify_hostname: true diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology-single.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology-single.yaml new file mode 100644 index 000000000..d38206e7f --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology-single.yaml @@ -0,0 +1,10 @@ +--- +sources: + - Kafka: + name: "kafka" + listen_addr: "127.0.0.1:9192" + chain: + - KafkaSinkCluster: + shotover_nodes: ["127.0.0.1:9192"] + first_contact_points: ["172.16.1.2:9092"] + connect_timeout_ms: 3000 diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology1.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology1.yaml new file mode 100644 index 000000000..11edd3e78 --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology1.yaml @@ -0,0 +1,13 @@ +--- +sources: + - Kafka: + name: "kafka" + listen_addr: "127.0.0.1:9191" + chain: + - KafkaSinkCluster: + shotover_nodes: + - "127.0.0.1:9191" + - "127.0.0.1:9192" + - "127.0.0.1:9193" + first_contact_points: ["172.16.1.2:9092"] + connect_timeout_ms: 3000 diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology2.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology2.yaml new file mode 100644 index 000000000..2269f83dc --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology2.yaml @@ -0,0 +1,13 @@ +--- +sources: + - Kafka: + name: "kafka" + listen_addr: "127.0.0.1:9192" + chain: + - KafkaSinkCluster: + shotover_nodes: + - "127.0.0.1:9191" + - "127.0.0.1:9192" + - "127.0.0.1:9193" + first_contact_points: ["172.16.1.2:9092"] + connect_timeout_ms: 3000 diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology3.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology3.yaml new file mode 100644 index 000000000..528030e24 --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology3.yaml @@ -0,0 +1,13 @@ +--- +sources: + - Kafka: + name: "kafka" + listen_addr: "127.0.0.1:9193" + chain: + - KafkaSinkCluster: + shotover_nodes: + - "127.0.0.1:9191" + - "127.0.0.1:9192" + - "127.0.0.1:9193" + first_contact_points: ["172.16.1.2:9092"] + connect_timeout_ms: 3000 diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka-generate-ssl.sh b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka-generate-ssl.sh new file mode 100755 index 000000000..39ff3f984 --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka-generate-ssl.sh @@ -0,0 +1,207 @@ +#!/usr/bin/env bash + +set -e + +KEYSTORE_FILENAME="kafka.keystore.jks" +VALIDITY_IN_DAYS=3650 +DEFAULT_TRUSTSTORE_FILENAME="kafka.truststore.jks" +TRUSTSTORE_WORKING_DIRECTORY="truststore" +KEYSTORE_WORKING_DIRECTORY="keystore" +CA_CERT_FILE="ca-cert" +KEYSTORE_SIGN_REQUEST="cert-file" +KEYSTORE_SIGN_REQUEST_SRL="ca-cert.srl" +KEYSTORE_SIGNED_CERT="cert-signed" + +function file_exists_and_exit() { + echo "'$1' cannot exist. Move or delete it before" + echo "re-running this script." + exit 1 +} + +if [ -e "$KEYSTORE_WORKING_DIRECTORY" ]; then + file_exists_and_exit $KEYSTORE_WORKING_DIRECTORY +fi + +if [ -e "$CA_CERT_FILE" ]; then + file_exists_and_exit $CA_CERT_FILE +fi + +if [ -e "$KEYSTORE_SIGN_REQUEST" ]; then + file_exists_and_exit $KEYSTORE_SIGN_REQUEST +fi + +if [ -e "$KEYSTORE_SIGN_REQUEST_SRL" ]; then + file_exists_and_exit $KEYSTORE_SIGN_REQUEST_SRL +fi + +if [ -e "$KEYSTORE_SIGNED_CERT" ]; then + file_exists_and_exit $KEYSTORE_SIGNED_CERT +fi + +echo +echo "Welcome to the Kafka SSL keystore and truststore generator script." + +echo +echo "First, do you need to generate a trust store and associated private key," +echo "or do you already have a trust store file and private key?" +echo +echo -n "Do you need to generate a trust store and associated private key? [yn] " +read generate_trust_store + +trust_store_file="" +trust_store_private_key_file="" + +if [ "$generate_trust_store" == "y" ]; then + if [ -e "$TRUSTSTORE_WORKING_DIRECTORY" ]; then + file_exists_and_exit $TRUSTSTORE_WORKING_DIRECTORY + fi + + mkdir $TRUSTSTORE_WORKING_DIRECTORY + echo + echo "OK, we'll generate a trust store and associated private key." + echo + echo "First, the private key." + echo + echo "You will be prompted for:" + echo " - A password for the private key. Remember this." + echo " - Information about you and your company." + echo " - NOTE that the Common Name (CN) is currently not important." + + openssl req -new -x509 -keyout $TRUSTSTORE_WORKING_DIRECTORY/ca-key \ + -out $TRUSTSTORE_WORKING_DIRECTORY/$CA_CERT_FILE -days $VALIDITY_IN_DAYS + + trust_store_private_key_file="$TRUSTSTORE_WORKING_DIRECTORY/ca-key" + + echo + echo "Two files were created:" + echo " - $TRUSTSTORE_WORKING_DIRECTORY/ca-key -- the private key used later to" + echo " sign certificates" + echo " - $TRUSTSTORE_WORKING_DIRECTORY/$CA_CERT_FILE -- the certificate that will be" + echo " stored in the trust store in a moment and serve as the certificate" + echo " authority (CA). Once this certificate has been stored in the trust" + echo " store, it will be deleted. It can be retrieved from the trust store via:" + echo " $ keytool -keystore -export -alias CARoot -rfc" + + echo + echo "Now the trust store will be generated from the certificate." + echo + echo "You will be prompted for:" + echo " - the trust store's password (labeled 'keystore'). Remember this" + echo " - a confirmation that you want to import the certificate" + + keytool -keystore $TRUSTSTORE_WORKING_DIRECTORY/$DEFAULT_TRUSTSTORE_FILENAME \ + -alias CARoot -import -file $TRUSTSTORE_WORKING_DIRECTORY/$CA_CERT_FILE + + trust_store_file="$TRUSTSTORE_WORKING_DIRECTORY/$DEFAULT_TRUSTSTORE_FILENAME" + + echo + echo "$TRUSTSTORE_WORKING_DIRECTORY/$DEFAULT_TRUSTSTORE_FILENAME was created." + + # don't need the cert because it's in the trust store. + rm $TRUSTSTORE_WORKING_DIRECTORY/$CA_CERT_FILE +else + echo + echo -n "Enter the path of the trust store file. " + read -e trust_store_file + + if ! [ -f $trust_store_file ]; then + echo "$trust_store_file isn't a file. Exiting." + exit 1 + fi + + echo -n "Enter the path of the trust store's private key. " + read -e trust_store_private_key_file + + if ! [ -f $trust_store_private_key_file ]; then + echo "$trust_store_private_key_file isn't a file. Exiting." + exit 1 + fi +fi + +echo +echo "Continuing with:" +echo " - trust store file: $trust_store_file" +echo " - trust store private key: $trust_store_private_key_file" + +mkdir $KEYSTORE_WORKING_DIRECTORY + +echo +echo "Now, a keystore will be generated. Each broker and logical client needs its own" +echo "keystore. This script will create only one keystore. Run this script multiple" +echo "times for multiple keystores." +echo +echo "You will be prompted for the following:" +echo " - A keystore password. Remember it." +echo " - Personal information, such as your name." +echo " NOTE: currently in Kafka, the Common Name (CN) does not need to be the FQDN of" +echo " this host. However, at some point, this may change. As such, make the CN" +echo " the FQDN. Some operating systems call the CN prompt 'first / last name'" +echo " - A key password, for the key being generated within the keystore. Remember this." + +# To learn more about CNs and FQDNs, read: +# https://docs.oracle.com/javase/7/docs/api/javax/net/ssl/X509ExtendedTrustManager.html + +keytool -keystore $KEYSTORE_WORKING_DIRECTORY/$KEYSTORE_FILENAME \ + -alias localhost -validity $VALIDITY_IN_DAYS -genkey -keyalg RSA + +echo +echo "'$KEYSTORE_WORKING_DIRECTORY/$KEYSTORE_FILENAME' now contains a key pair and a" +echo "self-signed certificate. Again, this keystore can only be used for one broker or" +echo "one logical client. Other brokers or clients need to generate their own keystores." + +echo +echo "Fetching the certificate from the trust store and storing in $CA_CERT_FILE." +echo +echo "You will be prompted for the trust store's password (labeled 'keystore')" + +keytool -keystore $trust_store_file -export -alias CARoot -rfc -file $CA_CERT_FILE + +echo +echo "Now a certificate signing request will be made to the keystore." +echo +echo "You will be prompted for the keystore's password." +keytool -keystore $KEYSTORE_WORKING_DIRECTORY/$KEYSTORE_FILENAME -alias localhost \ + -certreq -file $KEYSTORE_SIGN_REQUEST + +echo +echo "Now the trust store's private key (CA) will sign the keystore's certificate." +echo +echo "You will be prompted for the trust store's private key password." +openssl x509 -req -CA $CA_CERT_FILE -CAkey $trust_store_private_key_file \ + -in $KEYSTORE_SIGN_REQUEST -out $KEYSTORE_SIGNED_CERT \ + -days $VALIDITY_IN_DAYS -CAcreateserial +# creates $KEYSTORE_SIGN_REQUEST_SRL which is never used or needed. + +echo +echo "Now the CA will be imported into the keystore." +echo +echo "You will be prompted for the keystore's password and a confirmation that you want to" +echo "import the certificate." +keytool -keystore $KEYSTORE_WORKING_DIRECTORY/$KEYSTORE_FILENAME -alias CARoot \ + -import -file $CA_CERT_FILE +rm $CA_CERT_FILE # delete the trust store cert because it's stored in the trust store. + +echo +echo "Now the keystore's signed certificate will be imported back into the keystore." +echo +echo "You will be prompted for the keystore's password." +keytool -keystore $KEYSTORE_WORKING_DIRECTORY/$KEYSTORE_FILENAME -alias localhost -import \ + -file $KEYSTORE_SIGNED_CERT + +echo +echo "All done!" +echo +echo "Delete intermediate files? They are:" +echo " - '$KEYSTORE_SIGN_REQUEST_SRL': CA serial number" +echo " - '$KEYSTORE_SIGN_REQUEST': the keystore's certificate signing request" +echo " (that was fulfilled)" +echo " - '$KEYSTORE_SIGNED_CERT': the keystore's certificate, signed by the CA, and stored back" +echo " into the keystore" +echo -n "Delete? [yn] " +read delete_intermediate_files + +if [ "$delete_intermediate_files" == "y" ]; then + rm $KEYSTORE_SIGN_REQUEST_SRL + rm $KEYSTORE_SIGN_REQUEST + rm $KEYSTORE_SIGNED_CERT +fi diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka.keystore.jks b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka.keystore.jks new file mode 100644 index 0000000000000000000000000000000000000000..7fa25e52d36632828c176d0392f617d082117627 GIT binary patch literal 4814 zcma)AWmFUlvtD4?r4|q=i3OC7Wl0I8JEcLuMOr|YE-x=fQf+xN0B&#aM^>fO{(mLxTp$WN^DmtC*OEZ^|H~r4!@&HC!j||8zJOc)!@!2X4d6omN(tZ`K+*)7 zP_YV7Omd(hoD@HLDtG1M`C1MjSkCrMC$jg|{C|qp8u{4wT9u;}F$>A?~-=cxJ z%b#jzIF+d#G`W~as>p8Hcq%#RG%QdNjeDTcSGo62*JOt$lCtZ@k>*8leS(SGJWP)c}d2osmyo5@`&+R3n1s7ETtrgS%Y&+?_D#cNFAe9 z0Y~gh=EY~dV&N+1fa?WX@Qj1XE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OaL8$^my8Z4ASyO^v?BtgES1|ukkRcv zg19%wtfo? zfx0JNO>x+u1$22e=_7}^w1J!e)W{TTxQ4X{aUpl4^`w=h&Zlpt0QpVtegoRRR*fzf zWJIhcn3_?v-IltDpUdCXVfpK2yNG`pot;`S*O%$v;|EE(fAa606q6hYM6h#uWtST8 zOvpUjO1KN!yuNh$PtGIHlUpI+(8Cl!iqUO?Tsa5s);@UhCo(}yVkhou>%#A7%A(3U zPihaLopb5r=RefB`KvQD*KhI#t?=AAxVW4&T-zoK0Au~Fm*SRlEuizQc88v$PQN## zJxSU7aS1bU4fxJ{(NoOZHd(Fj(1S=l9Eo_kd~ymEk8Ni+pzyQ1 zvTnuKa}_R{$bb~6nZdD;EPmY64_GX0w$ruKL&gOO;q()~W>hq)4j7#gm7B6ZHE-h9 z`Y$SdCmJI>fsm&9L-_H9MD?2y8EQ720tLSzWu_h)v~nU}h;H{*)2tjbxBGmtjN~%{ z_FZ;y-mV5=n2ABc=S4-R!adJ%&kjn9_+dxV{e9^xY^f)77)%BW#~@bei`cnWZKpEZ z4P)`A724eCnkE4wM!ANub^U7$(|2kG*wIAK! z<*+RxH`Q4MLd`u{X|ETKf^(ci@1iLMUp^5j_mUvkpbMUqr{LAZ467^7VOM*fsEA1> zL)tekMR=2BCSBIuLPXYCd>-u_)6dca3&ogThXN^|s-NOTQ6!Rdee z8nhO+JI;utQhUbL(}?79L_H2rZYDM9ENfJK;ztG0$Tfzf!$J){Zp3*s*{r@v`lKo-7BbR#X>!QU z0*dM)%yS7!r0?uvoeg-Qt|7o->$Cb^eG6@(akx~hMG~*OtntD-*8np4;=E(j|US2 z8vvwt(pRJ@ltO0+RV5k@X!oA%5Xaw0)7JBbNxTx06<_cLl2*6^-jgg@|1o;Nncx<% On$UO|)%V{g$$tSbUh_Tx literal 0 HcmV?d00001 diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka.truststore.jks b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka.truststore.jks new file mode 100644 index 0000000000000000000000000000000000000000..71b6c435a370ab58bb251b54985dfccf6340c4bb GIT binary patch literal 1286 zcmV+h1^N0gf&~Hs0Ru3C1gr)LDuzgg_YDCD0ic2eodkjenJ|I`l`w(?kp>AWhDe6@ z4FLxRpn?Q~FoFbr0s#Opf&_O42`Yw2hW8Bt2LUi<1_>&LNQU+thDZTr0|Wso1Q2vNWIS6j9XS^8$0q0uenEhO1OVvACk)g0!6xd*EOEefOx4!1 zg(gqjNCT@utWfE4i!}a9!`;a`Y!U-9{(lZLqwL# z#vG!+at_d6^wv6>@wK^&8Bbnh0rOcKNn*PiwT?p+=Qf-T$nSHHUM~@=-8(WQD0Ebz#>naaXCp0G= z3A*xqh?ZnJ(X2GaT_x}@)o_y^dWPUNi_-iBg(hk&@jL$!VauxO4i?G*S$DqB?7+(C zF{bTfFsA+_vQLssGZqRJw2=!05I!*pL3YDuN8j$=g+ixtOSW9H|qZ7nR=2u>m-KzAg_=>_Q#dbUF0VMER;n=U0mk$1-Yd z43*G=YQVd`F{-9s?x8*Z32+LFO!as3h2g+|?mLUX`-Q(D*-#HRAbW&6zXtLlwI0?$ z%xv5@4|dfhLV<`Kq(@fQfeqo7==Yx#E?8l8LgU+Qu0CE)1i9?)mJot|We7O60+j2b zCjMC3D0?ak0WG|(#QHgux_O4JQuonPC_44io~J@xIoHw}J+$G~LqmGZ^+DT$4Q!pP zj^Bw%)W#W8y@k;+L$J=UZYh(VdTdHGx3FdZ?fI6ejxi5VAh1ZlwvI6zz82M^8L_FDnrZ~vk~^=T-=QgOZUbArkmjYN9Hgx zRyEu9dg;ejg1?f_+Ov;&P-uz${wlr^$K~_WZTMI7H&d^r90_BDXm)%tYp;OvC3B~N zH`^=uUrfe^8iW?V_%SvT*h?@?FflL<1_@w>NC9O71OfpC00bZg?qli;f=~8$6ElMh wBz~Vu!49>^hDG#A?`@$5&DP)q6g2C(_Kq+>wQDyuRDdF?+9LyglmY@L5NGR1E&u=k literal 0 HcmV?d00001 diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml new file mode 100644 index 000000000..798741697 --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml @@ -0,0 +1,32 @@ +version: '2' + +services: + kafka: + image: 'bitnami/kafka:latest' + ports: + - '9092:9092' + - '9093:9093' + environment: + - KAFKA_CFG_NODE_ID=0 + - KAFKA_CFG_PROCESS_ROLES=controller,broker + - KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka:9093 + - KAFKA_CFG_LISTENERS=SASL_PLAINTEXT://:9092,CONTROLLER://:9093 + - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:SASL_PLAINTEXT,SASL_PLAINTEXT:SASL_PLAINTEXT + - KAFKA_CFG_ADVERTISED_LISTENERS=SASL_PLAINTEXT://127.0.0.1:9092 + - KAFKA_CLIENT_USERS=user + - KAFKA_CLIENT_PASSWORDS=password + - KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER + - KAFKA_CFG_SASL_MECHANISM_CONTROLLER_PROTOCOL=PLAIN + - KAFKA_CONTROLLER_USER=controller_user + - KAFKA_CONTROLLER_PASSWORD=controller_password + - KAFKA_CFG_INTER_BROKER_LISTENER_NAME=SASL_PLAINTEXT + - KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL=PLAIN + - KAFKA_INTER_BROKER_USER=controller_user + - KAFKA_INTER_BROKER_PASSWORD=controller_password + - KAFKA_CERTIFICATE_PASSWORD=123456 + - KAFKA_TLS_TYPE=JKS # or PEM + - KAFKA_CFG_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM="" + - BITNAMI_DEBUG=true + volumes: + - './certs/kafka.keystore.jks:/opt/bitnami/kafka/config/certs/kafka.keystore.jks:ro' + - './certs/kafka.truststore.jks:/opt/bitnami/kafka/config/certs/kafka.truststore.jks:ro' diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/save.yaml b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/save.yaml new file mode 100644 index 000000000..9e02564a5 --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/save.yaml @@ -0,0 +1,24 @@ +version: "3" +services: + kafka: + image: 'bitnami/kafka:3.4.0-debian-11-r22' + ports: + - '9092:9092' + environment: + - KAFKA_CFG_LISTENERS=SASL_SSL://:9092,CONTROLLER://:9093 + - KAFKA_CFG_ADVERTISED_LISTENERS=SASL_SSL://localhost:9092 + - KAFKA_CLIENT_USERS=user + - KAFKA_CLIENT_PASSWORDS=password + - KAFKA_CLIENT_LISTENER_NAME=SASL_SSL + - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:SASL_PLAINTEXT,SASL_SSL:SASL_SSL + - KAFKA_CFG_SASL_MECHANISM_CONTROLLER_PROTOCOL=PLAIN + - KAFKA_CONTROLLER_USER=controller_user + - KAFKA_CONTROLLER_PASSWORD=controller_password + - KAFKA_KRAFT_CLUSTER_ID=abcdefghijklmnopqrstuv + - BITNAMI_DEBUG=true + volumes: + - type: tmpfs + target: /bitnami/kafka + - type: bind + source: "./certs/jks" + target: "/bitnami/kafka/config/certs" diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/topology-encode.yaml b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/topology-encode.yaml new file mode 100644 index 000000000..d2a16eefc --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/topology-encode.yaml @@ -0,0 +1,12 @@ +--- +sources: + - Kafka: + name: "kafka" + listen_addr: "127.0.0.1:9192" + chain: + - DebugForceEncode: + encode_requests: true + encode_responses: true + - KafkaSinkSingle: + destination_port: 9092 + connect_timeout_ms: 3000 diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/topology.yaml b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/topology.yaml new file mode 100644 index 000000000..3d6131156 --- /dev/null +++ b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/topology.yaml @@ -0,0 +1,9 @@ +--- +sources: + - Kafka: + name: "kafka" + listen_addr: "127.0.0.1:9192" + chain: + - KafkaSinkSingle: + destination_port: 9092 + connect_timeout_ms: 3000 diff --git a/test-helpers/src/docker_compose.rs b/test-helpers/src/docker_compose.rs index f512fe7e8..7eab582a9 100644 --- a/test-helpers/src/docker_compose.rs +++ b/test-helpers/src/docker_compose.rs @@ -20,7 +20,7 @@ pub fn new_moto() -> DockerCompose { docker_compose("tests/transforms/docker-compose-moto.yaml") } -pub static IMAGE_WAITERS: [Image; 11] = [ +pub static IMAGE_WAITERS: [Image; 12] = [ Image { name: "motoserver/moto", log_regex_to_wait_for: r"Press CTRL\+C to quit", @@ -68,6 +68,11 @@ pub static IMAGE_WAITERS: [Image; 11] = [ log_regex_to_wait_for: r"Kafka Server started", timeout: Duration::from_secs(120), }, + Image { + name: "bitnami/kafka:latest", + log_regex_to_wait_for: r"Kafka Server started", + timeout: Duration::from_secs(120), + }, Image { name: "opensearchproject/opensearch:2.9.0", log_regex_to_wait_for: r"Node started", From c570f40b260a09627560948431de9a43e419c32e Mon Sep 17 00:00:00 2001 From: conorbros Date: Tue, 20 Feb 2024 11:16:06 +1100 Subject: [PATCH 2/4] cleanup --- .../kafka/cluster-sasl/docker-compose.yaml | 46 ------------------- .../cluster-sasl/tls/docker-compose.yaml | 16 ------- .../cluster-sasl/tls/topology-with-key.yaml | 17 ------- .../kafka/cluster-sasl/tls/topology.yaml | 15 ------ .../kafka/cluster-sasl/topology-single.yaml | 10 ---- .../kafka/cluster-sasl/topology1.yaml | 13 ------ .../kafka/cluster-sasl/topology2.yaml | 13 ------ .../kafka/cluster-sasl/topology3.yaml | 13 ------ .../passthrough-sasl/docker-compose.yaml | 12 ++--- 9 files changed, 6 insertions(+), 149 deletions(-) delete mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/docker-compose.yaml delete mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/docker-compose.yaml delete mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology-with-key.yaml delete mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology.yaml delete mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology-single.yaml delete mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology1.yaml delete mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology2.yaml delete mode 100644 shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology3.yaml diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/docker-compose.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/docker-compose.yaml deleted file mode 100644 index b7a3fe4a7..000000000 --- a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/docker-compose.yaml +++ /dev/null @@ -1,46 +0,0 @@ -version: "3" -networks: - cluster_subnet: - name: cluster_subnet - driver: bridge - ipam: - driver: default - config: - - subnet: 172.16.1.0/24 - gateway: 172.16.1.1 -services: - kafka0: - image: &image 'bitnami/kafka:3.4.0-debian-11-r22' - networks: - cluster_subnet: - ipv4_address: 172.16.1.2 - environment: &environment - KAFKA_CFG_LISTENERS: "PLAINTEXT://:9092,CONTROLLER://:9093" - KAFKA_CFG_ADVERTISED_LISTENERS: "PLAINTEXT://172.16.1.2:9092" - ALLOW_PLAINTEXT_LISTENER: "yes" - KAFKA_KRAFT_CLUSTER_ID: "abcdefghijklmnopqrstuv" - KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: "0@kafka0:9093,1@kafka1:9093,2@kafka2:9093" - KAFKA_CFG_NODE_ID: 0 - volumes: &volumes - - type: tmpfs - target: /bitnami/kafka - kafka1: - image: *image - networks: - cluster_subnet: - ipv4_address: 172.16.1.3 - environment: - <<: *environment - KAFKA_CFG_ADVERTISED_LISTENERS: "PLAINTEXT://172.16.1.3:9092" - KAFKA_CFG_NODE_ID: 1 - volumes: *volumes - kafka2: - image: *image - networks: - cluster_subnet: - ipv4_address: 172.16.1.4 - environment: - <<: *environment - KAFKA_CFG_ADVERTISED_LISTENERS: "PLAINTEXT://172.16.1.4:9092" - KAFKA_CFG_NODE_ID: 2 - volumes: *volumes diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/docker-compose.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/docker-compose.yaml deleted file mode 100644 index 22a18a91f..000000000 --- a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/docker-compose.yaml +++ /dev/null @@ -1,16 +0,0 @@ -version: "3.3" -services: - cassandra-one: - image: shotover/cassandra-test:4.0.6-r1 - ports: - - "9042:9042" - environment: - MAX_HEAP_SIZE: "400M" - MIN_HEAP_SIZE: "400M" - HEAP_NEWSIZE: "48M" - volumes: - - type: tmpfs - target: /var/lib/cassandra - - type: bind - source: "./certs/keystore.p12" - target: "/etc/cassandra/certs/keystore.p12" diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology-with-key.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology-with-key.yaml deleted file mode 100644 index 4ccf1acc7..000000000 --- a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology-with-key.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -sources: - - Cassandra: - name: "cassandra" - listen_addr: "127.0.0.1:9043" - tls: - certificate_path: "tests/test-configs/cassandra/tls/certs/localhost.crt" - private_key_path: "tests/test-configs/cassandra/tls/certs/localhost.key" - chain: - - CassandraSinkSingle: - remote_address: "localhost:9042" - connect_timeout_ms: 3000 - tls: - certificate_authority_path: "tests/test-configs/cassandra/tls/certs/localhost_CA.crt" - certificate_path: "tests/test-configs/cassandra/tls/certs/localhost.crt" - private_key_path: "tests/test-configs/cassandra/tls/certs/localhost.key" - verify_hostname: true diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology.yaml deleted file mode 100644 index 92ada6cf6..000000000 --- a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/tls/topology.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -sources: - - Cassandra: - name: "cassandra" - listen_addr: "127.0.0.1:9043" - tls: - certificate_path: "tests/test-configs/cassandra/tls/certs/localhost.crt" - private_key_path: "tests/test-configs/cassandra/tls/certs/localhost.key" - chain: - - CassandraSinkSingle: - remote_address: "localhost:9042" - connect_timeout_ms: 3000 - tls: - certificate_authority_path: "tests/test-configs/cassandra/tls/certs/localhost_CA.crt" - verify_hostname: true diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology-single.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology-single.yaml deleted file mode 100644 index d38206e7f..000000000 --- a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology-single.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -sources: - - Kafka: - name: "kafka" - listen_addr: "127.0.0.1:9192" - chain: - - KafkaSinkCluster: - shotover_nodes: ["127.0.0.1:9192"] - first_contact_points: ["172.16.1.2:9092"] - connect_timeout_ms: 3000 diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology1.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology1.yaml deleted file mode 100644 index 11edd3e78..000000000 --- a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology1.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -sources: - - Kafka: - name: "kafka" - listen_addr: "127.0.0.1:9191" - chain: - - KafkaSinkCluster: - shotover_nodes: - - "127.0.0.1:9191" - - "127.0.0.1:9192" - - "127.0.0.1:9193" - first_contact_points: ["172.16.1.2:9092"] - connect_timeout_ms: 3000 diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology2.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology2.yaml deleted file mode 100644 index 2269f83dc..000000000 --- a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology2.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -sources: - - Kafka: - name: "kafka" - listen_addr: "127.0.0.1:9192" - chain: - - KafkaSinkCluster: - shotover_nodes: - - "127.0.0.1:9191" - - "127.0.0.1:9192" - - "127.0.0.1:9193" - first_contact_points: ["172.16.1.2:9092"] - connect_timeout_ms: 3000 diff --git a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology3.yaml b/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology3.yaml deleted file mode 100644 index 528030e24..000000000 --- a/shotover-proxy/tests/test-configs/kafka/cluster-sasl/topology3.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -sources: - - Kafka: - name: "kafka" - listen_addr: "127.0.0.1:9193" - chain: - - KafkaSinkCluster: - shotover_nodes: - - "127.0.0.1:9191" - - "127.0.0.1:9192" - - "127.0.0.1:9193" - first_contact_points: ["172.16.1.2:9092"] - connect_timeout_ms: 3000 diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml index 798741697..26892466b 100644 --- a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml +++ b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml @@ -23,10 +23,10 @@ services: - KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL=PLAIN - KAFKA_INTER_BROKER_USER=controller_user - KAFKA_INTER_BROKER_PASSWORD=controller_password - - KAFKA_CERTIFICATE_PASSWORD=123456 - - KAFKA_TLS_TYPE=JKS # or PEM - - KAFKA_CFG_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM="" + # - KAFKA_CERTIFICATE_PASSWORD=123456 + # - KAFKA_TLS_TYPE=JKS # or PEM + # - KAFKA_CFG_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM="" - BITNAMI_DEBUG=true - volumes: - - './certs/kafka.keystore.jks:/opt/bitnami/kafka/config/certs/kafka.keystore.jks:ro' - - './certs/kafka.truststore.jks:/opt/bitnami/kafka/config/certs/kafka.truststore.jks:ro' + # volumes: + # - './certs/kafka.keystore.jks:/opt/bitnami/kafka/config/certs/kafka.keystore.jks:ro' + # - './certs/kafka.truststore.jks:/opt/bitnami/kafka/config/certs/kafka.truststore.jks:ro' From 867e28d1c7e3164aca0d18d2e2990a15fd4ed188 Mon Sep 17 00:00:00 2001 From: conorbros Date: Tue, 20 Feb 2024 11:58:19 +1100 Subject: [PATCH 3/4] cleanup --- .../passthrough-sasl/docker-compose.yaml | 8 +------ .../kafka/passthrough-sasl/save.yaml | 24 ------------------- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 shotover-proxy/tests/test-configs/kafka/passthrough-sasl/save.yaml diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml index 26892466b..f0d36dbbf 100644 --- a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml +++ b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml @@ -23,10 +23,4 @@ services: - KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL=PLAIN - KAFKA_INTER_BROKER_USER=controller_user - KAFKA_INTER_BROKER_PASSWORD=controller_password - # - KAFKA_CERTIFICATE_PASSWORD=123456 - # - KAFKA_TLS_TYPE=JKS # or PEM - # - KAFKA_CFG_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM="" - - BITNAMI_DEBUG=true - # volumes: - # - './certs/kafka.keystore.jks:/opt/bitnami/kafka/config/certs/kafka.keystore.jks:ro' - # - './certs/kafka.truststore.jks:/opt/bitnami/kafka/config/certs/kafka.truststore.jks:ro' + diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/save.yaml b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/save.yaml deleted file mode 100644 index 9e02564a5..000000000 --- a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/save.yaml +++ /dev/null @@ -1,24 +0,0 @@ -version: "3" -services: - kafka: - image: 'bitnami/kafka:3.4.0-debian-11-r22' - ports: - - '9092:9092' - environment: - - KAFKA_CFG_LISTENERS=SASL_SSL://:9092,CONTROLLER://:9093 - - KAFKA_CFG_ADVERTISED_LISTENERS=SASL_SSL://localhost:9092 - - KAFKA_CLIENT_USERS=user - - KAFKA_CLIENT_PASSWORDS=password - - KAFKA_CLIENT_LISTENER_NAME=SASL_SSL - - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:SASL_PLAINTEXT,SASL_SSL:SASL_SSL - - KAFKA_CFG_SASL_MECHANISM_CONTROLLER_PROTOCOL=PLAIN - - KAFKA_CONTROLLER_USER=controller_user - - KAFKA_CONTROLLER_PASSWORD=controller_password - - KAFKA_KRAFT_CLUSTER_ID=abcdefghijklmnopqrstuv - - BITNAMI_DEBUG=true - volumes: - - type: tmpfs - target: /bitnami/kafka - - type: bind - source: "./certs/jks" - target: "/bitnami/kafka/config/certs" From ede164c7c04e24cefd0441f5f0983f7b44c3c218 Mon Sep 17 00:00:00 2001 From: conorbros Date: Thu, 22 Feb 2024 10:47:54 +1100 Subject: [PATCH 4/4] review feedback --- shotover-proxy/config/config.yaml | 8 +- shotover-proxy/tests/kafka_int_tests/mod.rs | 7 +- .../tests/kafka_int_tests/test_cases.rs | 7 +- .../certs/kafka-generate-ssl.sh | 207 ------------------ .../passthrough-sasl/certs/kafka.keystore.jks | Bin 4814 -> 0 bytes .../certs/kafka.truststore.jks | Bin 1286 -> 0 bytes .../passthrough-sasl/docker-compose.yaml | 2 +- test-helpers/src/docker_compose.rs | 7 +- 8 files changed, 15 insertions(+), 223 deletions(-) delete mode 100755 shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka-generate-ssl.sh delete mode 100644 shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka.keystore.jks delete mode 100644 shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka.truststore.jks diff --git a/shotover-proxy/config/config.yaml b/shotover-proxy/config/config.yaml index 72664ac38..85830d979 100644 --- a/shotover-proxy/config/config.yaml +++ b/shotover-proxy/config/config.yaml @@ -1,5 +1,5 @@ -# configure the first `debug` to set the log level for dependencies -# configure `shotover=debug` to set the log level for shotover itself -# set `shotover::connection_span=debug` to `shotover::connection_span=debug` to attach connection info to most log events, this is disabled by default due to a minor performance hit. -main_log_level: "debug, shotover=debug, shotover::connection_span=debug" +# configure the first `info` to set the log level for dependencies +# configure `shotover=info` to set the log level for shotover itself +# set `shotover::connection_span=info` to `shotover::connection_span=debug` to attach connection info to most log events, this is disabled by default due to a minor performance hit. +main_log_level: "info, shotover=info, shotover::connection_span=info" observability_interface: "0.0.0.0:9001" diff --git a/shotover-proxy/tests/kafka_int_tests/mod.rs b/shotover-proxy/tests/kafka_int_tests/mod.rs index 740692543..75e19c997 100644 --- a/shotover-proxy/tests/kafka_int_tests/mod.rs +++ b/shotover-proxy/tests/kafka_int_tests/mod.rs @@ -81,9 +81,10 @@ async fn passthrough_sasl() { async fn passthrough_sasl_encode() { let _docker_compose = docker_compose("tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml"); - let shotover = shotover_process("tests/test-configs/kafka/passthrough-sasl/topology.yaml") - .start() - .await; + let shotover = + shotover_process("tests/test-configs/kafka/passthrough-sasl/topology-encode.yaml") + .start() + .await; test_cases::basic_sasl("127.0.0.1:9192").await; diff --git a/shotover-proxy/tests/kafka_int_tests/test_cases.rs b/shotover-proxy/tests/kafka_int_tests/test_cases.rs index e91d5561f..a7d6be1cf 100644 --- a/shotover-proxy/tests/kafka_int_tests/test_cases.rs +++ b/shotover-proxy/tests/kafka_int_tests/test_cases.rs @@ -320,7 +320,10 @@ pub async fn basic_sasl(address: &str) { // internal driver debug logs are emitted to tokio tracing, assuming the appropriate filter is used by the tracing subscriber .set("debug", "all"); admin(client.clone()).await; - produce_consume(client.clone()).await; - produce_consume_acks0(client.clone()).await; + for i in 0..2 { + produce_consume(client.clone(), "partitions1", i).await; + produce_consume(client.clone(), "partitions3", i).await; + produce_consume_acks0(client.clone()).await; + } admin_cleanup(client.clone()).await; } diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka-generate-ssl.sh b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka-generate-ssl.sh deleted file mode 100755 index 39ff3f984..000000000 --- a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka-generate-ssl.sh +++ /dev/null @@ -1,207 +0,0 @@ -#!/usr/bin/env bash - -set -e - -KEYSTORE_FILENAME="kafka.keystore.jks" -VALIDITY_IN_DAYS=3650 -DEFAULT_TRUSTSTORE_FILENAME="kafka.truststore.jks" -TRUSTSTORE_WORKING_DIRECTORY="truststore" -KEYSTORE_WORKING_DIRECTORY="keystore" -CA_CERT_FILE="ca-cert" -KEYSTORE_SIGN_REQUEST="cert-file" -KEYSTORE_SIGN_REQUEST_SRL="ca-cert.srl" -KEYSTORE_SIGNED_CERT="cert-signed" - -function file_exists_and_exit() { - echo "'$1' cannot exist. Move or delete it before" - echo "re-running this script." - exit 1 -} - -if [ -e "$KEYSTORE_WORKING_DIRECTORY" ]; then - file_exists_and_exit $KEYSTORE_WORKING_DIRECTORY -fi - -if [ -e "$CA_CERT_FILE" ]; then - file_exists_and_exit $CA_CERT_FILE -fi - -if [ -e "$KEYSTORE_SIGN_REQUEST" ]; then - file_exists_and_exit $KEYSTORE_SIGN_REQUEST -fi - -if [ -e "$KEYSTORE_SIGN_REQUEST_SRL" ]; then - file_exists_and_exit $KEYSTORE_SIGN_REQUEST_SRL -fi - -if [ -e "$KEYSTORE_SIGNED_CERT" ]; then - file_exists_and_exit $KEYSTORE_SIGNED_CERT -fi - -echo -echo "Welcome to the Kafka SSL keystore and truststore generator script." - -echo -echo "First, do you need to generate a trust store and associated private key," -echo "or do you already have a trust store file and private key?" -echo -echo -n "Do you need to generate a trust store and associated private key? [yn] " -read generate_trust_store - -trust_store_file="" -trust_store_private_key_file="" - -if [ "$generate_trust_store" == "y" ]; then - if [ -e "$TRUSTSTORE_WORKING_DIRECTORY" ]; then - file_exists_and_exit $TRUSTSTORE_WORKING_DIRECTORY - fi - - mkdir $TRUSTSTORE_WORKING_DIRECTORY - echo - echo "OK, we'll generate a trust store and associated private key." - echo - echo "First, the private key." - echo - echo "You will be prompted for:" - echo " - A password for the private key. Remember this." - echo " - Information about you and your company." - echo " - NOTE that the Common Name (CN) is currently not important." - - openssl req -new -x509 -keyout $TRUSTSTORE_WORKING_DIRECTORY/ca-key \ - -out $TRUSTSTORE_WORKING_DIRECTORY/$CA_CERT_FILE -days $VALIDITY_IN_DAYS - - trust_store_private_key_file="$TRUSTSTORE_WORKING_DIRECTORY/ca-key" - - echo - echo "Two files were created:" - echo " - $TRUSTSTORE_WORKING_DIRECTORY/ca-key -- the private key used later to" - echo " sign certificates" - echo " - $TRUSTSTORE_WORKING_DIRECTORY/$CA_CERT_FILE -- the certificate that will be" - echo " stored in the trust store in a moment and serve as the certificate" - echo " authority (CA). Once this certificate has been stored in the trust" - echo " store, it will be deleted. It can be retrieved from the trust store via:" - echo " $ keytool -keystore -export -alias CARoot -rfc" - - echo - echo "Now the trust store will be generated from the certificate." - echo - echo "You will be prompted for:" - echo " - the trust store's password (labeled 'keystore'). Remember this" - echo " - a confirmation that you want to import the certificate" - - keytool -keystore $TRUSTSTORE_WORKING_DIRECTORY/$DEFAULT_TRUSTSTORE_FILENAME \ - -alias CARoot -import -file $TRUSTSTORE_WORKING_DIRECTORY/$CA_CERT_FILE - - trust_store_file="$TRUSTSTORE_WORKING_DIRECTORY/$DEFAULT_TRUSTSTORE_FILENAME" - - echo - echo "$TRUSTSTORE_WORKING_DIRECTORY/$DEFAULT_TRUSTSTORE_FILENAME was created." - - # don't need the cert because it's in the trust store. - rm $TRUSTSTORE_WORKING_DIRECTORY/$CA_CERT_FILE -else - echo - echo -n "Enter the path of the trust store file. " - read -e trust_store_file - - if ! [ -f $trust_store_file ]; then - echo "$trust_store_file isn't a file. Exiting." - exit 1 - fi - - echo -n "Enter the path of the trust store's private key. " - read -e trust_store_private_key_file - - if ! [ -f $trust_store_private_key_file ]; then - echo "$trust_store_private_key_file isn't a file. Exiting." - exit 1 - fi -fi - -echo -echo "Continuing with:" -echo " - trust store file: $trust_store_file" -echo " - trust store private key: $trust_store_private_key_file" - -mkdir $KEYSTORE_WORKING_DIRECTORY - -echo -echo "Now, a keystore will be generated. Each broker and logical client needs its own" -echo "keystore. This script will create only one keystore. Run this script multiple" -echo "times for multiple keystores." -echo -echo "You will be prompted for the following:" -echo " - A keystore password. Remember it." -echo " - Personal information, such as your name." -echo " NOTE: currently in Kafka, the Common Name (CN) does not need to be the FQDN of" -echo " this host. However, at some point, this may change. As such, make the CN" -echo " the FQDN. Some operating systems call the CN prompt 'first / last name'" -echo " - A key password, for the key being generated within the keystore. Remember this." - -# To learn more about CNs and FQDNs, read: -# https://docs.oracle.com/javase/7/docs/api/javax/net/ssl/X509ExtendedTrustManager.html - -keytool -keystore $KEYSTORE_WORKING_DIRECTORY/$KEYSTORE_FILENAME \ - -alias localhost -validity $VALIDITY_IN_DAYS -genkey -keyalg RSA - -echo -echo "'$KEYSTORE_WORKING_DIRECTORY/$KEYSTORE_FILENAME' now contains a key pair and a" -echo "self-signed certificate. Again, this keystore can only be used for one broker or" -echo "one logical client. Other brokers or clients need to generate their own keystores." - -echo -echo "Fetching the certificate from the trust store and storing in $CA_CERT_FILE." -echo -echo "You will be prompted for the trust store's password (labeled 'keystore')" - -keytool -keystore $trust_store_file -export -alias CARoot -rfc -file $CA_CERT_FILE - -echo -echo "Now a certificate signing request will be made to the keystore." -echo -echo "You will be prompted for the keystore's password." -keytool -keystore $KEYSTORE_WORKING_DIRECTORY/$KEYSTORE_FILENAME -alias localhost \ - -certreq -file $KEYSTORE_SIGN_REQUEST - -echo -echo "Now the trust store's private key (CA) will sign the keystore's certificate." -echo -echo "You will be prompted for the trust store's private key password." -openssl x509 -req -CA $CA_CERT_FILE -CAkey $trust_store_private_key_file \ - -in $KEYSTORE_SIGN_REQUEST -out $KEYSTORE_SIGNED_CERT \ - -days $VALIDITY_IN_DAYS -CAcreateserial -# creates $KEYSTORE_SIGN_REQUEST_SRL which is never used or needed. - -echo -echo "Now the CA will be imported into the keystore." -echo -echo "You will be prompted for the keystore's password and a confirmation that you want to" -echo "import the certificate." -keytool -keystore $KEYSTORE_WORKING_DIRECTORY/$KEYSTORE_FILENAME -alias CARoot \ - -import -file $CA_CERT_FILE -rm $CA_CERT_FILE # delete the trust store cert because it's stored in the trust store. - -echo -echo "Now the keystore's signed certificate will be imported back into the keystore." -echo -echo "You will be prompted for the keystore's password." -keytool -keystore $KEYSTORE_WORKING_DIRECTORY/$KEYSTORE_FILENAME -alias localhost -import \ - -file $KEYSTORE_SIGNED_CERT - -echo -echo "All done!" -echo -echo "Delete intermediate files? They are:" -echo " - '$KEYSTORE_SIGN_REQUEST_SRL': CA serial number" -echo " - '$KEYSTORE_SIGN_REQUEST': the keystore's certificate signing request" -echo " (that was fulfilled)" -echo " - '$KEYSTORE_SIGNED_CERT': the keystore's certificate, signed by the CA, and stored back" -echo " into the keystore" -echo -n "Delete? [yn] " -read delete_intermediate_files - -if [ "$delete_intermediate_files" == "y" ]; then - rm $KEYSTORE_SIGN_REQUEST_SRL - rm $KEYSTORE_SIGN_REQUEST - rm $KEYSTORE_SIGNED_CERT -fi diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka.keystore.jks b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka.keystore.jks deleted file mode 100644 index 7fa25e52d36632828c176d0392f617d082117627..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4814 zcma)AWmFUlvtD4?r4|q=i3OC7Wl0I8JEcLuMOr|YE-x=fQf+xN0B&#a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`lKo-7BbR#X>!QU z0*dM)%yS7!r0?uvoeg-Qt|7o->$Cb^eG6@(akx~hMG~*OtntD-*8np4;=E(j|US2 z8vvwt(pRJ@ltO0+RV5k@X!oA%5Xaw0)7JBbNxTx06<_cLl2*6^-jgg@|1o;Nncx<% On$UO|)%V{g$$tSbUh_Tx diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka.truststore.jks b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/certs/kafka.truststore.jks deleted file mode 100644 index 71b6c435a370ab58bb251b54985dfccf6340c4bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1286 zcmV+h1^N0gf&~Hs0Ru3C1gr)LDuzgg_YDCD0ic2eodkjenJ|I`l`w(?kp>AWhDe6@ z4FLxRpn?Q~FoFbr0s#Opf&_O42`Yw2hW8Bt2LUi<1_>&LNQU+thDZTr0|Wso1Q2vNWIS6j9XS^8$0q0uenEhO1OVvACk)g0!6xd*EOEefOx4!1 zg(gqjNCT@utWfE4i!}a9!`;a`Y!U-9{(lZLqwL# z#vG!+at_d6^wv6>@wK^&8Bbnh0rOcKNn*PiwT?p+=Qf-T$nSHHUM~@=-8(WQD0Ebz#>naaXCp0G= z3A*xqh?ZnJ(X2GaT_x}@)o_y^dWPUNi_-iBg(hk&@jL$!VauxO4i?G*S$DqB?7+(C zF{bTfFsA+_vQLssGZqRJw2=!05I!*pL3YDuN8j$=g+ixtOSW9H|qZ7nR=2u>m-KzAg_=>_Q#dbUF0VMER;n=U0mk$1-Yd z43*G=YQVd`F{-9s?x8*Z32+LFO!as3h2g+|?mLUX`-Q(D*-#HRAbW&6zXtLlwI0?$ z%xv5@4|dfhLV<`Kq(@fQfeqo7==Yx#E?8l8LgU+Qu0CE)1i9?)mJot|We7O60+j2b zCjMC3D0?ak0WG|(#QHgux_O4JQuonPC_44io~J@xIoHw}J+$G~LqmGZ^+DT$4Q!pP zj^Bw%)W#W8y@k;+L$J=UZYh(VdTdHGx3FdZ?fI6ejxi5VAh1ZlwvI6zz82M^8L_FDnrZ~vk~^=T-=QgOZUbArkmjYN9Hgx zRyEu9dg;ejg1?f_+Ov;&P-uz${wlr^$K~_WZTMI7H&d^r90_BDXm)%tYp;OvC3B~N zH`^=uUrfe^8iW?V_%SvT*h?@?FflL<1_@w>NC9O71OfpC00bZg?qli;f=~8$6ElMh wBz~Vu!49>^hDG#A?`@$5&DP)q6g2C(_Kq+>wQDyuRDdF?+9LyglmY@L5NGR1E&u=k diff --git a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml index f0d36dbbf..63c802715 100644 --- a/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml +++ b/shotover-proxy/tests/test-configs/kafka/passthrough-sasl/docker-compose.yaml @@ -2,7 +2,7 @@ version: '2' services: kafka: - image: 'bitnami/kafka:latest' + image: 'bitnami/kafka:3.6.1-debian-11-r24' ports: - '9092:9092' - '9093:9093' diff --git a/test-helpers/src/docker_compose.rs b/test-helpers/src/docker_compose.rs index 7eab582a9..f512fe7e8 100644 --- a/test-helpers/src/docker_compose.rs +++ b/test-helpers/src/docker_compose.rs @@ -20,7 +20,7 @@ pub fn new_moto() -> DockerCompose { docker_compose("tests/transforms/docker-compose-moto.yaml") } -pub static IMAGE_WAITERS: [Image; 12] = [ +pub static IMAGE_WAITERS: [Image; 11] = [ Image { name: "motoserver/moto", log_regex_to_wait_for: r"Press CTRL\+C to quit", @@ -68,11 +68,6 @@ pub static IMAGE_WAITERS: [Image; 12] = [ log_regex_to_wait_for: r"Kafka Server started", timeout: Duration::from_secs(120), }, - Image { - name: "bitnami/kafka:latest", - log_regex_to_wait_for: r"Kafka Server started", - timeout: Duration::from_secs(120), - }, Image { name: "opensearchproject/opensearch:2.9.0", log_regex_to_wait_for: r"Node started",