diff --git a/qa/shield-example-realm/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java b/qa/shield-example-realm/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java index 5a2eb0fdc62..dd1b6f857dc 100644 --- a/qa/shield-example-realm/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java +++ b/qa/shield-example-realm/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java @@ -68,7 +68,6 @@ public class CustomRealmIT extends ESIntegTestCase { String clusterName = nodeInfos.getClusterNameAsString(); Settings settings = Settings.builder() - .put("path.home", createTempDir()) .put("cluster.name", clusterName) .put(Headers.PREFIX + "." + CustomRealm.USER_HEADER, CustomRealm.KNOWN_USER) .put(Headers.PREFIX + "." + CustomRealm.PW_HEADER, CustomRealm.KNOWN_PW) @@ -89,7 +88,6 @@ public class CustomRealmIT extends ESIntegTestCase { String clusterName = nodeInfos.getClusterNameAsString(); Settings settings = Settings.builder() - .put("path.home", createTempDir()) .put("cluster.name", clusterName) .put(Headers.PREFIX + "." + CustomRealm.USER_HEADER, CustomRealm.KNOWN_USER + randomAsciiOfLength(1)) .put(Headers.PREFIX + "." + CustomRealm.PW_HEADER, CustomRealm.KNOWN_PW) diff --git a/shield/docs/public/configuring-clients-integrations/java.asciidoc b/shield/docs/public/configuring-clients-integrations/java.asciidoc index 5a0e9e4016e..787798d132a 100644 --- a/shield/docs/public/configuring-clients-integrations/java.asciidoc +++ b/shield/docs/public/configuring-clients-integrations/java.asciidoc @@ -88,7 +88,6 @@ TransportClient client = TransportClient.builder() .settings(Settings.builder() .put("cluster.name", "myClusterName") .put("shield.user", "transport_client_user:changeme") - .put("path.home", "/path/to/client/home") ... .build()) .addTransportAddress(new InetSocketTransportAddress("localhost", 9300)) @@ -117,7 +116,6 @@ TransportClient client = TransportClient.builder() .settings(Settings.builder() .put("cluster.name", "myClusterName") .put("shield.user", "transport_client_user:changeme") - .put("path.home", "/path/to/client/home") ... .build()) .build() @@ -149,7 +147,6 @@ TransportClient client = TransportClient.builder() .put("shield.user", "transport_client_user:changeme") .put("shield.ssl.keystore.path", "/path/to/client.jks") (1) .put("shield.ssl.keystore.password", "password") - .put("path.home", "/path/to/client/home") ... .build()); -------------------------------------------------------------------------------------------------- @@ -172,7 +169,6 @@ TransportClient client = TransportClient.builder() .put("shield.ssl.keystore.path", "/path/to/client.jks") (1) .put("shield.ssl.keystore.password", "password") .put("shield.transport.ssl", "true") - .put("path.home", "/path/to/client/home") ... .build()) .addTransportAddress(new InetSocketTransportAddress("localhost", 9300)) @@ -201,7 +197,6 @@ TransportClient client = TransportClient.builder() .put("shield.ssl.truststore.path", "/path/to/truststore.jks") (1) .put("shield.ssl.truststore.password", "password") .put("shield.transport.ssl", "true") - .put("path.home", "/path/to/client/home") ... .build()) .addTransportAddress(new InetSocketTransportAddress("localhost", 9300)) diff --git a/shield/src/main/java/org/elasticsearch/shield/audit/index/IndexAuditTrail.java b/shield/src/main/java/org/elasticsearch/shield/audit/index/IndexAuditTrail.java index 7cbf638fa4b..8bcaf2ac010 100644 --- a/shield/src/main/java/org/elasticsearch/shield/audit/index/IndexAuditTrail.java +++ b/shield/src/main/java/org/elasticsearch/shield/audit/index/IndexAuditTrail.java @@ -691,7 +691,6 @@ public class IndexAuditTrail extends AbstractComponent implements AuditTrail, Cl final TransportClient transportClient = TransportClient.builder() .settings(Settings.builder() .put("name", DEFAULT_CLIENT_NAME + "-" + settings.get("name")) - .put("path.home", environment.binFile().getParent()) .put(clientSettings)) .addPlugin(ShieldPlugin.class) .build(); diff --git a/shield/src/test/java/org/elasticsearch/shield/authc/RunAsIntegTests.java b/shield/src/test/java/org/elasticsearch/shield/authc/RunAsIntegTests.java index 124ab3b2a0b..e5072ae8028 100644 --- a/shield/src/test/java/org/elasticsearch/shield/authc/RunAsIntegTests.java +++ b/shield/src/test/java/org/elasticsearch/shield/authc/RunAsIntegTests.java @@ -198,7 +198,6 @@ public class RunAsIntegTests extends ShieldIntegTestCase { Settings settings = Settings.builder() .put(extraSettings) .put("cluster.name", clusterName) - .put("path.home", createTempDir()) .build(); return TransportClient.builder() diff --git a/shield/src/test/java/org/elasticsearch/shield/authc/pki/PkiAuthenticationTests.java b/shield/src/test/java/org/elasticsearch/shield/authc/pki/PkiAuthenticationTests.java index de8d8e3291e..5fa1bd850cc 100644 --- a/shield/src/test/java/org/elasticsearch/shield/authc/pki/PkiAuthenticationTests.java +++ b/shield/src/test/java/org/elasticsearch/shield/authc/pki/PkiAuthenticationTests.java @@ -137,7 +137,6 @@ public class PkiAuthenticationTests extends ShieldIntegTestCase { Settings.Builder builder = Settings.builder() .put(transportClientSettings()) .put(additionalSettings) - .put("path.home", createTempDir()) .put("cluster.name", internalCluster().getClusterName()); builder.remove("shield.user"); builder.remove("request.headers.Authorization"); diff --git a/shield/src/test/java/org/elasticsearch/shield/authc/pki/PkiOptionalClientAuthTests.java b/shield/src/test/java/org/elasticsearch/shield/authc/pki/PkiOptionalClientAuthTests.java index 82c296a0358..e6deeaadeb8 100644 --- a/shield/src/test/java/org/elasticsearch/shield/authc/pki/PkiOptionalClientAuthTests.java +++ b/shield/src/test/java/org/elasticsearch/shield/authc/pki/PkiOptionalClientAuthTests.java @@ -104,7 +104,6 @@ public class PkiOptionalClientAuthTests extends ShieldIntegTestCase { .put("shield.user", DEFAULT_USER_NAME + ":" + DEFAULT_PASSWORD) .put("cluster.name", internalCluster().getClusterName()) .put("shield.transport.ssl", true) - .put("path.home", createTempDir()) .build(); diff --git a/shield/src/test/java/org/elasticsearch/shield/transport/netty/SslHostnameVerificationTests.java b/shield/src/test/java/org/elasticsearch/shield/transport/netty/SslHostnameVerificationTests.java index 9581a92fde8..d5e82967f71 100644 --- a/shield/src/test/java/org/elasticsearch/shield/transport/netty/SslHostnameVerificationTests.java +++ b/shield/src/test/java/org/elasticsearch/shield/transport/netty/SslHostnameVerificationTests.java @@ -62,7 +62,6 @@ public class SslHostnameVerificationTests extends ShieldIntegTestCase { .put(ShieldNettyTransport.HOSTNAME_VERIFICATION_SETTING, false) .put("shield.ssl.truststore.path", keystore.toAbsolutePath()) // settings for client truststore .put("shield.ssl.truststore.password", "testnode-no-subjaltname") - .put("path.home", createTempDir()) .build(); } diff --git a/shield/src/test/java/org/elasticsearch/shield/transport/ssl/SslClientAuthTests.java b/shield/src/test/java/org/elasticsearch/shield/transport/ssl/SslClientAuthTests.java index 20469456e09..bbd0b8e2f1f 100644 --- a/shield/src/test/java/org/elasticsearch/shield/transport/ssl/SslClientAuthTests.java +++ b/shield/src/test/java/org/elasticsearch/shield/transport/ssl/SslClientAuthTests.java @@ -99,7 +99,6 @@ public class SslClientAuthTests extends ShieldIntegTestCase { } Settings settings = settingsBuilder() - .put("path.home", createTempDir()) .put("shield.transport.ssl", true) .put("shield.ssl.keystore.path", store) .put("shield.ssl.keystore.password", "testclient-client-profile") diff --git a/shield/src/test/java/org/elasticsearch/shield/transport/ssl/SslIntegrationTests.java b/shield/src/test/java/org/elasticsearch/shield/transport/ssl/SslIntegrationTests.java index 804ba27f914..5cc3a8039c7 100644 --- a/shield/src/test/java/org/elasticsearch/shield/transport/ssl/SslIntegrationTests.java +++ b/shield/src/test/java/org/elasticsearch/shield/transport/ssl/SslIntegrationTests.java @@ -60,7 +60,6 @@ public class SslIntegrationTests extends ShieldIntegTestCase { public void testThatUnconfiguredCiphersAreRejected() { try(TransportClient transportClient = TransportClient.builder().settings(settingsBuilder() .put(transportClientSettings()) - .put("path.home", createTempDir()) .put("name", "programmatic_transport_client") .put("cluster.name", internalCluster().getClusterName()) .putArray("shield.ssl.ciphers", new String[]{"TLS_ECDH_anon_WITH_RC4_128_SHA", "SSL_RSA_WITH_3DES_EDE_CBC_SHA"}) @@ -78,7 +77,6 @@ public class SslIntegrationTests extends ShieldIntegTestCase { public void testThatTransportClientUsingSSLv3ProtocolIsRejected() { try(TransportClient transportClient = TransportClient.builder().settings(settingsBuilder() .put(transportClientSettings()) - .put("path.home", createTempDir()) .put("name", "programmatic_transport_client") .put("cluster.name", internalCluster().getClusterName()) .putArray("shield.ssl.supported_protocols", new String[]{"SSLv3"}) diff --git a/shield/src/test/java/org/elasticsearch/shield/transport/ssl/SslMultiPortTests.java b/shield/src/test/java/org/elasticsearch/shield/transport/ssl/SslMultiPortTests.java index ee2654b1d5a..e1d95dc655d 100644 --- a/shield/src/test/java/org/elasticsearch/shield/transport/ssl/SslMultiPortTests.java +++ b/shield/src/test/java/org/elasticsearch/shield/transport/ssl/SslMultiPortTests.java @@ -87,7 +87,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { Settings settings = settingsBuilder().put(transportClientSettings()) .put("name", "programmatic_transport_client") .put("cluster.name", internalCluster().getClusterName()) - .put("path.home", createTempDir()) .put(additionalSettings) .build(); return TransportClient.builder().settings(settings) @@ -215,7 +214,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { Settings settings = settingsBuilder() .put("shield.user", DEFAULT_USER_NAME + ":" + DEFAULT_PASSWORD) .put("cluster.name", internalCluster().getClusterName()) - .put("path.home", createTempDir()) .build(); try (TransportClient transportClient = TransportClient.builder().settings(settings).addPlugin(ShieldPlugin.class).addPlugin(licensePluginClass()).build()) { transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_ssl"))); @@ -232,7 +230,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { Settings settings = settingsBuilder() .put("shield.user", DEFAULT_USER_NAME + ":" + DEFAULT_PASSWORD) .put("cluster.name", internalCluster().getClusterName()) - .put("path.home", createTempDir()) .build(); try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) { transportClient.addTransportAddress(internalCluster().getInstance(Transport.class).boundAddress().boundAddress()); @@ -249,7 +246,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { Settings settings = settingsBuilder() .put("shield.user", DEFAULT_USER_NAME + ":" + DEFAULT_PASSWORD) .put("cluster.name", internalCluster().getClusterName()) - .put("path.home", createTempDir()) .build(); try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) { transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("client"))); @@ -266,7 +262,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { Settings settings = settingsBuilder() .put("shield.user", DEFAULT_USER_NAME + ":" + DEFAULT_PASSWORD) .put("cluster.name", internalCluster().getClusterName()) - .put("path.home", createTempDir()) .build(); try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) { transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_client_auth"))); @@ -287,7 +282,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { .put("shield.transport.ssl", true) .put("shield.ssl.truststore.path", getDataPath("/org/elasticsearch/shield/transport/ssl/certs/simple/truststore-testnode-only.jks")) .put("shield.ssl.truststore.password", "truststore-testnode-only") - .put("path.home", createTempDir()) .build(); try (TransportClient transportClient = TransportClient.builder().settings(settings).addPlugin(ShieldPlugin.class).addPlugin(licensePluginClass()).build()) { transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_client_auth"))); @@ -309,7 +303,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { .put("shield.transport.ssl", true) .put("shield.ssl.truststore.path", getDataPath("/org/elasticsearch/shield/transport/ssl/certs/simple/truststore-testnode-only.jks")) .put("shield.ssl.truststore.password", "truststore-testnode-only") - .put("path.home", createTempDir()) .build(); try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) { transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("client"))); @@ -331,7 +324,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { .put("shield.transport.ssl", true) .put("shield.ssl.truststore.path", getDataPath("/org/elasticsearch/shield/transport/ssl/certs/simple/truststore-testnode-only.jks")) .put("shield.ssl.truststore.password", "truststore-testnode-only") - .put("path.home", createTempDir()) .build(); try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) { transportClient.addTransportAddress(internalCluster().getInstance(Transport.class).boundAddress().boundAddress()); @@ -352,7 +344,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { .put("shield.transport.ssl", true) .put("shield.ssl.truststore.path", getDataPath("/org/elasticsearch/shield/transport/ssl/certs/simple/truststore-testnode-only.jks")) .put("shield.ssl.truststore.password", "truststore-testnode-only") - .put("path.home", createTempDir()) .build(); try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) { transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_ssl"))); @@ -371,7 +362,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { .put("shield.user", DEFAULT_USER_NAME + ":" + DEFAULT_PASSWORD) .put("cluster.name", internalCluster().getClusterName()) .put("shield.transport.ssl", true) - .put("path.home", createTempDir()) .build(); try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) { transportClient.addTransportAddress(internalCluster().getInstance(Transport.class).boundAddress().boundAddress()); @@ -390,7 +380,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { .put("shield.user", DEFAULT_USER_NAME + ":" + DEFAULT_PASSWORD) .put("cluster.name", internalCluster().getClusterName()) .put("shield.transport.ssl", true) - .put("path.home", createTempDir()) .build(); try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) { transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("client"))); @@ -409,7 +398,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { .put("shield.user", DEFAULT_USER_NAME + ":" + DEFAULT_PASSWORD) .put("cluster.name", internalCluster().getClusterName()) .put("shield.transport.ssl", true) - .put("path.home", createTempDir()) .build(); try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) { transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_client_auth"))); @@ -428,7 +416,6 @@ public class SslMultiPortTests extends ShieldIntegTestCase { .put("shield.user", DEFAULT_USER_NAME + ":" + DEFAULT_PASSWORD) .put("cluster.name", internalCluster().getClusterName()) .put("shield.transport.ssl", true) - .put("path.home", createTempDir()) .build(); try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) { transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_ssl")));