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

SSL authentication key set to trustMaterial instead of keyMaterial

Details

    • Bug
    • Status: Open
    • P3
    • Resolution: Unresolved
    • 2.19.0
    • None
    • io-java-elasticsearch
    • 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

          Activity

            People

              Unassigned Unassigned
              marek.simunek Marek Simunek
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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