Package org.apache.flink.runtime.net
Class SSLUtils
- java.lang.Object
-
- org.apache.flink.runtime.net.SSLUtils
-
public class SSLUtils extends Object
Common utilities to manage SSL transport settings.
-
-
Constructor Summary
Constructors Constructor Description SSLUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SSLHandlerFactory
createInternalClientSSLEngineFactory(org.apache.flink.configuration.Configuration config)
Creates a SSLEngineFactory to be used by internal communication client endpoints.static SSLHandlerFactory
createInternalServerSSLEngineFactory(org.apache.flink.configuration.Configuration config)
Creates a SSLEngineFactory to be used by internal communication server endpoints.static SSLHandlerFactory
createRestClientSSLEngineFactory(org.apache.flink.configuration.Configuration config)
Creates aSSLHandlerFactory
to be used by the REST Clients.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)
Creates an SSL context for the external REST SSL.static SSLHandlerFactory
createRestServerSSLEngineFactory(org.apache.flink.configuration.Configuration config)
Creates aSSLHandlerFactory
to be used by the REST Servers.static SSLContext
createRestSSLContext(org.apache.flink.configuration.Configuration config, boolean clientMode)
Creates an SSL context for clients against the external REST endpoint.static SocketFactory
createSSLClientSocketFactory(org.apache.flink.configuration.Configuration config)
Creates a factory for SSL Client Sockets from the given configuration.static ServerSocketFactory
createSSLServerSocketFactory(org.apache.flink.configuration.Configuration config)
Creates a factory for SSL Server Sockets from the given configuration.
-
-
-
Method Detail
-
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 aSSLHandlerFactory
to 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 aSSLHandlerFactory
to 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
-
-