Skip to content

Commit e8adf71

Browse files
author
Dennis Labordus
committed
Decide to go for SmallRye JWT, less dependencies and more flexible to use.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent f0bab04 commit e8adf71

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

app/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ SPDX-License-Identifier: Apache-2.0
6161
<groupId>io.quarkus</groupId>
6262
<artifactId>quarkus-resteasy</artifactId>
6363
</dependency>
64+
<dependency>
65+
<groupId>io.quarkus</groupId>
66+
<artifactId>quarkus-smallrye-jwt</artifactId>
67+
</dependency>
6468
<dependency>
6569
<groupId>io.quarkus</groupId>
6670
<artifactId>quarkus-smallrye-openapi</artifactId>
@@ -81,10 +85,6 @@ SPDX-License-Identifier: Apache-2.0
8185
<groupId>io.quarkus</groupId>
8286
<artifactId>quarkus-hibernate-validator</artifactId>
8387
</dependency>
84-
<dependency>
85-
<groupId>io.quarkus</groupId>
86-
<artifactId>quarkus-oidc</artifactId>
87-
</dependency>
8888

8989
<!-- Test Dependencies -->
9090
<dependency>
@@ -104,7 +104,7 @@ SPDX-License-Identifier: Apache-2.0
104104
</dependency>
105105
<dependency>
106106
<groupId>io.quarkus</groupId>
107-
<artifactId>quarkus-test-security-oidc</artifactId>
107+
<artifactId>quarkus-test-security</artifactId>
108108
<scope>test</scope>
109109
</dependency>
110110
<dependency>

app/src/main/resources/application.properties

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ quarkus.http.cors = false
66
quarkus.http.root-path = /compas-scl-data-service/
77
quarkus.http.limits.max-body-size = 150M
88

9-
quarkus.log.level = DEBUG
10-
quarkus.log.category."org.lfenergy.compas.scl.data".level = DEBUG
9+
quarkus.log.level = INFO
10+
quarkus.log.category."org.lfenergy.compas.scl.data".level = INFO
1111

1212
# BaseX configuration
1313
basex.host = ${BASEX_HOST:localhost}
@@ -22,10 +22,11 @@ basex.password = ${BASEX_PASSWORD:admin}
2222
%dev.quarkus.log.level = DEBUG
2323
%dev.quarkus.log.category."org.lfenergy.compas.scl.data".level = DEBUG
2424

25-
# Open ID Connect
26-
quarkus.oidc.auth-server-url = ${AUTH_SERVER_URL:http://localhost:8089/auth/realms/compas}
27-
quarkus.oidc.client-id = ${AUTH_CLIENT_ID:scl-data-service}
28-
quarkus.oidc.application-type = service
25+
# Smallrye JWT Properties (Microprofile)
26+
smallrye.jwt.verify.key.location = ${JWT_VERIFY_KEY:http://localhost:8089/auth/realms/compas/protocol/openid-connect/certs}
27+
mp.jwt.verify.issuer = ${JWT_VERIFY_ISSUER:http://localhost:8089/auth/realms/compas}
28+
mp.jwt.verify.audiences = ${JWT_VERIFY_CLIENT_ID:scl-data-service}
29+
smallrye.jwt.path.groups = ${JWT_GROUPS_PATH:resource_access/scl-data-service/roles}
2930

3031
quarkus.http.auth.permission.deny-default.paths=/*
3132
quarkus.http.auth.permission.deny-default.policy=deny

0 commit comments

Comments
 (0)