Skip to content

Commit 063f212

Browse files
add RemoteClusterTransportInterceptor interface
1 parent 06da8a4 commit 063f212

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0; you may not use this file except in compliance with the Elastic License
5+
* 2.0.
6+
*/
7+
8+
package org.elasticsearch.xpack.security.transport;
9+
10+
import org.elasticsearch.action.support.DestructiveOperations;
11+
import org.elasticsearch.transport.Transport;
12+
import org.elasticsearch.transport.TransportInterceptor;
13+
import org.elasticsearch.xpack.core.ssl.SslProfile;
14+
15+
import java.util.Map;
16+
17+
/**
18+
* Allows to provide remote cluster interception that's capable of intercepting remote connections
19+
* both on the receiver and the sender side.
20+
*/
21+
public interface RemoteClusterTransportInterceptor {
22+
23+
/**
24+
* Allows to intercept all transport requests on the sender side.
25+
*/
26+
TransportInterceptor.AsyncSender interceptSender(TransportInterceptor.AsyncSender sender);
27+
28+
/**
29+
* Returns {@code true} if the {@code connection} is targeting a remote cluster.
30+
*/
31+
boolean isRemoteClusterConnection(Transport.Connection connection);
32+
33+
/**
34+
* Allows providing custom {@link ServerTransportFilter} implementations per transport "profile".
35+
* The transport filter is called on the receiver side to filter incoming requests.
36+
*/
37+
Map<String, ServerTransportFilter> getProfileFilters(
38+
Map<String, SslProfile> profileConfigurations,
39+
DestructiveOperations destructiveOperations
40+
);
41+
42+
}

0 commit comments

Comments
 (0)