Closed twobiers closed 2 years ago
/cc @evanchooly, @pedroigor, @sberyozkin, @stuartwdouglas
@tobi6112 Hi, DevServices for Keycloak
only uses keycloak.url
for the dev/test purposes, it is not in the quarkus namespace. Similarly to client.quarkus.oidc.server-url
which is there to help the tests to find Keycloak in the docker network.
DevServices for Keycloak
will set quarkus.oidc.auth-server-url
, quarkus.oidc.client-id
, so I think you should have those set in %prod
profile only.
quarkus-oidc
can't really support keycloak.url
as a runtime property - as it is Keycloak independent
This line, https://github.com/quarkusio/quarkus/blob/main/extensions/oidc/deployment/src/main/java/io/quarkus/oidc/deployment/devservices/keycloak/KeycloakDevServicesProcessor.java#L258, should probably be removed, however, someone may already be using it in the dev or test profle, so it should stay for now.
@tobi6112 I got it, %prod
is actually a default profile. So in your configuration, the properties without a %prod.
prefix are in fact in the prod profile. So you should add %dev.
to those dev properties which would like to depend on keycloak.url
; likewise you may want to add a test profile specific properties as well.
I think we can close this issue
@sberyozkin Thanks for your fast reply and explaination, yes from my side the issue can be closed as it doesn't seem to be a bug. However, I guess my experiments are more likely to evolve into a feature request regarding the KC AdminClient later on.
@tobi6112 Np; yes, KC AdminClient extension is only there to facilitate the use of this API in Quarkus and native image in paricular
Describe the bug
I am experimenting with the integration of the Keycloak RealmResource in my Quarkus Application. To the best of my knowledge quarkus does not offer a implementation for that, so my solution was to define some custom properties and then create a bean for the RealmResource
Next up I want to setup the application configuration for production and development. I made the oidc configuration dependent by expansion of the previously defined keycloak configuration.
For the production configuration that works like a charm, but with the dev services i encounter the following error.
If I'm not mistaking something the
keycloak.url
configuration key should be in fact available at runtime and is listed in the configuration editor when launching the application without my configuration stuff.Another question unrelated to the problem itself is: What exactly is the purpose of the
keycloak-admin-client
extension? It seems to be more like a "fixing extension" than a "feature extension" if that makes any sense.Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.7.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)------------------------------------------------------------ Gradle 7.3 ------------------------------------------------------------ Build time: 2021-11-09 20:40:36 UTC Revision: 96754b8c44399658178a768ac764d727c2addb37 Kotlin: 1.5.31 Groovy: 3.0.9 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 17.0.1 (Eclipse Adoptium 17.0.1+12) OS: Windows 10 10.0 amd64
Additional information
No response