Class SSLConfigurationProperties

java.lang.Object
org.apache.camel.main.SSLConfigurationProperties
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.camel.spi.BootstrapCloseable

@Configurer(extended=true) public class SSLConfigurationProperties extends Object implements org.apache.camel.spi.BootstrapCloseable
Global configuration for SSL.
  • Constructor Details

  • Method Details

    • end

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)
      Enables SSL in your Camel application.
    • getProvider

      public String getProvider()
    • setProvider

      public void setProvider(String provider)
      To use a specific provider for creating SSLContext.

      The list of available providers returned by java.security.Security.getProviders() or null to use the highest priority provider implementing the secure socket protocol.

    • getSecureSocketProtocol

      public String getSecureSocketProtocol()
    • setSecureSocketProtocol

      public void setSecureSocketProtocol(String secureSocketProtocol)
      The protocol for the secure sockets created by the SSLContext.

      See https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html

    • getCertAlias

      public String getCertAlias()
    • setCertAlias

      public void setCertAlias(String certAlias)
      An optional certificate alias to use. This is useful when the keystore has multiple certificates.
    • getSessionTimeout

      public int getSessionTimeout()
    • setSessionTimeout

      public void setSessionTimeout(int sessionTimeout)
      Timeout in seconds to use for SSLContext. The default is 24 hours.
    • getCipherSuites

      public String getCipherSuites()
    • setCipherSuites

      public void setCipherSuites(String cipherSuites)
      List of TLS/SSL cipher suite algorithm names. Multiple names can be separated by comma.
    • getCipherSuitesInclude

      public String getCipherSuitesInclude()
    • setCipherSuitesInclude

      public void setCipherSuitesInclude(String cipherSuitesInclude)
      Filters TLS/SSL cipher suites algorithms names.

      This filter is used for including algorithms that matches the naming pattern. Multiple names can be separated by comma.

      Notice that if the cipherSuites option has been configured then the include/exclude filters are not in use.

    • getCipherSuitesExclude

      public String getCipherSuitesExclude()
    • setCipherSuitesExclude

      public void setCipherSuitesExclude(String cipherSuitesExclude)
      Filters TLS/SSL cipher suites algorithms names.

      This filter is used for excluding algorithms that matches the naming pattern. Multiple names can be separated by comma.

      Notice that if the cipherSuites option has been configured then the include/exclude filters are not in use.

    • getKeyStore

      public String getKeyStore()
    • setKeyStore

      public void setKeyStore(String keyStore)
      The key store to load. The key store is by default loaded from classpath. If you must load from file system, then use file: as prefix. file:nameOfFile (to refer to the file system) classpath:nameOfFile (to refer to the classpath; default) http:uri (to load the resource using HTTP) ref:nameOfBean (to lookup an existing KeyStore instance from the registry, for example for testing and development).
    • getKeyStoreType

      public String getKeyStoreType()
    • setKeyStoreType

      public void setKeyStoreType(String keyStoreType)
      The type of the key store to load.

      See https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html

    • getKeyStoreProvider

      public String getKeyStoreProvider()
    • setKeyStoreProvider

      public void setKeyStoreProvider(String keyStoreProvider)
      To use a specific provider for creating KeyStore.

      The list of available providers returned by java.security.Security.getProviders() or null to use the highest priority provider implementing the secure socket protocol.

    • getKeystorePassword

      public String getKeystorePassword()
    • setKeystorePassword

      public void setKeystorePassword(String keystorePassword)
      Sets the SSL Keystore password.
    • getTrustStore

      public String getTrustStore()
    • setTrustStore

      public void setTrustStore(String trustStore)
      The trust store to load. The trust store is by default loaded from classpath. If you must load from file system, then use file: as prefix. file:nameOfFile (to refer to the file system) classpath:nameOfFile (to refer to the classpath; default) http:uri (to load the resource using HTTP) ref:nameOfBean (to lookup an existing KeyStore instance from the registry, for example for testing and development).
    • getTrustStorePassword

      public String getTrustStorePassword()
    • setTrustStorePassword

      public void setTrustStorePassword(String trustStorePassword)
      Sets the SSL Truststore password.
    • isTrustAllCertificates

      public boolean isTrustAllCertificates()
    • setTrustAllCertificates

      public void setTrustAllCertificates(boolean trustAllCertificates)
      Allows to trust all SSL certificates without performing certificate validation. This can be used in development environment but may expose the system to security risks. Notice that if the trustAllCertificates option is set to true then the trustStore/trustStorePassword options are not in use..
    • getKeyManagerAlgorithm

      public String getKeyManagerAlgorithm()
    • setKeyManagerAlgorithm

      public void setKeyManagerAlgorithm(String keyManagerAlgorithm)
      Algorithm name used for creating the KeyManagerFactory.

      See https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html

    • getKeyManagerProvider

      public String getKeyManagerProvider()
    • setKeyManagerProvider

      public void setKeyManagerProvider(String keyManagerProvider)
      To use a specific provider for creating KeyManagerFactory.

      The list of available providers returned by java.security.Security.getProviders() or null to use the highest priority provider implementing the secure socket protocol.

    • getSecureRandomAlgorithm

      public String getSecureRandomAlgorithm()
    • setSecureRandomAlgorithm

      public void setSecureRandomAlgorithm(String secureRandomAlgorithm)
      Algorithm name used for creating the SecureRandom.

      See https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html

    • getSecureRandomProvider

      public String getSecureRandomProvider()
    • setSecureRandomProvider

      public void setSecureRandomProvider(String secureRandomProvider)
      To use a specific provider for creating SecureRandom.

      The list of available providers returned by java.security.Security.getProviders() or null to use the highest priority provider implementing the secure socket protocol.

    • getClientAuthentication

      public String getClientAuthentication()
    • setClientAuthentication

      public void setClientAuthentication(String clientAuthentication)
      Sets the configuration for server-side client-authentication requirements
    • withEnabled

      public SSLConfigurationProperties withEnabled(boolean enabled)
      Enables SSL in your Camel application.
    • withProvider

      public SSLConfigurationProperties withProvider(String provider)
      To use a specific provider for creating SSLContext.

      The list of available providers returned by java.security.Security.getProviders() or null to use the highest priority provider implementing the secure socket protocol.

    • withSecureSocketProtocol

      public SSLConfigurationProperties withSecureSocketProtocol(String secureSocketProtocol)
      The optional protocol for the secure sockets created by the SSLContext.

      See https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html

    • withCertAlias

      public SSLConfigurationProperties withCertAlias(String certAlias)
      An optional certificate alias to use. This is useful when the keystore has multiple certificates.
    • withSessionTimeoutCertAlias

      public SSLConfigurationProperties withSessionTimeoutCertAlias(int sessionTimeout)
      Timeout in seconds to use for SSLContext. The default is 24 hours.
    • withCipherSuites

      public SSLConfigurationProperties withCipherSuites(String cipherSuites)
      List of TLS/SSL cipher suite algorithm names. Multiple names can be separated by comma.
    • withCipherSuitesInclude

      public SSLConfigurationProperties withCipherSuitesInclude(String cipherSuitesInclude)
      Filters TLS/SSL cipher suites algorithms names.

      This filter is used for including algorithms that matches the naming pattern. Multiple names can be separated by comma.

      Notice that if the cipherSuites option has been configured then the include/exclude filters are not in use.

    • withCipherSuitesExclude

      public SSLConfigurationProperties withCipherSuitesExclude(String cipherSuitesExclude)
      Filters TLS/SSL cipher suites algorithms names.

      This filter is used for excluding algorithms that matches the naming pattern. Multiple names can be separated by comma.

      Notice that if the cipherSuites option has been configured then the include/exclude filters are not in use.

    • withKeyStore

      public SSLConfigurationProperties withKeyStore(String keyStore)
      The keystore to load. The keystore is by default loaded from classpath. If you must load from file system, then use file: as prefix. file:nameOfFile (to refer to the file system) classpath:nameOfFile (to refer to the classpath; default) http:uri (to load the resource using HTTP) ref:nameOfBean (to lookup an existing KeyStore instance from the registry, for example for testing and development).
    • withKeyStoreType

      public SSLConfigurationProperties withKeyStoreType(String keyStoreType)
      The type of the key store to load.

      See https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html

    • withKeyStoreProvider

      public SSLConfigurationProperties withKeyStoreProvider(String keyStoreProvider)
      To use a specific provider for creating KeyStore.

      The list of available providers returned by java.security.Security.getProviders() or null to use the highest priority provider implementing the secure socket protocol.

    • withKeystorePassword

      public SSLConfigurationProperties withKeystorePassword(String keystorePassword)
      Sets the SSL Keystore password.
    • withTrustStore

      public SSLConfigurationProperties withTrustStore(String trustStore)
      The trust store to load. The trust store is by default loaded from classpath. If you must load from file system, then use file: as prefix. file:nameOfFile (to refer to the file system) classpath:nameOfFile (to refer to the classpath; default) http:uri (to load the resource using HTTP) ref:nameOfBean (to lookup an existing KeyStore instance from the registry, for example for testing and development).
    • withTrustStorePassword

      public SSLConfigurationProperties withTrustStorePassword(String trustStorePassword)
      Sets the SSL Truststore password.
    • withTrustAllCertificates

      public SSLConfigurationProperties withTrustAllCertificates(boolean trustAllCertificates)
      Allows to trust all SSL certificates without performing certificate validation. This can be used in development environment but may expose the system to security risks. Notice that if the trustAllCertificates option is set to true then the trustStore/trustStorePassword options are not in use.
    • withKeyManagerAlgorithm

      public SSLConfigurationProperties withKeyManagerAlgorithm(String keyManagerAlgorithm)
      Algorithm name used for creating the KeyManagerFactory.

      See https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html

    • withKeyManagerProvider

      public SSLConfigurationProperties withKeyManagerProvider(String keyManagerProvider)
      To use a specific provider for creating KeyManagerFactory.

      The list of available providers returned by java.security.Security.getProviders() or null to use the highest priority provider implementing the secure socket protocol.

    • withSecureRandomAlgorithm

      public SSLConfigurationProperties withSecureRandomAlgorithm(String secureRandomAlgorithm)
      Algorithm name used for creating the SecureRandom.

      See https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html

    • withSecureRandomProvider

      public SSLConfigurationProperties withSecureRandomProvider(String secureRandomProvider)
      To use a specific provider for creating SecureRandom.

      The list of available providers returned by java.security.Security.getProviders() or null to use the highest priority provider implementing the secure socket protocol.

    • withClientAuthentication

      public SSLConfigurationProperties withClientAuthentication(String clientAuthentication)
      Sets the configuration for server-side client-authentication requirements