Merge branch 'master' of https://github.com/elasticsearch/elasticsearch-shield into doc-feedback
Conflicts: docs/structured/03-getting-started.asciidoc docs/structured/06-ldap.asciidoc docs/structured/authentication/message-authentication.asciidoc Original commit: elastic/x-pack-elasticsearch@642beb53ca
This commit is contained in:
commit
d34c7cddf3
|
@ -129,7 +129,12 @@ public class SecurityFilter extends AbstractComponent {
|
|||
|
||||
@Override
|
||||
public void process(RestRequest request, RestChannel channel, RestFilterChain filterChain) throws Exception {
|
||||
filter.authenticate(request);
|
||||
|
||||
// CORS - allow for preflight unauthenticated OPTIONS request
|
||||
if (request.method() != RestRequest.Method.OPTIONS) {
|
||||
filter.authenticate(request);
|
||||
}
|
||||
|
||||
filterChain.continueProcessing(request, channel);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ public class SecuredTransportModule extends AbstractShieldModule.Spawn implement
|
|||
if (clientMode) {
|
||||
// no ip filtering on the client
|
||||
bind(N2NNettyUpstreamHandler.class).toProvider(Providers.<N2NNettyUpstreamHandler>of(null));
|
||||
bind(TransportFilter.class).toInstance(TransportFilter.NOOP);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@ import org.elasticsearch.transport.TransportResponse;
|
|||
*/
|
||||
public interface TransportFilter {
|
||||
|
||||
static final TransportFilter NOOP = new Base();
|
||||
|
||||
/**
|
||||
* Called just before the given request is about to be sent. Any exception thrown
|
||||
* by this method will stop the request from being sent.
|
||||
|
|
Loading…
Reference in New Issue