public class SSLUtils extends Object
Constructor and Description |
---|
SSLUtils() |
Modifier and Type | Method and Description |
---|---|
static SSLHandlerFactory |
createInternalClientSSLEngineFactory(Configuration config)
Creates a SSLEngineFactory to be used by internal communication client endpoints.
|
static SSLHandlerFactory |
createInternalServerSSLEngineFactory(Configuration config)
Creates a SSLEngineFactory to be used by internal communication server endpoints.
|
static SSLHandlerFactory |
createRestClientSSLEngineFactory(Configuration config)
Creates a
SSLHandlerFactory to be used by the REST Clients. |
static org.apache.flink.shaded.netty4.io.netty.handler.ssl.SslContext |
createRestNettySSLContext(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(Configuration config)
Creates a
SSLHandlerFactory to be used by the REST Servers. |
static SSLContext |
createRestSSLContext(Configuration config,
boolean clientMode)
Creates an SSL context for clients against the external REST endpoint.
|
static SocketFactory |
createSSLClientSocketFactory(Configuration config)
Creates a factory for SSL Client Sockets from the given configuration.
|
static ServerSocketFactory |
createSSLServerSocketFactory(Configuration config)
Creates a factory for SSL Server Sockets from the given configuration.
|
static boolean |
isInternalSSLEnabled(Configuration sslConfig)
Checks whether SSL for internal communication (rpc, data transport, blob server) is enabled.
|
static boolean |
isRestSSLAuthenticationEnabled(Configuration sslConfig)
Checks whether mutual SSL authentication for the external REST endpoint is enabled.
|
static boolean |
isRestSSLEnabled(Configuration sslConfig)
Checks whether SSL for the external REST endpoint is enabled.
|
public static boolean isInternalSSLEnabled(Configuration sslConfig)
public static boolean isRestSSLEnabled(Configuration sslConfig)
public static boolean isRestSSLAuthenticationEnabled(Configuration sslConfig)
public static ServerSocketFactory createSSLServerSocketFactory(Configuration config) throws Exception
Exception
public static SocketFactory createSSLClientSocketFactory(Configuration config) throws Exception
Exception
public static SSLHandlerFactory createInternalServerSSLEngineFactory(Configuration config) throws Exception
Exception
public static SSLHandlerFactory createInternalClientSSLEngineFactory(Configuration config) throws Exception
Exception
public static SSLHandlerFactory createRestServerSSLEngineFactory(Configuration config) throws Exception
SSLHandlerFactory
to be used by the REST Servers.config
- The application configuration.Exception
public static SSLHandlerFactory createRestClientSSLEngineFactory(Configuration config) throws Exception
SSLHandlerFactory
to be used by the REST Clients.config
- The application configuration.Exception
@Nullable @VisibleForTesting public static SSLContext createRestSSLContext(Configuration config, boolean clientMode) throws Exception
Exception
@Nullable public static org.apache.flink.shaded.netty4.io.netty.handler.ssl.SslContext createRestNettySSLContext(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
Exception
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.