public class SSLOptions
extends Object
implements scala.Product, scala.Serializable
SSLOptions is intended to provide the maximum common set of SSL settings, which are supported by the protocol, which it can generate the configuration for. Since Akka doesn't support client authentication with SSL, SSLOptions cannot support it either.
Constructor and Description |
---|
SSLOptions(boolean enabled,
scala.Option<java.io.File> keyStore,
scala.Option<String> keyStorePassword,
scala.Option<String> keyPassword,
scala.Option<java.io.File> trustStore,
scala.Option<String> trustStorePassword,
scala.Option<String> protocol,
scala.collection.immutable.Set<String> enabledAlgorithms) |
Modifier and Type | Method and Description |
---|---|
scala.Option<com.typesafe.config.Config> |
createAkkaConfig()
Creates an Akka configuration object which contains all the SSL settings represented by this
object.
|
scala.Option<org.eclipse.jetty.util.ssl.SslContextFactory> |
createJettySslContextFactory()
Creates a Jetty SSL context factory according to the SSL settings represented by this object.
|
boolean |
enabled() |
scala.collection.immutable.Set<String> |
enabledAlgorithms() |
scala.Option<String> |
keyPassword() |
scala.Option<java.io.File> |
keyStore() |
scala.Option<String> |
keyStorePassword() |
static SSLOptions |
parse(SparkConf conf,
String ns,
scala.Option<SSLOptions> defaults)
Resolves SSLOptions settings from a given Spark configuration object at a given namespace.
|
scala.Option<String> |
protocol() |
String |
toString()
Returns a string representation of this SSLOptions with all the passwords masked.
|
scala.Option<java.io.File> |
trustStore() |
scala.Option<String> |
trustStorePassword() |
public SSLOptions(boolean enabled, scala.Option<java.io.File> keyStore, scala.Option<String> keyStorePassword, scala.Option<String> keyPassword, scala.Option<java.io.File> trustStore, scala.Option<String> trustStorePassword, scala.Option<String> protocol, scala.collection.immutable.Set<String> enabledAlgorithms)
public static SSLOptions parse(SparkConf conf, String ns, scala.Option<SSLOptions> defaults)
The following settings are allowed:
$ - [ns].enabled
- true
or false
, to enable or disable SSL respectively
$ - [ns].keyStore
- a path to the key-store file; can be relative to the current directory
$ - [ns].keyStorePassword
- a password to the key-store file
$ - [ns].keyPassword
- a password to the private key
$ - [ns].trustStore
- a path to the trust-store file; can be relative to the current
directory
$ - [ns].trustStorePassword
- a password to the trust-store file
$ - [ns].protocol
- a protocol name supported by a particular Java version
$ - [ns].enabledAlgorithms
- a comma separated list of ciphers
For a list of protocols and ciphers supported by particular Java versions, you may go to
Oracle
blog page
.
You can optionally specify the default configuration. If you do, for each setting which is missing in SparkConf, the corresponding setting is used from the default configuration.
conf
- Spark configuration object where the settings are collected fromns
- the namespace namedefaults
- the default configurationSSLOptions
objectpublic boolean enabled()
public scala.Option<java.io.File> keyStore()
public scala.Option<String> keyStorePassword()
public scala.Option<String> keyPassword()
public scala.Option<java.io.File> trustStore()
public scala.Option<String> trustStorePassword()
public scala.Option<String> protocol()
public scala.collection.immutable.Set<String> enabledAlgorithms()
public scala.Option<org.eclipse.jetty.util.ssl.SslContextFactory> createJettySslContextFactory()
public scala.Option<com.typesafe.config.Config> createAkkaConfig()
public String toString()
toString
in class Object