Interface OtherTrustStoreConfig

All Superinterfaces:
io.quarkus.tls.OtherTrustStoreConfiguration

public interface OtherTrustStoreConfig extends io.quarkus.tls.OtherTrustStoreConfiguration
Configuration for a trust store with an arbitrary type, used for trust store formats not directly supported by the TLS registry (such as BCFKS or PKCS#11).

The loading strategy depends on whether a TrustStoreFactory CDI bean annotated with @Identifier("<type>") exists:

  • Factory: If a TrustStoreFactory bean matching the type() is found, it is always used. The factory receives this entire configuration, including params(). Use this for stores that require custom initialization, such as PKCS#11 hardware tokens or credential frameworks.
  • Standard fallback (file-backed): If no factory is found, the store is loaded using java.security.KeyStore.getInstance(type, provider) followed by keyStore.load(inputStream, password). In this case, path() is required. This works for any file-backed trust store type supported by the JVM or a registered security provider (e.g., BCFKS).
  • Method Summary

    Modifier and Type
    Method
    Description
    Alias of the certificate in the trust store.
    Arbitrary parameters available to a TrustStoreFactory CDI bean via config.params().
    Password of the trust store.
    Path to the trust store file.
    The Java security provider name, passed to java.security.KeyStore.getInstance(type, provider).
    The trust store type, passed to java.security.KeyStore.getInstance(type).
  • Method Details

    • type

      String type()
      The trust store type, passed to java.security.KeyStore.getInstance(type).

      This value also serves as the lookup key for a TrustStoreFactory CDI bean via @Identifier. If a matching factory is found, it takes priority over the standard file-based loading.

      Examples: BCFKS, PKCS11.

      Specified by:
      type in interface io.quarkus.tls.OtherTrustStoreConfiguration
    • provider

      Optional<String> provider()
      The Java security provider name, passed to java.security.KeyStore.getInstance(type, provider).

      Used by the standard fallback loading. If not set, the default provider for the given type is used. A factory may also read this value but is not required to.

      Specified by:
      provider in interface io.quarkus.tls.OtherTrustStoreConfiguration
    • path

      Optional<Path> path()
      Path to the trust store file.

      Required when using the standard fallback (no factory). When a factory handles the loading, this value is available to the factory via this config but is not used by the TLS registry itself.

      Specified by:
      path in interface io.quarkus.tls.OtherTrustStoreConfiguration
    • password

      Optional<String> password()
      Password of the trust store.

      Used by the standard fallback to load the store. A factory may also read this value. When not set, the password can be retrieved from the credential provider configured on the parent trust store.

      Specified by:
      password in interface io.quarkus.tls.OtherTrustStoreConfiguration
    • alias

      Optional<String> alias()
      Alias of the certificate in the trust store.

      Used by the standard fallback to validate that a specific certificate exists. A factory may also read this value but is not required to.

      Specified by:
      alias in interface io.quarkus.tls.OtherTrustStoreConfiguration
    • params

      Map<String,String> params()
      Arbitrary parameters available to a TrustStoreFactory CDI bean via config.params().

      Ignored by the standard fallback. Set via quarkus.tls.trust-store.other.params.<key>=<value>.

      Specified by:
      params in interface io.quarkus.tls.OtherTrustStoreConfiguration