Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.13.9 backports 1 #37112

Merged
merged 9 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
<mutiny.version>1.7.0</mutiny.version>
<kafka3.version>3.2.3</kafka3.version>
<lz4.version>1.8.0</lz4.version> <!-- dependency of the kafka-clients that could be overridden by other imported BOMs in the platform -->
<snappy.version>1.1.8.4</snappy.version>
<snappy.version>1.1.10.5</snappy.version>
<strimzi-test-container.version>0.100.0</strimzi-test-container.version>
<!-- Scala is used by Kafka so we need to choose a compatible version -->
<scala.version>2.13.10</scala.version>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/_includes/devtools/create-app.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ _For more information about how to install the Quarkus CLI and use it, please re
----
mvn io.quarkus.platform:quarkus-maven-plugin:{quarkus-version}:create \
ifdef::create-app-stream[]
-DplatformVersion={create-app-stream} \
-DplatformVersion={quarkus-version} \
endif::[]
-DprojectGroupId={create-app-group-id} \
ifdef::create-app-extensions[]
Expand Down
1 change: 0 additions & 1 deletion docs/src/main/asciidoc/cache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ and pull requests should be submitted there:
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
////
= Application Data Caching
:extension-status: preview
include::_attributes.adoc[]
:categories: data
:summary: This guide explains how to cache expensive method calls of your CDI beans using simple annotations.
Expand Down
5 changes: 4 additions & 1 deletion docs/src/main/asciidoc/hibernate-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ and pull requests should be submitted there:
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
////
= Using Hibernate Reactive

include::_attributes.adoc[]
:config-file: application.properties
:reactive-doc-url-prefix: https://hibernate.org/reactive/documentation/1.1/reference/html_single/#getting-started
:extension-status: preview


link:https://hibernate.org/reactive/[Hibernate Reactive] is a reactive API for Hibernate ORM, supporting non-blocking database drivers
and a reactive style of interaction with the database.
Expand All @@ -19,6 +20,8 @@ xref:hibernate-orm.adoc[Hibernate ORM guide]. This guide will only focus on what
for Hibernate Reactive.
====

include::{includes}/extension-status.adoc[]

== Solution

We recommend that you follow the instructions in the next sections and create the application step by step.
Expand Down
117 changes: 41 additions & 76 deletions docs/src/main/asciidoc/javascript/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,42 @@ var tables = document.querySelectorAll("table.configuration-reference");
var typingTimer;

