Skip to content

Commit 1e0f67f

Browse files
jaymodetvernum
authored andcommitted
Deprecate transport profile security type setting (#43237)
This commit deprecates the `transport.profiles.*.xpack.security.type` setting. This setting is used to configure a profile that would only allow client actions. With the upcoming removal of the transport client the setting should also be deprecated so that it may be removed in a future version.
1 parent 455b12a commit 1e0f67f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/reference/security/securing-communications/separating-node-client-traffic.asciidoc

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
[[separating-node-client-traffic]]
33
=== Separating node-to-node and client traffic
44

5+
deprecated[7.3.0, Transport Client is deprecated and will be removed]
6+
57
Elasticsearch has the feature of so called
68
{ref}/modules-transport.html[TCP transport profiles]
79
that allows it to bind to several ports and addresses. The {es}

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import org.elasticsearch.cluster.service.ClusterService;
1414
import org.elasticsearch.common.CheckedConsumer;
1515
import org.elasticsearch.common.settings.Setting;
16+
import org.elasticsearch.common.settings.Setting.Property;
1617
import org.elasticsearch.common.settings.Settings;
1718
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
1819
import org.elasticsearch.common.util.concurrent.ThreadContext;
@@ -56,7 +57,7 @@ public class SecurityServerTransportInterceptor implements TransportInterceptor
5657
return v;
5758
}
5859
throw new IllegalArgumentException("type must be one of [client, node]");
59-
}, Setting.Property.NodeScope);
60+
}, Setting.Property.NodeScope, Property.Deprecated);
6061
private static final String TRANSPORT_TYPE_SETTING_KEY = "xpack.security.type";
6162
private static final Logger logger = LogManager.getLogger(SecurityServerTransportInterceptor.class);
6263

@@ -187,7 +188,8 @@ private Map<String, ServerTransportFilter> initializeProfileFilters(DestructiveO
187188
for (Map.Entry<String, SSLConfiguration> entry : profileConfigurations.entrySet()) {
188189
final SSLConfiguration profileConfiguration = entry.getValue();
189190
final boolean extractClientCert = transportSSLEnabled && sslService.isSSLClientAuthEnabled(profileConfiguration);
190-
final String type = TRANSPORT_TYPE_PROFILE_SETTING.getConcreteSettingForNamespace(entry.getKey()).get(settings);
191+
final Setting<String> transportType = TRANSPORT_TYPE_PROFILE_SETTING.getConcreteSettingForNamespace(entry.getKey());
192+
final String type = transportType.get(settings);
191193
switch (type) {
192194
case "client":
193195
profileFilters.put(entry.getKey(), new ServerTransportFilter.ClientProfile(authcService, authzService,

0 commit comments

Comments
 (0)