Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11597

Adding support for setting authentication client properties for elasticsearch

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

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.20.0
    • Component/s: camel-elasticsearch5
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      The current implementation does not allow to override the client instance or setup client authentication.

      Adding following additional properties for support authentication

      final Settings.Builder settings = Settings.builder()
        .put("cluster.name", configuration.getClusterName())
        .put("client.transport.ignore_cluster_name", false)
        .put("client.transport.sniff", configuration.getClientTransportSniff())
        .put("transport.ping_schedule", configuration.getPingSchedule())
        .put("client.transport.ping_timeout", configuration.getPingTimeout())
        .put("client.transport.sniff", configuration.getClientTransportSniff())
        .put("xpack.security.transport.ssl.enabled", configuration.getEnabledSSL())
        .put("request.headers.X-Found-Cluster", configuration.getClusterName());
        if (configuration.getUser() != null && configuration.getPassword() != null) {
           settings.put("xpack.security.user", configuration.getUser() +":"+ configuration.getPassword());
         }
         return settings.build();
       }
      

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              flemming.harms@gmail.com Flemming Harms

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment