Package io.dropwizard.jetty
Class HttpsConnectorFactory
java.lang.Object
io.dropwizard.jetty.HttpConnectorFactory
io.dropwizard.jetty.HttpsConnectorFactory
- All Implemented Interfaces:
io.dropwizard.jackson.Discoverable,ConnectorFactory
Builds HTTPS connectors (HTTP over TLS/SSL).
Configuration Parameters:
For more configuration parameters, see
| Name | Default | Description |
keyStorePath |
REQUIRED | The path to the Java key store which contains the host certificate and private key. |
keyStorePassword |
REQUIRED | The password used to access the key store. |
keyStoreType |
JKS |
The type of key store (usually JKS, PKCS12, JCEKS,
Windows-MY, or Windows-ROOT).
|
keyStoreProvider |
(none) | The JCE provider to use to access the key store. |
trustStorePath |
(none) | The path to the Java key store which contains the CA certificates used to establish trust. |
trustStorePassword |
(none) | The password used to access the trust store. |
trustStoreType |
JKS |
The type of trust store (usually JKS, PKCS12, JCEKS,
Windows-MY, or Windows-ROOT).
|
trustStoreProvider |
(none) | The JCE provider to use to access the trust store. |
keyManagerPassword |
(none) | The password, if any, for the key manager. |
needClientAuth |
(none) | Whether or not client authentication is required. |
wantClientAuth |
(none) | Whether or not client authentication is requested. |
certAlias |
(none) | The alias of the certificate to use. |
crlPath |
(none) | The path to the file which contains the Certificate Revocation List. |
enableCRLDP |
false | Whether or not CRL Distribution Points (CRLDP) support is enabled. |
enableOCSP |
false | Whether or not On-Line Certificate Status Protocol (OCSP) support is enabled. |
maxCertPathLength |
(unlimited) | The maximum certification path length. |
ocspResponderUrl |
(none) | The location of the OCSP responder. |
jceProvider |
(none) | The name of the JCE provider to use for cryptographic support. |
validateCerts |
false | Whether or not to validate TLS certificates before starting. If enabled, Dropwizard will refuse to start with expired or otherwise invalid certificates. This option will cause unconditional failure in Dropwizard 1.x until a new validation mechanism can be implemented. |
validatePeers |
false | Whether or not to validate TLS peer certificates. This option will cause unconditional failure in Dropwizard 1.x until a new validation mechanism can be implemented. |
supportedProtocols |
JVM default |
A list of protocols (e.g., SSLv3, TLSv1) which are supported. All
other protocols will be refused.
|
excludedProtocols |
["SSL.*", "TLSv1", "TLSv1\.1"] |
A list of protocols (e.g., SSLv3, TLSv1) which are excluded. These
protocols will be refused.
|
supportedCipherSuites |
JVM default |
A list of cipher suites (e.g., TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256) which
are supported. All other cipher suites will be refused.
|
excludedCipherSuites |
Jetty's default |
A list of cipher suites (e.g., TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256) which
are excluded. These cipher suites will be refused.
|
allowRenegotiation |
true | Whether or not TLS renegotiation is allowed. |
endpointIdentificationAlgorithm |
(none) | Which endpoint identification algorithm, if any, to use during the TLS handshake. |
disableSniHostCheck |
false | If true, server-side SNI host checking is disabled |
HttpConnectorFactory.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.jetty.server.Connectorbuild(org.eclipse.jetty.server.Server server, com.codahale.metrics.MetricRegistry metrics, String name, @Nullable org.eclipse.jetty.util.thread.ThreadPool threadPool) Create a new connector.protected org.eclipse.jetty.server.HttpConfigurationprotected org.eclipse.jetty.util.ssl.SslContextFactory.ServerconfigureSslContextFactory(org.eclipse.jetty.util.ssl.SslContextFactory sslContextFactory) boolean@Nullable String@Nullable File@Nullable Boolean@Nullable Boolean@Nullable String@Nullable String@Nullable String@Nullable String@Nullable String@Nullable String@Nullable Integer@Nullable Boolean@Nullable URI@Nullable String@Nullable String@Nullable Stringboolean@Nullable Booleanbooleanbooleanbooleanbooleanprotected org.eclipse.jetty.util.component.LifeCycle.ListenerlogSslParameters(org.eclipse.jetty.util.ssl.SslContextFactory sslContextFactory) Register a listener that waits until the SSL context factory has started.voidsetAllowRenegotiation(boolean allowRenegotiation) voidsetCertAlias(@Nullable String certAlias) voidsetCrlPath(@Nullable File crlPath) voidsetDisableSniHostCheck(boolean disableSniHostCheck) voidsetEnableCRLDP(@Nullable Boolean enableCRLDP) voidsetEnableOCSP(@Nullable Boolean enableOCSP) voidsetEndpointIdentificationAlgorithm(@Nullable String endpointIdentificationAlgorithm) voidsetExcludedCipherSuites(@Nullable List<String> excludedCipherSuites) voidsetExcludedProtocols(@Nullable List<String> excludedProtocols) voidsetJceProvider(@Nullable String jceProvider) voidsetKeyManagerPassword(@Nullable String keyManagerPassword) voidsetKeyStorePassword(@Nullable String keyStorePassword) voidsetKeyStorePath(@Nullable String keyStorePath) voidsetKeyStoreProvider(@Nullable String keyStoreProvider) voidsetKeyStoreType(String keyStoreType) voidsetMaxCertPathLength(@Nullable Integer maxCertPathLength) voidsetNeedClientAuth(@Nullable Boolean needClientAuth) voidsetOcspResponderUrl(@Nullable URI ocspResponderUrl) voidsetSupportedCipherSuites(@Nullable List<String> supportedCipherSuites) voidsetSupportedProtocols(@Nullable List<String> supportedProtocols) voidsetTrustStorePassword(@Nullable String trustStorePassword) voidsetTrustStorePath(@Nullable String trustStorePath) voidsetTrustStoreProvider(@Nullable String trustStoreProvider) voidsetTrustStoreType(String trustStoreType) voidsetValidateCerts(boolean validateCerts) voidsetValidatePeers(boolean validatePeers) voidsetWantClientAuth(@Nullable Boolean wantClientAuth) Methods inherited from class io.dropwizard.jetty.HttpConnectorFactory
admin, application, buildBufferPool, buildConnector, buildHttpConnectionFactory, getAcceptorThreads, getAcceptQueueSize, getBindHost, getBufferPoolIncrement, getHeaderCacheSize, getHttpCompliance, getIdleTimeout, getInputBufferSize, getMaxBufferPoolSize, getMaxRequestHeaderSize, getMaxResponseHeaderSize, getMinBufferPoolSize, getMinRequestDataPerSecond, getMinResponseDataPerSecond, getOutputBufferSize, getPort, getRequestCookieCompliance, getResponseCookieCompliance, getSelectorThreads, getUriCompliance, httpConnections, isInheritChannel, isReuseAddress, isUseDateHeader, isUseForwardedHeaders, isUseProxyProtocol, isUseServerHeader, setAcceptorThreads, setAcceptQueueSize, setBindHost, setBufferPoolIncrement, setHeaderCacheSize, setHttpCompliance, setIdleTimeout, setInheritChannel, setInputBufferSize, setMaxBufferPoolSize, setMaxRequestHeaderSize, setMaxResponseHeaderSize, setMinBufferPoolSize, setMinRequestDataPerSecond, setMinResponseDataPerSecond, setOutputBufferSize, setPort, setRequestCookieCompliance, setResponseCookieCompliance, setReuseAddress, setSelectorThreads, setUriCompliance, setUseDateHeader, setUseForwardedHeaders, setUseProxyProtocol, setUseServerHeader
-
Constructor Details
-
HttpsConnectorFactory
public HttpsConnectorFactory()
-
-
Method Details
-
getAllowRenegotiation
public boolean getAllowRenegotiation() -
setAllowRenegotiation
public void setAllowRenegotiation(boolean allowRenegotiation) -
getEndpointIdentificationAlgorithm
-
setEndpointIdentificationAlgorithm
-
getKeyStorePath
-
setKeyStorePath
-
getKeyStorePassword
-
setKeyStorePassword
-
getKeyStoreType
-
setKeyStoreType
-
getKeyStoreProvider
-
setKeyStoreProvider
-
getTrustStoreType
-
setTrustStoreType
-
getTrustStoreProvider
-
setTrustStoreProvider
-
getKeyManagerPassword
-
setKeyManagerPassword
-
getTrustStorePath
-
setTrustStorePath
-
getTrustStorePassword
-
setTrustStorePassword
-
getNeedClientAuth
-
setNeedClientAuth
-
getWantClientAuth
-
setWantClientAuth
-
getCertAlias
-
setCertAlias
-
getCrlPath
-
setCrlPath
-
getEnableCRLDP
-
setEnableCRLDP
-
getEnableOCSP
-
setEnableOCSP
-
getMaxCertPathLength
-
setMaxCertPathLength
-
getOcspResponderUrl
-
setOcspResponderUrl
-
getJceProvider
-
setJceProvider
-
getValidatePeers
public boolean getValidatePeers() -
setValidatePeers
public void setValidatePeers(boolean validatePeers) -
getSupportedProtocols
-
setSupportedProtocols
-
getExcludedProtocols
-
setExcludedProtocols
-
getSupportedCipherSuites
-
getExcludedCipherSuites
-
setExcludedCipherSuites
-
setSupportedCipherSuites
-
isValidateCerts
public boolean isValidateCerts() -
setValidateCerts
public void setValidateCerts(boolean validateCerts) -
isDisableSniHostCheck
public boolean isDisableSniHostCheck() -
setDisableSniHostCheck
public void setDisableSniHostCheck(boolean disableSniHostCheck) -
isValidKeyStorePath
@ValidationMethod(message="keyStorePath should not be null") public boolean isValidKeyStorePath() -
isValidKeyStorePassword
@ValidationMethod(message="keyStorePassword should not be null or empty") public boolean isValidKeyStorePassword() -
build
public org.eclipse.jetty.server.Connector build(org.eclipse.jetty.server.Server server, com.codahale.metrics.MetricRegistry metrics, String name, @Nullable org.eclipse.jetty.util.thread.ThreadPool threadPool) Description copied from interface:ConnectorFactoryCreate a new connector.- Specified by:
buildin interfaceConnectorFactory- Overrides:
buildin classHttpConnectorFactory- Parameters:
server- the application'sServerinstancemetrics- the application's metricsname- the application's namethreadPool- the application's thread pool- Returns:
- a
Connector
-
buildHttpConfiguration
protected org.eclipse.jetty.server.HttpConfiguration buildHttpConfiguration()- Overrides:
buildHttpConfigurationin classHttpConnectorFactory
-
logSslParameters
protected org.eclipse.jetty.util.component.LifeCycle.Listener logSslParameters(org.eclipse.jetty.util.ssl.SslContextFactory sslContextFactory) Register a listener that waits until the SSL context factory has started. Once it has started we can grab the fully initialized context so we can log the parameters.- Since:
- 2.1.0
-
configureSslContextFactory
protected org.eclipse.jetty.util.ssl.SslContextFactory.Server configureSslContextFactory(org.eclipse.jetty.util.ssl.SslContextFactory sslContextFactory)
-