quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.73k stars 2.67k forks source link

Keycloak Devservice should also provide configuration for admin client #35390

Closed GregJohnStewart closed 9 months ago

GregJohnStewart commented 1 year ago

Description

Currently, when using the oidc and keycloak-admin-client extensions, the configuration for the admin client is not provided by the Keycloak devservice, provided in oidc.

I would want the admin client's configuration (url, credentials, realm(?)) to be configured. Assuming that the oidc's keycloak devservice would just need to provide this additional configuration.

This brings up another question though, do we want to set the admin client extension to bring in its own keycloak devservice if oidc is not present? I am not privy to the setup of devservices and don't know if it is possible to smartly do this.

Implementation ideas

No response

quarkus-bot[bot] commented 1 year ago

/cc @pedroigor (keycloak), @sberyozkin (keycloak)

sberyozkin commented 1 year ago

Thanks @GregJohnStewart, sure, I agree it can make sense to have Keycloak Admin client but also OIDC client pick up some properties set up by OIDC dev services

jacobdotcosta commented 11 months ago

To be able to use the Keycloak admin-client with devservices I set the quarkus.keycloak.devservices.port variable to a default and add it to the admin-client property.

For instances:

%test.quarkus.keycloak.admin-client.server-url=http://localhost:${kc.admin.port.test:45180}/
%test.quarkus.keycloak.devservices.port=${kc.admin.port.test:45180}
sberyozkin commented 9 months ago

Thanks @jacobdotcosta, let me doc it