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

"KeyStoreException: Keystore not specified" when only truststore is configured in config client configuration. #2514

Closed
KrishnaST opened this issue Sep 4, 2024 · 2 comments

Comments

@KrishnaST
Copy link

KrishnaST commented Sep 4, 2024

I have TLS enabled eureka server. Microservice is trying to fetch configuration from config server throws "KeyStoreException: Keystore not specified" when only truststore is configured. should be able to trust server certificate by truststore configuration. There is no mutual authentication.

Following is micro-service configuration
image

It seems that there is no way to configure truststore without configuring the keystore even when mutual authentication is not required.

org.springframework.cloud.configuration.SSLContextFactory
image

Spring Config Client Version : 4.1.3

@ryanjbaxter
Copy link
Contributor

Is that because builder.loadKeyMaterial throws an exception and we never call builder.loadTrustMaterial? Can you provide a sample to reproduce the error?

@KrishnaST
Copy link
Author

KrishnaST commented Sep 5, 2024

Yes, call to loadKeyMaterial will throws a KeystoreException and the execution will never reach the loadTrust.

Here is a minimal sample to reproduce the error and log.
config-client-log.log

https://github.com/KrishnaST/Config-Client-TLS-Issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants