Package org.apache.flink.runtime.net
Class SSLUtils
java.lang.Object
org.apache.flink.runtime.net.SSLUtils
Common utilities to manage SSL transport settings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SSLHandlerFactorycreateInternalClientSSLEngineFactory(org.apache.flink.configuration.Configuration config) Creates a SSLEngineFactory to be used by internal communication client endpoints.static SSLHandlerFactorycreateInternalServerSSLEngineFactory(org.apache.flink.configuration.Configuration config) Creates a SSLEngineFactory to be used by internal communication server endpoints.static SSLHandlerFactorycreateRestClientSSLEngineFactory(org.apache.flink.configuration.Configuration config) Creates aSSLHandlerFactoryto be used by the REST Clients.static org.apache.flink.shaded.netty4.io.netty.handler.ssl.SslContextcreateRestNettySSLContext(org.apache.flink.configuration.Configuration config, boolean clientMode, org.apache.flink.shaded.netty4.io.netty.handler.ssl.ClientAuth clientAuth, org.apache.flink.shaded.netty4.io.netty.handler.ssl.SslProvider provider) Creates an SSL context for the external REST SSL.static SSLHandlerFactorycreateRestServerSSLEngineFactory(org.apache.flink.configuration.Configuration config) Creates aSSLHandlerFactoryto be used by the REST Servers.static SSLContextcreateRestSSLContext(org.apache.flink.configuration.Configuration config, boolean clientMode) Creates an SSL context for clients against the external REST endpoint.static SocketFactorycreateSSLClientSocketFactory(org.apache.flink.configuration.Configuration config) Creates a factory for SSL Client Sockets from the given configuration.static ServerSocketFactorycreateSSLServerSocketFactory(org.apache.flink.configuration.Configuration config) Creates a factory for SSL Server Sockets from the given configuration.
-
Constructor Details
-
SSLUtils
public SSLUtils()
-
-
Method Details
-
createSSLServerSocketFactory
public static ServerSocketFactory createSSLServerSocketFactory(org.apache.flink.configuration.Configuration config) throws Exception Creates a factory for SSL Server Sockets from the given configuration. SSL Server Sockets are always part of internal communication.- Throws:
Exception
-
createSSLClientSocketFactory
public static SocketFactory createSSLClientSocketFactory(org.apache.flink.configuration.Configuration config) throws Exception Creates a factory for SSL Client Sockets from the given configuration. SSL Client Sockets are always part of internal communication.- Throws:
Exception
-
createInternalServerSSLEngineFactory
public static SSLHandlerFactory createInternalServerSSLEngineFactory(org.apache.flink.configuration.Configuration config) throws Exception Creates a SSLEngineFactory to be used by internal communication server endpoints.- Throws:
Exception
-
createInternalClientSSLEngineFactory
public static SSLHandlerFactory createInternalClientSSLEngineFactory(org.apache.flink.configuration.Configuration config) throws Exception Creates a SSLEngineFactory to be used by internal communication client endpoints.- Throws:
Exception
-
createRestServerSSLEngineFactory
public static SSLHandlerFactory createRestServerSSLEngineFactory(org.apache.flink.configuration.Configuration config) throws Exception Creates aSSLHandlerFactoryto be used by the REST Servers.- Parameters:
config- The application configuration.- Throws:
Exception
-
createRestClientSSLEngineFactory
public static SSLHandlerFactory createRestClientSSLEngineFactory(org.apache.flink.configuration.Configuration config) throws Exception Creates aSSLHandlerFactoryto be used by the REST Clients.- Parameters:
config- The application configuration.- Throws:
Exception
-
createRestSSLContext
@Nullable @VisibleForTesting public static SSLContext createRestSSLContext(org.apache.flink.configuration.Configuration config, boolean clientMode) throws Exception Creates an SSL context for clients against the external REST endpoint.- Throws:
Exception
-
createRestNettySSLContext
@Nullable public static org.apache.flink.shaded.netty4.io.netty.handler.ssl.SslContext createRestNettySSLContext(org.apache.flink.configuration.Configuration config, boolean clientMode, org.apache.flink.shaded.netty4.io.netty.handler.ssl.ClientAuth clientAuth, org.apache.flink.shaded.netty4.io.netty.handler.ssl.SslProvider provider) throws Exception Creates an SSL context for the external REST SSL. If mutual authentication is configured the client and the server side configuration are identical.- Throws:
Exception
-