Details
-
Bug
-
Status: Open
-
P3
-
Resolution: Unresolved
-
2.19.0
-
None
-
None
Description
If I set
ElasticsearchIO.ConnectionConfiguration#withKeystorePath
the keystore is set to trustMaterial which I think is wrong, because this keystore is suppose to be truststore for certificates.
So if I use keyStoreKey instead of username and pass:
ElasticsearchIO.write() .withConnectionConfiguration( ElasticsearchIO.ConnectionConfiguration .create(config.addresses().toArray(new String[0]), config.index(), config.type()) .withKeystorePath(config.keystorePath()) .withKeystorePassword("somepassword") .withTrustSelfSignedCerts(true));
I cannot authenticate.
I got
Caused by: javax.net.ssl.SSLException: Received fatal alert: bad_certificate
because the authetication key is set to trustMaterial instead of keyMaterial
SSLContexts.custom().loadTrustMaterial(keyStore, trustStrategy).build();
via code
I am working on fix
Attachments
Issue Links
- links to