Hi Team! I truly hope I can get some inspiration o...
# troubleshooting
m
Hi Team! I truly hope I can get some inspiration or a push in the right direction from you. Context: We deployed Flink on K8s with the official operator. We want to deploy the SQL Gateway, which will allow users to query Kafka topics. We use the JAAS config in normal jobs and the SQL client CLI, like below. We want to eliminate passing the password in cleartext in the API call to the gateway. How to do that properly? The container can have the password as env variable or a file config, but I couldn't make it work (JAAS config path seems to be hardcoded and sql client doesn't support jinja and embedding the env variables). Please share ideas and what worked for you πŸ™‚ πŸ™ SQL we run:
Copy code
CREATE TABLE source__topic ( ... ) WITH (
              'connector' = 'kafka',
              'value.format' = 'avro-confluent',
...
              'properties.security.protocol' = 'SASL_SSL',
              'properties.sasl.mechanism' = 'SCRAM-SHA-512',
              'properties.sasl.jaas.config' = 'org.apache.kafka.common.security.scram.ScramLoginModule required username="..." password="...";');
We want to get rid of the explicit config passing. (if there's some form of authentication that doesn't require this in cleartext, also please point me to it πŸ™ )
In case anyone runs into the same issue, i figured it out: β€’ Create a JAAS config and mount it to the pod β€’ Set the env variable
JAVA_TOOL_OPTIONS="-Djava.security.auth.login.config=/path/to/mounted/config"
β€’ Now you don't need to pass it in the SQL config. βœ