You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/09/01 09:02:00 UTC

[jira] [Work logged] (BEAM-10723) SSL authentication key set to trustMaterial instead of keyMaterial

     [ https://issues.apache.org/jira/browse/BEAM-10723?focusedWorklogId=477078&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-477078 ]

ASF GitHub Bot logged work on BEAM-10723:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Sep/20 09:01
            Start Date: 01/Sep/20 09:01
    Worklog Time Spent: 10m 
      Work Description: echauchot commented on pull request #12610:
URL: https://github.com/apache/beam/pull/12610#issuecomment-684614563


   Hi @dmvk, I'm just back from vacation, thanks for taking the review ! 


----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 477078)
    Time Spent: 40m  (was: 0.5h)

> 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
>          Time Spent: 40m
>  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)