Fixes Transport Client that start up with shield in the classpath
Now a NOOP transport filter is bound by to the secured transport service in a transport client Fixes elastic/elasticsearch#165 Original commit: elastic/x-pack-elasticsearch@7268bd445c
This commit is contained in:
parent
ce6646df2b
commit
3d71356596
|
@ -53,6 +53,7 @@ public class SecuredTransportModule extends AbstractShieldModule.Spawn implement
|
||||||
if (clientMode) {
|
if (clientMode) {
|
||||||
// no ip filtering on the client
|
// no ip filtering on the client
|
||||||
bind(N2NNettyUpstreamHandler.class).toProvider(Providers.<N2NNettyUpstreamHandler>of(null));
|
bind(N2NNettyUpstreamHandler.class).toProvider(Providers.<N2NNettyUpstreamHandler>of(null));
|
||||||
|
bind(TransportFilter.class).toInstance(TransportFilter.NOOP);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@ import org.elasticsearch.transport.TransportResponse;
|
||||||
*/
|
*/
|
||||||
public interface TransportFilter {
|
public interface TransportFilter {
|
||||||
|
|
||||||
|
static final TransportFilter NOOP = new Base();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called just before the given request is about to be sent. Any exception thrown
|
* Called just before the given request is about to be sent. Any exception thrown
|
||||||
* by this method will stop the request from being sent.
|
* by this method will stop the request from being sent.
|
||||||
|
|
Loading…
Reference in New Issue