Class FileCertificateProvider

java.lang.Object
io.micronaut.http.ssl.FileCertificateProvider
All Implemented Interfaces:
Named, CertificateProvider

@EachBean(Config.class) public final class FileCertificateProvider extends Object implements CertificateProvider
Certificate provider that loads certificate material from files on disk and can refresh the material when the underlying files change using a file watcher or scheduler.
Since:
4.10.0
Author:
Jonas Konrad
  • Method Details

    • getKeyStore

      @NonNull public @NonNull Publisher<@NonNull KeyStore> getKeyStore()
      Description copied from interface: CertificateProvider
      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.
      Specified by:
      getKeyStore in interface CertificateProvider
      Returns:
      a publisher of KeyStore updates
    • getName

      @NonNull public @NonNull String getName()
      Specified by:
      getName in interface Named
      Returns:
      The name of the component