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

Adding support for setting authentication client properties for elasticsearch

Agile BoardAttach filesAttach ScreenshotVotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.20.0
    • camel-elasticsearch5
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            davsclaus Claus Ibsen
            flemming.harms@gmail.com Flemming Harms
            Votes:
            0 Vote for this issue
            Watchers:
            5 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment