mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
Upgrade to Quarkus 3.15.2 (#35078)
* Upgrade to Quarkus 3.15.2 Closes #35077 Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Remove workaround for overridden micrometer dependencies Closes #33469 Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Unable to use custom handlers for HTTP OPTIONS method in subresources Fixes #36009 Signed-off-by: Martin Bartoš <mabartos@redhat.com> --------- Signed-off-by: Martin Bartoš <mabartos@redhat.com>
This commit is contained in:
parent
c2eb95b058
commit
0cfeabe6cf
4
pom.xml
4
pom.xml
@ -52,8 +52,8 @@
|
||||
<jboss.snapshots.repo.id>jboss-snapshots-repository</jboss.snapshots.repo.id>
|
||||
<jboss.snapshots.repo.url>https://s01.oss.sonatype.org/content/repositories/snapshots/</jboss.snapshots.repo.url>
|
||||
|
||||
<quarkus.version>3.15.1</quarkus.version>
|
||||
<quarkus.build.version>3.15.1</quarkus.build.version>
|
||||
<quarkus.version>3.15.2</quarkus.version>
|
||||
<quarkus.build.version>3.15.2</quarkus.build.version>
|
||||
|
||||
<project.build-time>${timestamp}</project.build-time>
|
||||
|
||||
|
||||
@ -43,34 +43,6 @@
|
||||
<module>tests</module>
|
||||
</modules>
|
||||
|
||||
<!-- Remove once Quarkus Micrometer extension uses Micrometer 1.13.5-->
|
||||
<!-- See https://github.com/keycloak/keycloak/issues/33469 -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-core</artifactId>
|
||||
<version>1.13.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-commons</artifactId>
|
||||
<version>1.13.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-observation</artifactId>
|
||||
<version>1.13.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-registry-prometheus-simpleclient</artifactId>
|
||||
<version>1.13.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<!-- Remove until here -->
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>central</id>
|
||||
|
||||
@ -16,6 +16,9 @@
|
||||
*/
|
||||
package org.keycloak.services.resources.account;
|
||||
|
||||
import jakarta.ws.rs.OPTIONS;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import org.eclipse.microprofile.openapi.annotations.Operation;
|
||||
import org.jboss.logging.Logger;
|
||||
import org.keycloak.http.HttpRequest;
|
||||
import org.keycloak.http.HttpResponse;
|
||||
@ -96,6 +99,16 @@ public class AccountLoader {
|
||||
}
|
||||
}
|
||||
|
||||
// Remove once Quarkus is upgraded to 3.15.3, or reconsidered to use this approach
|
||||
// See https://github.com/keycloak/keycloak/issues/36009
|
||||
@OPTIONS
|
||||
@Path("{any:.*}")
|
||||
@Operation(hidden = true)
|
||||
public Response preFlight() {
|
||||
return new CorsPreflightService().preflight();
|
||||
}
|
||||
// remove until here
|
||||
|
||||
@Path("{version : v\\d[0-9a-zA-Z_\\-]*}")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public Object getVersionedAccountRestService(final @PathParam("version") String version) {
|
||||
|
||||
@ -26,7 +26,16 @@ public class AdminPreflightTest {
|
||||
|
||||
@Test
|
||||
public void testPreflight() throws IOException {
|
||||
HttpOptions options = new HttpOptions(keycloakUrls.getAdminBuilder().path("/realms/master/users").build());
|
||||
testPreflightForAdminPath("/realms/master/users");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPreflightServerInfo() throws IOException {
|
||||
testPreflightForAdminPath("/serverinfo");
|
||||
}
|
||||
|
||||
private void testPreflightForAdminPath(String path) throws IOException {
|
||||
HttpOptions options = new HttpOptions(keycloakUrls.getAdminBuilder().path(path).build());
|
||||
options.setHeader("Origin", "http://test");
|
||||
|
||||
HttpResponse response = client.execute(options);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user