Package io.micronaut.http.ssl
Interface CertificateProvider
- All Superinterfaces:
io.micronaut.core.naming.Named
- All Known Implementing Classes:
FileCertificateProvider,ResourceCertificateProvider,SelfSignedCertificateProvider
public interface CertificateProvider
extends io.micronaut.core.naming.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
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription@NonNull org.reactivestreams.Publisher<@NonNull KeyStore> Publisher that emits the key store containing private key and/or certificates.default @NonNull org.reactivestreams.Publisher<@NonNull KeyStore> Publisher that emits the trust store with trusted certificates.Methods inherited from interface io.micronaut.core.naming.Named
getName
-
Field Details
-
CONFIG_PREFIX
- See Also:
-
-
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
KeyStoreupdates
-
getTrustStore
Publisher that emits the trust store with trusted certificates. By default, this returnsgetKeyStore().- Returns:
- a publisher of
KeyStoreupdates for trust material
-