if(tables){
var idx = 0;
for (var table of tables) {
var caption = table.previousElementSibling;
if (table.classList.contains('searchable')) { // activate search engine only when needed
var input = document.createElement("input");
input.setAttribute("type", "search");
input.setAttribute("placeholder", "FILTER CONFIGURATION");
input.id = "config-search-"+(idx++);
caption.children.item(0).appendChild(input);
input.addEventListener("keyup", initiateSearch);
input.addEventListener("input", initiateSearch);
var descriptions = table.querySelectorAll(".description");
if(descriptions){
var heights = new Array(descriptions.length);
var h = 0;
for (description of descriptions){
heights[h++] = description.offsetHeight;
}
var shadowTable = table.cloneNode(true);
var shadowDescriptions = shadowTable.querySelectorAll(".description");
h = 0;
for (shadowDescription of shadowDescriptions){
makeCollapsible(shadowDescription, heights[h++]);
}
table.parentNode.replaceChild(shadowTable, table);
table = shadowTable;
}
inputs[input.id] = {"table": table};
var input = caption.firstElementChild.lastElementChild;
input.addEventListener("keyup", initiateSearch);
input.addEventListener("input", initiateSearch);
input.attributes.removeNamedItem('disabled');
inputs[input.id] = {"table": table};
}

var rowIdx = 0;
for (var row of table.querySelectorAll("table.configuration-reference > tbody > tr")) {
var heads = row.querySelectorAll("table.configuration-reference > tbody > tr > th");
if(!heads || heads.length == 0){
// mark even rows
if(++rowIdx % 2){
row.classList.add("odd");
}else{
row.classList.remove("odd");
}
}else{
// reset count at each section
rowIdx = 0;
const collapsibleRows = table.querySelectorAll('tr.row-collapsible');
if (collapsibleRows) {
for (let row of collapsibleRows) {
const td = row.firstElementChild;
const decoration = td.firstElementChild.lastElementChild.firstElementChild;
const iconDecoration = decoration.children.item(0);
const collapsibleSpan = decoration.children.item(1);
const descDiv = td.firstElementChild.children.item(1);
const collapsibleHandler = makeCollapsibleHandler(descDiv, td, row, collapsibleSpan, iconDecoration);
row.addEventListener('click', collapsibleHandler);
}
}

// render hidden rows asynchronously
setTimeout(() => renderHiddenRows());
}
}

function renderHiddenRows() {
// some rows are initially hidden so that user can hit the ground running
// we render them at this very moment, but when user can already use search function
const hiddenRows = document.querySelectorAll('table.configuration-reference-all-rows.tableblock > tbody > tr.row-hidden');
if (hiddenRows) {
for (row of hiddenRows) {
row.classList.remove('row-hidden');
}
}
}

Expand Down Expand Up @@ -164,11 +155,11 @@ function reinstallClickHandlers(table){
var td = getAncestor(descDiv, "td");
var row = td.parentNode;
var decoration = content.lastElementChild;
var iconDecoration = decoration.children.item(0);
var collapsibleSpan = decoration.children.item(1);
var iconDecoration = decoration.firstElementChild.children.item(0);
var collapsibleSpan = decoration.firstElementChild.children.item(1);
var collapsibleHandler = makeCollapsibleHandler(descDiv, td, row,
collapsibleSpan,
iconDecoration);
collapsibleSpan,
iconDecoration);

row.addEventListener("click", collapsibleHandler);
}
Expand All @@ -178,6 +169,12 @@ function reinstallClickHandlers(table){
function swapShadowTable(input){
var currentTable = inputs[input.id].table;
var shadowTable = inputs[input.id].shadowTable;

// makes sure hidden rows are always displayed when search term is defined
if (shadowTable.classList.contains('configuration-reference-all-rows')) {
shadowTable.classList.remove('configuration-reference-all-rows');
}

currentTable.parentNode.replaceChild(shadowTable, currentTable);
inputs[input.id].table = shadowTable;
inputs[input.id].shadowTable = currentTable;
Expand Down Expand Up @@ -254,41 +251,9 @@ function getAncestor(element, name){
return null;
}

/*
* COLLAPSIBLE DESCRIPTION
*/
function makeCollapsible(descDiv, descHeightLong){
if (descHeightLong > 25) {
var td = getAncestor(descDiv, "td");
var row = td.parentNode;
var iconDecoration = document.createElement("i");
descDiv.classList.add('description-collapsed');
iconDecoration.classList.add('fa', 'fa-chevron-down');

var descDecoration = document.createElement("div");
descDecoration.classList.add('description-decoration');
descDecoration.appendChild(iconDecoration);

var collapsibleSpan = document.createElement("span");
collapsibleSpan.appendChild(document.createTextNode("Show more"));
descDecoration.appendChild(collapsibleSpan);

var collapsibleHandler = makeCollapsibleHandler(descDiv, td, row,
collapsibleSpan,
iconDecoration);

var parent = descDiv.parentNode;

parent.appendChild(descDecoration);
row.classList.add("row-collapsible", "row-collapsed");
row.addEventListener("click", collapsibleHandler);
}

};

function makeCollapsibleHandler(descDiv, td, row,
collapsibleSpan,
iconDecoration) {
collapsibleSpan,
iconDecoration) {

return function(event) {
var target = event.target;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import javax.inject.Inject;
import javax.inject.Singleton;

import io.quarkus.arc.Arc;
import io.quarkus.arc.ManagedContext;
import io.quarkus.vertx.http.runtime.CurrentVertxRequest;
import io.vertx.core.MultiMap;
import io.vertx.ext.web.RoutingContext;
Expand All @@ -23,6 +25,10 @@ public class ResteasyReactiveLocaleResolver extends AbstractLocaleResolver {

@Override
protected Map<String, List<String>> getHeaders() {
final ManagedContext requestContext = Arc.container().requestContext();
if (!requestContext.isActive()) {
return null;
}
RoutingContext current = currentVertxRequest.getCurrent();
if (current != null) {
Map<String, List<String>> result = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package io.quarkus.jwt.test;

import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.test.QuarkusUnitTest;
import io.restassured.RestAssured;

public class WrongEncryptionAlgHeaderUnitTest {
@RegisterExtension
static final QuarkusUnitTest config = new QuarkusUnitTest()
.withApplicationRoot((jar) -> jar
.addClass(DefaultGroupsEndpoint.class)
.addAsResource("rsa-oaep.jwk")
.addAsResource("applicationEncryptWrongAlgorithm.properties", "application.properties"));

@Test
public void echoGroups() {
String token = "eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4R0NNIn0"
+ ".CuUuY9PH2wWjuLXd5O9LLFanwyt5-y-NzEpy9rC3A63tFsvdp8GWP1kRt1d3zd0bGqakwls623VQxzxqQ25j5gdHh8dKMl67xTLHt1Qlg36nI9Ukn7syq25VrzfrRRwy0k7isqMncHpzuBQlmfzPrszW7d13z7_ex0Uha869RaP-W2NNBfHYw26xIXcCSVIPg8jTLA7h6QmOetEej-NXXcWrRKQgBRapYy4iWrij9Vr3JzAGSHVtIID74tFOm01FdJj4s1M4IXegDbvAdQb6Vao1Ln5GolnTki4IGvH5FDssDHz6MS2JG5QBcITzfuXU81vDC00xzNEuMat0AngmOw"
+ ".UjPQbnakkZYUdoDa"
+ ".vcbS"
+ ".WQ_bOPiGKjPSq-qyGOIfjA";
RestAssured.given().auth()
.oauth2(token)
.get("/endp/echo")
.then().assertThat().statusCode(401).body(Matchers.emptyString());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
smallrye.jwt.decrypt.key.location=/rsa-oaep.jwk
mp.jwt.verify.issuer=https://server.example.com

quarkus.log.category."io.quarkus.smallrye.jwt.runtime.auth.MpJwtValidator".min-level=TRACE
quarkus.log.category."io.quarkus.smallrye.jwt.runtime.auth.MpJwtValidator".level=TRACE
14 changes: 14 additions & 0 deletions extensions/smallrye-jwt/deployment/src/test/resources/rsa-oaep.jwk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"alg": "RSA-OAEP",
"use": "enc",
"n": "kqGboBfAWttWPCA-0cGRgsY6SaYoIARt0B_PkaEcIq9H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73Kw0NagnVCaeH75HgeX5v6ZBQsrpIigynr3hl8T_LLNwIXebVnpFI2n5de0BTZ0DraxfZvOhYJEJV43NE8zWm7fdHLx2fxVFJ5mBGkXv0",
"dq": "U_xJCnXF51iz5AP7MXq-K6YDIR8_t0UzEMV-riNm_OkVKAoWMnDZFG8R3sU98djQaxwKT-fsg2KjvbuTz1igBUzzijAvQESpkiUB82i2fNAj6rqJybpNKESq3FWkoL1dsgYsS19knJ31gDWWRFRHZFujjPyXiexz4BBmjK1Mc1E",
"qi": "Uvb84tWiJF3fB-U9wZSPi7juGgrzeXS_LYtf5fcdV0fZg_h_5nSVpXyYyQ-PK218qEC5MlDkaHKRD9wBOe_eU_zJTNoXzB2oAcgl2MapBWUMytbiF84ghP_2K9UD63ZVsyrorSZhmsJIBBuqQjrmk0tIdpMdlMxLYhrbYwFxUqc",
"kid": "kid-rsa-enc-oaep",
"kty": "RSA"
}
5 changes: 5 additions & 0 deletions independent-projects/bootstrap/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
<artifactId>failureaccess</artifactId>
<version>${guava.failureaccess.version}</version>
</dependency>
<dependency>
<groupId>com.google.j2objc</groupId>
<artifactId>j2objc-annotations</artifactId>
<version>${j2objc.annotations.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
Expand Down
3 changes: 2 additions & 1 deletion independent-projects/bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@
<jakarta.enterprise.cdi-api.version>2.0.2</jakarta.enterprise.cdi-api.version>
<jakarta.inject-api.version>1.0</jakarta.inject-api.version>
<commons-lang.version>3.12.0</commons-lang.version>
<guava.version>31.1-jre</guava.version>
<guava.version>32.0.1-jre</guava.version>
<guava.failureaccess.version>1.0.1</guava.failureaccess.version><!-- keep in sync with guava.version -->
<j2objc.annotations.version>2.8</j2objc.annotations.version><!-- keep in sync with guava.version -->
<shrinkwrap-depchain.version>1.2.6</shrinkwrap-depchain.version>
<jboss-logmanager-embedded.version>1.0.10</jboss-logmanager-embedded.version>
<slf4j-jboss-logmanager.version>1.1.0.Final</slf4j-jboss-logmanager.version>
Expand Down
Loading
Loading