[
https://issues.apache.org/jira/browse/BEAM-10723?focusedWorklogId=508811&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-508811
]
ASF GitHub Bot logged work on BEAM-10723:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Nov/20 21:59
Start Date: 07/Nov/20 21:59
Worklog Time Spent: 10m
Work Description: stale[bot] commented on pull request #12610:
URL: https://github.com/apache/beam/pull/12610#issuecomment-723500383
This pull request has been marked as stale due to 60 days of inactivity. It
will be closed in 1 week if no further activity occurs. If you think that’s
incorrect or this pull request requires a review, please simply write any
comment. If closed, you can revive the PR at any time and @mention a reviewer
or discuss it on the [email protected] list. Thank you for your
contributions.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 508811)
Time Spent: 50m (was: 40m)
> 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: P3
> Time Spent: 50m
> 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.3.4#803005)