You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2022/04/27 17:28:00 UTC
[jira] [Updated] (BEAM-10723) SSL authentication key set to trustMaterial instead of keyMaterial
[ https://issues.apache.org/jira/browse/BEAM-10723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Beam JIRA Bot updated BEAM-10723:
---------------------------------
Labels: stale-P2 (was: )
> SSL authentication key set to trustMaterial instead of keyMaterial
> ------------------------------------------------------------------
>
> Key: BEAM-10723
> URL: https://issues.apache.org/jira/browse/BEAM-10723
> Project: Beam
> Issue Type: Bug
> Components: io-java-elasticsearch
> Affects Versions: 2.19.0
> Reporter: Marek Simunek
> Priority: P2
> Labels: stale-P2
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> 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:
> {code:java}
> ElasticsearchIO.write()
> .withConnectionConfiguration(
> ElasticsearchIO.ConnectionConfiguration
> .create(config.addresses().toArray(new String[0]), config.index(), config.type())
> .withKeystorePath(config.keystorePath())
> .withKeystorePassword("somepassword")
> .withTrustSelfSignedCerts(true));
> {code}
> I cannot authenticate.
> I got
> {code:java}
> Caused by: javax.net.ssl.SSLException: Received fatal alert: bad_certificate
> {code}
> because the authetication key is set to trustMaterial instead of keyMaterial
> {code:java}
> SSLContexts.custom().loadTrustMaterial(keyStore, trustStrategy).build();
> {code}
> via [code|https://github.com/apache/beam/blob/release-2.19.0/sdks/java/io/elasticsearch/src/main/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIO.java#L439]
> I am working on fix
--
This message was sent by Atlassian Jira
(v8.20.7#820007)