Package io.micronaut.http.ssl
Interface CertificateProvider
- All Superinterfaces:
Named
- All Known Implementing Classes:
FileCertificateProvider
,ResourceCertificateProvider
,SelfSignedCertificateProvider
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionPublisher that emits the key store containing private key and/or certificates.Publisher that emits the trust store with trusted certificates.
-
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
KeyStore
updates
-
getTrustStore
Publisher that emits the trust store with trusted certificates. By default, this returnsgetKeyStore()
.- Returns:
- a publisher of
KeyStore
updates for trust material
-