Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-10723

SSL authentication key set to trustMaterial instead of keyMaterial

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Triage Needed
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 2.19.0
    • Fix Version/s: None
    • Component/s: io-java-elasticsearch
    • Labels:
      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

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              marek.simunek Marek Simunek

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m

                  Issue deployment