camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-11597) Adding support for setting authentication client properties for elasticsearch
Date Sat, 29 Jul 2017 16:48:02 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-11597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16106175#comment-16106175
] 

ASF GitHub Bot commented on CAMEL-11597:
----------------------------------------

GitHub user fharms opened a pull request:

    https://github.com/apache/camel/pull/1857

    CAMEL-11597 Support for ElasticSearch Client Authentication 

    Adding properties for setting the username and password for client authentication to the
ElasticSearch cluster.
    
    - Properties for adjust timeouts etc. Useful when connecting to the ElasticSearch cloud.

    - Allow to override the client from the component for advanced use cases, eg like using
truststore 
    - Upgrade ELK to 5.5
    
    Unfortunately I have not found a good way to unittest with XPACK client because it require
it can be found on the classpath. Adding XPACK client as a test artifact require we add a
new remote repository, so that could be a way to make it testable. 
    ```xml
    <repository>
        <id>elasticsearch-releases</id>     
        <url>https://artifacts.elastic.co/maven</url>
        <releases>
          <enabled>true</enabled>
        </releases>
        <snapshots>
          <enabled>false</enabled>
        </snapshots>
    </repository>
    ```
    However I did run manual tests, but I'm open for suggestions. But before using a lot of
time you may consider replace the client with the new REST High level API in the near future.
    
    https://discuss.elastic.co/t/can-use-xpack-transporter-client-to-access-a-basic-elasticsearch-server/94815

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/fharms/camel CAMEL-11597-elk-auth-properties

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1857.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1857
    
----
commit cab690658ac88f92df87bb2b0c5e108688ad2315
Author: fharms <flemming.harms@gmail.com>
Date:   2017-07-26T18:16:26Z

    [CAMEL-11597] Adding support for authentication with x-pack
    
    - Upgrade ElasticSearch to 5.5
    - Adding support for overriding the client for advance use cases

commit 04e3875ae626e21b514fd0159ed049dc0d57220a
Author: fharms <flemming.harms@gmail.com>
Date:   2017-07-27T08:53:34Z

    [CAMEL-11597] Disable sniffing by default.
    
    -Remove client.transport.ignore_cluster_name setting
    -Rename property

commit 1bbf42a094e41fdf94abde82d3452fb96ae49242
Author: fharms <flemming.harms@gmail.com>
Date:   2017-07-29T13:18:18Z

    [CAMEL-11597] Remove hard dependency on XPack client
    
    If the XPack client exist on the classpath it use the
    PreBuiltXPackTransportClient for connection to the instance, otherwise
    the PreBuiltTransportClient

----


> Adding support for setting authentication client properties for elasticsearch
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-11597
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11597
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-elasticsearch5
>    Affects Versions: 2.20.0
>            Reporter: Flemming Harms
>            Priority: Minor
>
> The current implementation does not allow to override the client instance or setup client
authentication.
> Adding following additional properties for support authentication
> {code:java}
> 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();
>  }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message