Skip to content
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

Schema Registry config generator scripts fail with provided values that contain an ampersand #76774

Open
Danny02 opened this issue Jan 29, 2025 · 1 comment
Assignees
Labels
schema-registry tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@Danny02
Copy link

Danny02 commented Jan 29, 2025

Name and Version

bitnami/schema-registry:7.8.0

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. use a SASL password with an ampersand &, e.g. SCHEMA_REGISTRY_KAFKA_SASL_PASSWORDS=my&password

What is the expected behavior?

config file /opt/bitnami/schema-registry/etc/schema-registry/schema-registry.properties contains

kafkastore.sasl.jaas.config = org.apache.kafka.common.security.scram.ScramLoginModule required username="user" password="my&password";

What do you see instead?

config file /opt/bitnami/schema-registry/etc/schema-registry/schema-registry.properties contains

kafkastore.sasl.jaas.config = org.apache.kafka.common.security.scram.ScramLoginModule required username="user" password="my# kafkastore.sasl.jaas.config =password";

Additional information

Function schema_registry_conf_set trys to set a key value pair in the config file by calling replace_in_file. The bug is that replace_in_file is using the value in a sed command that interprets the ampersand as a replacement.

I was able to workaround this issue by escaping the ampersand:

SCHEMA_REGISTRY_KAFKA_SASL_PASSWORDS='my\&password'
@Danny02 Danny02 added the tech-issues The user has a technical issue about an application label Jan 29, 2025
@github-actions github-actions bot added the triage Triage is needed label Jan 29, 2025
@carrodher
Copy link
Member

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
schema-registry tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants