-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bitnami/schema-registry] Relax ssl options verifications in schema registry #74972
[bitnami/schema-registry] Relax ssl options verifications in schema registry #74972
Conversation
f6e345f
to
356cca6
Compare
356cca6
to
a7651cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Waiting for CI to be successful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After rethinking about this, I think we could preserve validations but using warnings instead of errors given they're applicable for most common use cases. Full example:
if [[ "$brokers_auth_protocol" =~ SSL ]]; then
if [[ ! -f ${SCHEMA_REGISTRY_CERTS_DIR}/schema-registry.keystore.jks ]] || [[ ! -f ${SCHEMA_REGISTRY_CERTS_DIR}/schema-registry.truststore.jks ]]; then
warn "In order to configure the TLS encryption for communication with Kafka brokers, most auth protocols require mounting your schema-registry.keystore.jks and schema-registry.truststore.jks certificates to the ${SCHEMA_REGISTRY_CERTS_DIR} directory."
fi
fi
if [[ "$brokers_auth_protocol" =~ SASL ]]; then
if [[ -z "$SCHEMA_REGISTRY_KAFKA_SASL_USERS" ]] || [[ -z "$SCHEMA_REGISTRY_KAFKA_SASL_PASSWORDS" ]]; then
warn "In order to configure SASL authentication for Kafka, most auth protocols require providing the SASL credentials. Set the environment variables SCHEMA_REGISTRY_KAFKA_SASL_USERS and SCHEMA_REGISTRY_KAFKA_SASL_PASSWORDS if your auth protocol requires it."
fi
fi
bitnami/schema-registry/7.4/debian-12/rootfs/opt/bitnami/scripts/libschemaregistry.sh
Outdated
Show resolved
Hide resolved
bitnami/schema-registry/7.4/debian-12/rootfs/opt/bitnami/scripts/libschemaregistry.sh
Outdated
Show resolved
Hide resolved
Signed-off-by: Michał Misiewicz <[email protected]>
a7651cc
to
578e2de
Compare
@juan131 I've just updated the code |
I’ve just tested the latest version with Managed Kafka, and it works perfectly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for applying the suggestions!
Triggering a new container release, it should be available in the next few hours |
Description of the change
The Schema Registry
libschemaregistry.sh
script enforces too strict validation of SSL environment variables, which prevents integration with Google Cloud Managed Service for Apache Kafka. This service requires SASL_SSL authentication without the use of a keystore or truststore. Details of the required configurations can be found here.In this PR, I relaxed the SSL validation rules to enable seamless integration with Managed Kafka.
I removed also the verification for
SCHEMA_REGISTRY_KAFKA_SASL_USERS
andSCHEMA_REGISTRY_KAFKA_SASL_PASSWORDS
, as these settings are not required for allsasl.mechanism
configurations. Example of configuration forsasl.mechanism= OAUTHBEARER
can be found here.Benefits
Schema registry image can connect to Google Cloud Managed Service for Apache Kafka.
Applicable issues
Additional information
I tested the update with Google Cloud Managed Service for Apache Kafka and successfully established a secure connection with Kafka.