Open michalvavrik opened 11 months ago
/cc @geoand (devservices), @stuartwdouglas (devservices)
@michalvavrik The log output is now collapsed once the container has started, so that output is there initially but unfortunately hard to see
As far as the code grant is concerned, keycloak dev service specific property has been deprecated so the code allows to use another property such that if someone uses the deprecated property it still works. OIDC ui processor is only invoked when dev service is disabled so it can't depend on the Keycloak dev service specific property.
@michalvavrik The log output is now collapsed once the container has started, so that output is there initially but unfortunately hard to see
Understand, maybe it depends on how quick one's machine is, but if it is common not so see it (I tried again because of code flow default value check) I think text probably shouldn't raise my expectations. I'll leave you to decide.
As far as the code grant is concerned, keycloak dev service specific property has been deprecated so the code allows to use another property such that if someone uses the deprecated property it still works. OIDC ui processor is only invoked when dev service is disabled so it can't depend on the Keycloak dev service specific property.
I tried it again and when I click to login I can see response_type=code
in Keycloak query and later I can see it in Quarkus log, so you are right:
2023-12-12 08:43:03,152 INFO [io.qua.oid.run.dev.OidcDevServicesUtils] (vert.x-eventloop-thread-3) Using authorization_code grant to get a token from 'http://localhost:32771/realms/quarkus/protocol/openid-connect/token' with client id 'quarkus-app
But my initial point is still there: you mentioned here at one line of guide that code
is default, but where else can I find it? Can you add some note to configuration property description or considering there is no default value, can you at document it, for example with defaultValueDocumentation
:
/**
* Grant type which will be used to acquire a token to test the OIDC 'service' applications
*/
@ConfigItem(defaultValueDocumentation = "code is default unless XYZ")
public Optional<Type> type;
Describe the bug
I read https://quarkus.io/version/main/guides/security-openid-connect-dev-services and saw few discrepancies:
https://quarkus.io/version/main/guides/security-openid-connect-dev-services#dev-services-for-keycloak says run your app without configuring quarkus.oidc properties .. and you will see
I don't see it, I did:
quarkus create app oidc --extensions=resteasy-reactive,oidc
,cd oidc
,quarkus dev
and saw:I tried it twice in case there is just some temporary logging that disappears, but I can't see it. If there is something specific I should do to see it, I'd like to know. Or I shouldn't be expected to see it.
https://quarkus.io/version/main/guides/security-openid-connect-dev-services#introduction links to
/q/dev
which redirects to/q/dev-ui
. I think it should be latter as that is same as https://quarkus.io/version/main/guides/dev-ui uses.https://quarkus.io/version/main/guides/security-openid-connect-dev-services#dev-services-for-keycloak image says Keycloak provider but text says Provider: Keycloak
https://quarkus.io/version/main/guides/security-openid-connect-dev-services#keycloak-authorization-code-grant says If you set quarkus.oidc.devui.grant.type=code in application.properties (this is a default value) but I can't see it as a default value here https://quarkus.io/guides/all-config#quarkus-oidc_quarkus.oidc.devui.grant.type and looking at
https://github.com/quarkusio/quarkus/blob/9d9cb794218b61b1213dae3c43176c0cb6d99250/extensions/oidc/deployment/src/main/java/io/quarkus/oidc/deployment/devservices/OidcDevUIProcessor.java#L115
I can see it is default, but looking at
https://github.com/quarkusio/quarkus/blob/9d9cb794218b61b1213dae3c43176c0cb6d99250/extensions/oidc/deployment/src/main/java/io/quarkus/oidc/deployment/devservices/keycloak/KeycloakDevUIProcessor.java#L56
I'm not sure what the default is there. If indeed
code
is default, then shouldn't it be documented somewhere else as well?but these messages are now logged by
io.quarkus.oidc.runtime.devui.OidcDevServicesUtils
io.quarkus.oidc.deployment.devservices.OidcDevUIProcessor
/q/dev-ui
instead of/q/dev
, not an issue thoughExpected behavior
Consider discrepancies.
Actual behavior
See issue description.
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response