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

Add schema registry client configs to restservice to allow SSL connections #603

Merged
merged 2 commits into from
Mar 7, 2021

Conversation

alozano3
Copy link
Contributor

@alozano3 alozano3 commented Feb 15, 2021

Hi, I was trying to connect to my Schema Registry through HTTPS and I realized that i wasn't working although I was using the right configuration:

akhq:
  connections:
    kafka:  
      schema-registry:
         url: "http://schema-registry:8081" 
         basic-auth-username: basic-auth-user 
         basic-auth-password: basic-auth-pass
         properties: 
           schema.registry.ssl.truststore.location: /etc/CA-truststore.jks
           schema.registry.ssl.truststore.password: password 

I saw that the properties beginning with schema.registry are being used to configure the SSlFactory of the RestService in the constructor of the object CachedSchemaRegistryClient. Here is the link

So, when AKHQ instantiates only the RestService object, these properties are not being configured, and t is when the one way SSL connection fails.

THe PR contains the same code than the CachedSchemaRegistryClient to apply these properties to the RestService. Another option would be to use the wrapper of the CachedSchemaRegistryClient and reuse it to make all the requests instead of creating an instance of the RestService every time.

@tchiotludo tchiotludo merged commit e5f11c6 into tchiotludo:dev Mar 7, 2021
@tchiotludo
Copy link
Owner

thanks @alozano3, maybe you can add some insight on the README about that ?

@alozano3
Copy link
Contributor Author

alozano3 commented Mar 8, 2021

Sure. Can I use this same branch or should I open a new PR?

@tchiotludo
Copy link
Owner

You can use the same branch

flyinggecko pushed a commit to flyinggecko/akhq that referenced this pull request Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants