KB66 Upgrade to Quarkus 2.0.2, fix authentication.
Change-Id: I251fbdbe915e32aaeb8daa087691853da17f4799
diff --git a/pom.xml b/pom.xml
index c9d9ed9..1e668ac 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<enforcer-plugin.version>3.0.0-M3</enforcer-plugin.version>
<processor-plugin.version>4.2</processor-plugin.version>
- <quarkus.version>2.0.0.Final</quarkus.version>
+ <quarkus.version>2.0.2.Final</quarkus.version>
<resources-plugin.version>3.2.0</resources-plugin.version>
<spotless-plugin.version>2.11.0</spotless-plugin.version>
@@ -177,6 +177,10 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
+ <artifactId>quarkus-smallrye-context-propagation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>
<dependency>
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/login/RoleAugmentor.java b/src/main/java/eu/mulk/mulkcms2/benki/login/RoleAugmentor.java
index 3aafc0e..37d865f 100644
--- a/src/main/java/eu/mulk/mulkcms2/benki/login/RoleAugmentor.java
+++ b/src/main/java/eu/mulk/mulkcms2/benki/login/RoleAugmentor.java
@@ -30,7 +30,6 @@
return augmentWithRoles(identity, context);
}
- @Transactional
Uni<SecurityIdentity> augmentWithRoles(
SecurityIdentity identity, AuthenticationRequestContext context) {
return context.runBlocking(
@@ -41,6 +40,7 @@
}
@CacheResult(cacheName = "login-role-cache")
+ @Transactional
Set<String> getUserLoginRoles(String userNickname) {
var user = User.findByNicknameWithRoles(userNickname);
return user.effectiveRoles.stream()
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 53233ba..bbffd39 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -32,6 +32,7 @@
quarkus.http.auth.proactive = true
quarkus.oidc.auth-server-url = https://login.benkard.de/auth/realms/master
+quarkus.oidc.authentication.force-redirect-https-scheme = true
quarkus.oidc.client-id = mulkcms
quarkus.oidc.application-type = web-app
quarkus.oidc.token.principal-claim = preferred_username