Skip to content

Commit f383612

Browse files
authored
Merge pull request #41297 from gsmet/3.12.0-backports-2
[3.12] 3.12.0 backports 2
2 parents cd07a9e + ec0e72b commit f383612

File tree

50 files changed

+1674
-182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1674
-182
lines changed

bom/application/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
<hibernate-quarkus-local-cache.version>0.3.0</hibernate-quarkus-local-cache.version>
173173
<flapdoodle.mongo.version>4.14.0</flapdoodle.mongo.version>
174174
<quarkus-spring-api.version>6.1.SP2</quarkus-spring-api.version>
175-
<quarkus-spring-data-api.version>3.2.SP1</quarkus-spring-data-api.version>
175+
<quarkus-spring-data-api.version>3.2.SP2</quarkus-spring-data-api.version>
176176
<quarkus-spring-security-api.version>6.2</quarkus-spring-security-api.version>
177177
<quarkus-spring-boot-api.version>3.2</quarkus-spring-boot-api.version>
178178
<mockito.version>5.12.0</mockito.version>

docs/src/main/asciidoc/http-reference.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ include::{generated-dir}/config/quarkus-vertx-http-config-group-access-log-confi
421421
|First line of the request | `%r` | `%{REQUEST_LINE}`
422422
|HTTP status code of the response | `%s` | `%{RESPONSE_CODE}`
423423
|Date and time, in Common Log Format format | `%t` | `%{DATE_TIME}`
424+
|Date and time as defined by a DateTimeFormatter compliant string | | `%{time,date_fime_formatter_string}`
424425
|Remote user that was authenticated | `%u` | `%{REMOTE_USER}`
425426
|Requested URL path | `%U` | `%{REQUEST_URL}`
426427
|Request relative path | `%R` | `%{REQUEST_PATH}`

docs/src/main/asciidoc/security-oidc-code-flow-authentication-tutorial.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,15 @@ Finally, the `quarkus.http.auth.permission.authenticated` permission is set to t
183183
In this case, all paths are protected by a policy that ensures only `authenticated` users can access them.
184184
For more information, see xref:security-authorize-web-endpoints-reference.adoc[Security Authorization Guide].
185185

186+
[NOTE]
187+
====
188+
When you do not configure a client secret with `quarkus.oidc.credentials.secret`, it is recommended to configure `quarkus.oidc.token-state-manager.encryption-secret`.
189+
190+
The `quarkus.oidc.token-state-manager.encryption-secret` enables the default token state manager to encrypt the user tokens in a browser cookie. If this key is not defined, and the `quarkus.oidc.credentials.secret` fallback is not configured, Quarkus uses a random key. A random key causes existing logins to be invalidated either on application restart or in environment with multiple instances of your application. Alternatively, encryption can also be disabled by setting `quarkus.oidc.token-state-manager.encryption-required` to `false`. However, you should disable secret encryption in development environments only.
191+
192+
The encryption secret is recommended to be 32 chars long. For example, `quarkus.oidc.token-state-manager.encryption-secret=AyM1SysPpbyDfgZld3umj1qzKObwVMk`
193+
====
194+
186195
== Start and configure the Keycloak server
187196

188197
To start a Keycloak server, use Docker and run the following command:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,4 +518,4 @@ When the application starts, the TLS registry performs some checks to ensure the
518518
- the cipher suites and protocols are valid
519519
- the CRLs are valid
520520

521-
If any of these checks fail, the application will fail to start.
521+
If any of these checks fail, the application will fail to start.

