Enable/disable Shield in Node Client

Hello all,

I am coding a Java application that will connect to various Elasticseach
instances, some of them are secured by Shield, some are unsecured. I need
have a choice to connect via NodeClient (only not secured instances) or
TransportClient (both secured and not secured instances). This requires me
to have shield as Maven dependency in my project, but in a situation when I
connect via NodeClient to a not secured instance, Shield comes in a way and
complains about the lack of license plugin. I would like to
disable/bypass/not use Shield plugin in such a scenario - is there a
property I can set?

Example code:

        final Node node = 

nodeBuilder().clusterName(clusterName).client(true).node();
client = node.client();

I can connect via this code to a not secured instance, but in a moment I
add Shield as a Maven dependency, it starts to complain about the license.

I found a similar thread on StackOverflow, but there is no response there:

Thank you in advance for advice.

Tom

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3941330e-9e85-49a0-b95f-cf7fe5c51a4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Tom,

For the nodes that you don't want to use Shield with, you should be able to
add the following to your node creation line:

.settings(ImmutableSettings.builder().put("shield.enabled", false))

-Jay

On Tuesday, April 28, 2015 at 7:27:51 AM UTC-4, Tom wrote:

Hello all,

I am coding a Java application that will connect to various Elasticseach
instances, some of them are secured by Shield, some are unsecured. I need
have a choice to connect via NodeClient (only not secured instances) or
TransportClient (both secured and not secured instances). This requires me
to have shield as Maven dependency in my project, but in a situation when I
connect via NodeClient to a not secured instance, Shield comes in a way and
complains about the lack of license plugin. I would like to
disable/bypass/not use Shield plugin in such a scenario - is there a
property I can set?

Example code:

        final Node node = 

nodeBuilder().clusterName(clusterName).client(true).node();
client = node.client();

I can connect via this code to a not secured instance, but in a moment I
add Shield as a Maven dependency, it starts to complain about the license.

I found a similar thread on StackOverflow, but there is no response there:
http://stackoverflow.com/questions/29744120/disabling-shield-for-intergration-tests

Thank you in advance for advice.

Tom

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/593abe50-08f0-40b3-bacf-27beec15b6e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thank you, Jay. It actually worked for me, I should have checked the
solution from the SO thread despite authors negative claims. :slight_smile:

On Tuesday, 28 April 2015 15:29:14 UTC+2, Jay Modi wrote:

Hi Tom,

For the nodes that you don't want to use Shield with, you should be able
to add the following to your node creation line:

.settings(ImmutableSettings.builder().put("shield.enabled", false))

-Jay

On Tuesday, April 28, 2015 at 7:27:51 AM UTC-4, Tom wrote:

Hello all,

I am coding a Java application that will connect to various Elasticseach
instances, some of them are secured by Shield, some are unsecured. I need
have a choice to connect via NodeClient (only not secured instances) or
TransportClient (both secured and not secured instances). This requires me
to have shield as Maven dependency in my project, but in a situation when I
connect via NodeClient to a not secured instance, Shield comes in a way and
complains about the lack of license plugin. I would like to
disable/bypass/not use Shield plugin in such a scenario - is there a
property I can set?

Example code:

        final Node node = 

nodeBuilder().clusterName(clusterName).client(true).node();
client = node.client();

I can connect via this code to a not secured instance, but in a moment I
add Shield as a Maven dependency, it starts to complain about the license.

I found a similar thread on StackOverflow, but there is no response
there:
http://stackoverflow.com/questions/29744120/disabling-shield-for-intergration-tests

Thank you in advance for advice.

Tom

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ce3ff310-f9c1-4e27-b28b-5ce6da07d54a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.