Interface CertificateProvider

All Superinterfaces:
Named
All Known Implementing Classes:
FileCertificateProvider, ResourceCertificateProvider, SelfSignedCertificateProvider

public interface CertificateProvider extends Named
Provides access to certificate material as KeyStore instances that can be consumed by SSL context builders. Implementations may actively refresh and emit new keystores when underlying sources change.
Since:
4.10.0
Author:
Jonas Konrad
  • Field Details

  • Method Details

    • getKeyStore

      Publisher that emits the key store containing private key and/or certificates. To avoid weird initialization issues, it is highly recommended to return a publisher here that produces a key store immediately upon subscription, on the subscribing thread. This avoids race conditions where e.g. a server starts up before a key store is available, and there is a short interval where SSL connections will fail.
      Returns:
      a publisher of KeyStore updates
    • getTrustStore

      @NonNull default @NonNull Publisher<@NonNull KeyStore> getTrustStore()
      Publisher that emits the trust store with trusted certificates. By default, this returns getKeyStore().
      Returns:
      a publisher of KeyStore updates for trust material