Skip to content

Commit d085393

Browse files
authored
Merge pull request #44123 from sNiXx/tls-registry-docu-update
Revise TLS registry documentation
2 parents 885d945 + 5b81613 commit d085393

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

docs/src/main/asciidoc/tls-registry-reference.adoc

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ These properties are required for:
4848
* Creating separate, named configurations by using `+quarkus.tls.<name>.*+`.
4949
By specifying the `+quarkus.tls.<name>.*+` properties, you can adapt the TLS settings for a specific component.
5050

51+
[IMPORTANT]
52+
====
53+
The default TLS configuration is not a fallback/global configuration. This means that each named TLS configuration
54+
(or "TLS bucket") needs to provide its own properties. For instance, `quarkus.tls.reload-period` will only be applied
55+
to the default TLS configuration.
56+
====
57+
5158
=== Configuring HTTPS for a HTTP server
5259

5360
To ensure secure client-server communication, the client is often required to verify the server's authenticity.
@@ -620,7 +627,7 @@ If any of these checks fail, the application will not start.
620627
== Reloading certificates
621628

622629
The `TlsConfiguration` obtained from the `TLSConfigurationRegistry` includes a mechanism for reloading certificates.
623-
The `reload` method refreshes the keystores and truststores, typically by reloading them from the file system.
630+
The `reload` method refreshes the keystores, truststores and CRLs, typically by reloading them from the file system.
624631

625632
NOTE: The reload operation is not automatic and must be triggered manually.
626633
Additionally, the `TlsConfiguration` implementation must support reloading (which is the case for the configured certificate).
@@ -650,8 +657,10 @@ public void reload() {
650657
}
651658
}
652659
653-
// In the server or client code
654-
public void onReload(@Observes CertificateUpdatedEvent reload) {
660+
// In the server (or client) code
661+
private final io.vertx.core.http.HttpServer server;
662+
663+
public void onCertificateUpdate(@Observes CertificateUpdatedEvent reload) {
655664
if ("name".equals(event.getName())) {
656665
server.updateSSLOptions(reload.tlsConfiguration().getSSLOptions());
657666
// Or update the SSLContext.
@@ -678,13 +687,16 @@ quarkus.tls.key-store.pem.0.key=tls.key
678687
+
679688
[source,properties]
680689
----
681-
quarkus.tls.http.reload-period=30min
690+
quarkus.tls.http.reload-period=30m
682691
quarkus.tls.http.key-store.pem.0.cert=tls.crt
683692
quarkus.tls.http.key-store.pem.0.key=tls.key
684693
----
685694

686695
IMPORTANT: Impacted server and client may need to listen to the `CertificateUpdatedEvent` to apply the new certificates.
687-
This is automatically done for the Quarkus HTTP server, including the management interface if it is enabled.
696+
This is automatically done for the Quarkus HTTP server (i.e. Quarkus REST server, gRPC server, Web Socket server) and
697+
the management interface if it is enabled.
698+
699+
NOTE: In Quarkus dev mode, when files are touched, it will trigger the `CertificateUpdatedEvent` much more frequently.
688700

689701
ifndef::no-kubernetes-secrets-or-cert-manager[]
690702
== Using Kubernetes secrets or cert-manager

0 commit comments

Comments
 (0)