This commit is contained in:
Alexey Pronin 2019-03-28 14:45:14 +03:00
parent 75af4ce47f
commit b390b7a5da
No known key found for this signature in database
GPG Key ID: 1FEFC4A6AAD7535A
4 changed files with 23 additions and 6 deletions

View File

@ -22,4 +22,4 @@ java.version=1.8
# elasticsearch release. This version is checked when the plugin
# is loaded so Elasticsearch will refuse to start in the presence of
# plugins with the incorrect elasticsearch.version.
elasticsearch.version=6.5.4
elasticsearch.version=6.6.1

13
pom.xml
View File

@ -56,10 +56,10 @@
<properties>
<opendistro_security_ssl.version>0.7.0.1</opendistro_security_ssl.version>
<opendistro_security_advanced_modules.version>0.7.0.1</opendistro_security_advanced_modules.version>
<elasticsearch.version>6.5.4</elasticsearch.version>
<elasticsearch.version>6.6.1</elasticsearch.version>
<!-- deps -->
<netty-native.version>2.0.15.Final</netty-native.version>
<netty-native.version>2.0.20.Final</netty-native.version>
<bc.version>1.60</bc.version>
<log4j.version>2.11.1</log4j.version>
<guava.version>25.1-jre</guava.version>
@ -224,6 +224,15 @@
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
<build>

View File

@ -62,6 +62,7 @@ import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.ElasticsearchSecurityException;
import org.elasticsearch.SpecialPermission;
import org.elasticsearch.Version;
import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.action.search.SearchScrollAction;
@ -678,18 +679,18 @@ public final class OpenDistroSecurityPlugin extends OpenDistroSecuritySSLPlugin
}
@Override
public Map<String, Supplier<Transport>> getTransports(Settings settings, ThreadPool threadPool, BigArrays bigArrays,
public Map<String, Supplier<Transport>> getTransports(Settings settings, ThreadPool threadPool,
PageCacheRecycler pageCacheRecycler, CircuitBreakerService circuitBreakerService,
NamedWriteableRegistry namedWriteableRegistry, NetworkService networkService) {
Map<String, Supplier<Transport>> transports = new HashMap<String, Supplier<Transport>>();
if(sslOnly) {
return super.getTransports(settings, threadPool, bigArrays, pageCacheRecycler, circuitBreakerService, namedWriteableRegistry, networkService);
return super.getTransports(settings, threadPool, pageCacheRecycler, circuitBreakerService, namedWriteableRegistry, networkService);
}
if (transportSSLEnabled) {
transports.put("com.amazon.opendistroforelasticsearch.security.ssl.http.netty.OpenDistroSecuritySSLNettyTransport",
() -> new OpenDistroSecuritySSLNettyTransport(settings, threadPool, networkService, bigArrays, namedWriteableRegistry,
() -> new OpenDistroSecuritySSLNettyTransport(settings, Version.CURRENT, threadPool, networkService, pageCacheRecycler, namedWriteableRegistry,
circuitBreakerService, odsks, evaluateSslExceptionHandler()));
}
return transports;

View File

@ -30,6 +30,8 @@
package com.amazon.opendistroforelasticsearch.security.support;
import java.util.Arrays;
import org.elasticsearch.common.xcontent.DeprecationHandler;
public class OpenDistroSecurityDeprecationHandler {
@ -45,6 +47,11 @@ public class OpenDistroSecurityDeprecationHandler {
throw new UnsupportedOperationException("deprecated fields not supported here but got ["
+ usedName + "] which has been replaced with [" + modernName + "]");
}
@Override
public void deprecated(String message, Object... params) {
throw new UnsupportedOperationException(
"deprecations are not supported here but got [" + message + "] and " + Arrays.toString(params));
}
};
}