Skip to content

Commit 4d54614

Browse files
construct RemoteClusterTransportInterceptor in security plugin and call new constructor
1 parent 9b5aa27 commit 4d54614

File tree

1 file changed

+13
-4
lines changed
  • x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security

1 file changed

+13
-4
lines changed

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/Security.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,8 @@
417417
import org.elasticsearch.xpack.security.support.ReloadableSecurityComponent;
418418
import org.elasticsearch.xpack.security.support.SecurityMigrations;
419419
import org.elasticsearch.xpack.security.support.SecuritySystemIndices;
420+
import org.elasticsearch.xpack.security.transport.CrossClusterAccessTransportInterceptor;
421+
import org.elasticsearch.xpack.security.transport.RemoteClusterTransportInterceptor;
420422
import org.elasticsearch.xpack.security.transport.SecurityHttpSettings;
421423
import org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor;
422424
import org.elasticsearch.xpack.security.transport.filter.IPFilter;
@@ -1164,17 +1166,24 @@ Collection<Object> createComponents(
11641166
DestructiveOperations destructiveOperations = new DestructiveOperations(settings, clusterService.getClusterSettings());
11651167
crossClusterAccessAuthcService.set(new CrossClusterAccessAuthenticationService(clusterService, apiKeyService, authcService.get()));
11661168
components.add(crossClusterAccessAuthcService.get());
1169+
1170+
RemoteClusterTransportInterceptor remoteClusterTransportInterceptor = new CrossClusterAccessTransportInterceptor(
1171+
crossClusterAccessAuthcService.get(),
1172+
authcService.get(),
1173+
authzService,
1174+
getLicenseState(),
1175+
securityContext.get(),
1176+
threadPool,
1177+
settings
1178+
);
11671179
securityInterceptor.set(
11681180
new SecurityServerTransportInterceptor(
11691181
settings,
11701182
threadPool,
1171-
authcService.get(),
1172-
authzService,
11731183
getSslService(),
11741184
securityContext.get(),
11751185
destructiveOperations,
1176-
crossClusterAccessAuthcService.get(),
1177-
getLicenseState()
1186+
remoteClusterTransportInterceptor
11781187
)
11791188
);
11801189

0 commit comments

Comments
 (0)