docs/src/main/asciidoc/websockets-next-reference.adoc

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -610,12 +610,28 @@ Item find(Item item) {
610610
1. Specify the codec to use for both the deserialization of the incoming message
611611
2. Specify the codec to use for the serialization of the outgoing message
612612

613-
== Handle Pong message
613+
== Ping/pong messages
614614

615-
The `@OnPongMessage` annotation is used to consume pong messages.
616-
A websocket endpoint must declare at most one method annotated with `@OnPongMessage`.
615+
A https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.2[ping message] may serve as a keepalive or to verify the remote endpoint.
616+
A https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.3[pong message] is sent in response to a ping message and it must have an identical payload.
617617

618-
The method must accept a single parameter of type `Buffer`:
618+
The server automatically responds to a ping message sent from the client.
619+
In other words, there is no need for `@OnPingMessage` callback declared on an endpoint.
620+
621+
The server can send ping messages to a connected client.
622+
The `WebSocketConnection` declares methods to send ping messages; there is a non-blocking variant: `WebSocketConnection#sendPing(Buffer)` and a blocking variant: `WebSocketConnection#sendPingAndAwait(Buffer)`.
623+
By default, the ping messages are not sent automatically.
624+
However, the configuration property `quarkus.websockets-next.server.auto-ping-interval` can be used to set the interval after which, the server sends a ping message to a connected client automatically.
625+
626+
[source,properties]
627+
----
628+
quarkus.websockets-next.server.auto-ping-interval=2 <1>
629+
----
630+
<1> Sends a ping message to a connected client every 2 seconds.
631+
632+
The `@OnPongMessage` annotation is used to define a callback that consumes pong messages sent from the client.
633+
An endpoint must declare at most one method annotated with `@OnPongMessage`.
634+
The callback method must return either `void` or `Uni<Void>`, and it must accept a single parameter of type `Buffer`.
619635

620636
[source,java]
621637
----
@@ -625,6 +641,8 @@ void pong(Buffer data) {
625641
}
626642
----
627643

644+
NOTE: The server can also send unsolicited pong messages that may serve as a unidirectional heartbeat. There is a non-blocking variant: `WebSocketConnection#sendPong(Buffer)` and also a blocking variant: `WebSocketConnection#sendPongAndAwait(Buffer)`.
645+
628646
[[websocket-next-security]]
629647
== Security
630648

extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmConfigPersistenceUnit.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ public interface HibernateOrmConfigPersistenceUnit {
4747

4848
// @formatter:off
4949
/**
50-
* Path to a file containing the SQL statements to execute when Hibernate ORM starts.
50+
* Paths to files containing the SQL statements to execute when Hibernate ORM starts.
5151
*
52-
* The file is retrieved from the classpath resources,
53-
* so it must be located in the resources directory (e.g. `src/main/resources`).
52+
* The files are retrieved from the classpath resources,
53+
* so they must be located in the resources directory (e.g. `src/main/resources`).
5454
*
5555
* The default value for this setting differs depending on the Quarkus launch mode:
5656
*
@@ -82,7 +82,7 @@ public interface HibernateOrmConfigPersistenceUnit {
8282
* @asciidoclet
8383
*/
8484
// @formatter:on
85-
@ConfigDocDefault("import.sql in DEV, TEST ; no-file otherwise")
85+
@ConfigDocDefault("import.sql in dev and test modes ; no-file otherwise")
8686
Optional<List<@WithConverter(TrimmedStringConverter.class) String>> sqlLoadScript();
8787

8888
/**

extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/KafkaProcessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public void build(
222222
BuildProducer<ExtensionSslNativeSupportBuildItem> sslNativeSupport) {
223223
final Set<DotName> toRegister = new HashSet<>();
224224

225+
nativeLibs.produce(new NativeImageResourceBuildItem("kafka/kafka-version.properties"));
225226
collectImplementors(toRegister, indexBuildItem, Serializer.class);
226227
collectImplementors(toRegister, indexBuildItem, Deserializer.class);
227228
collectImplementors(toRegister, indexBuildItem, Partitioner.class);

extensions/resteasy-classic/rest-client-config/runtime/src/main/java/io/quarkus/restclient/config/RestClientConfig.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public class RestClientConfig {
4242
EMPTY.keyStorePassword = Optional.empty();
4343
EMPTY.keyStoreType = Optional.empty();
4444
EMPTY.hostnameVerifier = Optional.empty();
45+
EMPTY.tlsConfigurationName = Optional.empty();
4546
EMPTY.connectionTTL = Optional.empty();
4647
EMPTY.connectionPoolSize = Optional.empty();
4748
EMPTY.keepAliveEnabled = Optional.empty();
@@ -201,6 +202,20 @@ public class RestClientConfig {
201202
@ConfigItem
202203
public Optional<String> hostnameVerifier;
203204

205+
/**
206+
* The name of the TLS configuration to use.
207+
* <p>
208+
* If not set and the default TLS configuration is configured ({@code quarkus.tls.*}) then that will be used.
209+
* If a name is configured, it uses the configuration from {@code quarkus.tls.<name>.*}
210+
* If a name is configured, but no TLS configuration is found with that name then an error will be thrown.
211+
* <p>
212+
* If no TLS configuration is set, then the keys-tore, trust-store, etc. properties will be used.
213+
* <p>
214+
* This property is not applicable to the RESTEasy Client.
215+
*/
216+
@ConfigItem
217+
public Optional<String> tlsConfigurationName;
218+
204219
/**
205220
* The time in ms for which a connection remains unused in the connection pool before being evicted and closed.
206221
* A timeout of {@code 0} means there is no timeout.
@@ -317,6 +332,7 @@ public static RestClientConfig load(String configKey) {
317332
instance.keyStorePassword = getConfigValue(configKey, "key-store-password", String.class);
318333
instance.keyStoreType = getConfigValue(configKey, "key-store-type", String.class);
319334
instance.hostnameVerifier = getConfigValue(configKey, "hostname-verifier", String.class);
335+
instance.tlsConfigurationName = getConfigValue(configKey, "tls-configuration-name", String.class);
320336
instance.connectionTTL = getConfigValue(configKey, "connection-ttl", Integer.class);
321337
instance.connectionPoolSize = getConfigValue(configKey, "connection-pool-size", Integer.class);
322338
instance.keepAliveEnabled = getConfigValue(configKey, "keep-alive-enabled", Boolean.class);
@@ -358,6 +374,7 @@ public static RestClientConfig load(Class<?> interfaceClass) {
358374
instance.keyStorePassword = getConfigValue(interfaceClass, "key-store-password", String.class);
359375
instance.keyStoreType = getConfigValue(interfaceClass, "key-store-type", String.class);
360376
instance.hostnameVerifier = getConfigValue(interfaceClass, "hostname-verifier", String.class);
377+
instance.tlsConfigurationName = getConfigValue(interfaceClass, "tls-configuration-name", String.class);
361378
instance.connectionTTL = getConfigValue(interfaceClass, "connection-ttl", Integer.class);
362379
instance.connectionPoolSize = getConfigValue(interfaceClass, "connection-pool-size", Integer.class);
363380
instance.keepAliveEnabled = getConfigValue(interfaceClass, "keep-alive-enabled", Boolean.class);

extensions/resteasy-classic/rest-client-config/runtime/src/main/java/io/quarkus/restclient/config/RestClientFallbackConfigSourceInterceptor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class RestClientFallbackConfigSourceInterceptor extends FallbackConfigSou
3838
CLIENT_PROPERTIES.put("key-store", "keyStore");
3939
CLIENT_PROPERTIES.put("key-store-password", "keyStorePassword");
4040
CLIENT_PROPERTIES.put("key-store-type", "keyStoreType");
41+
CLIENT_PROPERTIES.put("tls-configuration-name", "tlsConfigurationName");
4142
CLIENT_PROPERTIES.put("follow-redirects", "followRedirects");
4243
CLIENT_PROPERTIES.put("proxy-address", "proxyAddress");
4344
CLIENT_PROPERTIES.put("query-param-style", "queryParamStyle");

extensions/resteasy-classic/rest-client-config/runtime/src/main/java/io/quarkus/restclient/config/RestClientsConfig.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,20 @@ public class RestClientsConfig {
278278
@ConfigItem
279279
public Optional<String> keyStoreType;
280280

281+
/**
282+
* The name of the TLS configuration to use.
283+
* <p>
284+
* If not set and the default TLS configuration is configured ({@code quarkus.tls.*}) then that will be used.
285+
* If a name is configured, it uses the configuration from {@code quarkus.tls.<name>.*}
286+
* If a name is configured, but no TLS configuration is found with that name then an error will be thrown.
287+
* <p>
288+
* If no TLS configuration is set, then the keys-tore, trust-store, etc. properties will be used.
289+
* <p>
290+
* This property is not applicable to the RESTEasy Client.
291+
*/
292+
@ConfigItem
293+
public Optional<String> tlsConfigurationName;
294+
281295
/**
282296
* If this is true then HTTP/2 will be enabled.
283297
*/

0 commit comments

Comments
 (0)