Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore the query when redirecting to the OIDC error path #28254

Merged

Conversation

sberyozkin
Copy link
Member

Fixes #28246

Minor update to OIDC to have the custom user query which was provided before the authorization code flow has started be restored after the user authentication has failed in Keycloak/etc and the user is redirected back to Quarkus and then to the configured error path page, I've just copied the code from a few lines above which restores such queries when the authentication has been successful.
Also removed a duplicate line removing the state cookie as it is already done just above this code.
Updated the error path test to verify the custom query is restored

@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@sberyozkin
Copy link
Member Author

The test failure is unrelated, same problem as with the already disable oidc-token-propagation-reactive:

 2022-09-29 08:54:09,545 ERROR [io.qua.oid.dep.dev.key.KeycloakDevServicesProcessor] (build-10) Realm quarkus can not be created: {"error":"invalid_grant","error_description":"Invalid user credentials"}
2022-09-29T08:54:09.5601834Z 2022-09-29 08:54:09,553 INFO  [io.qua.oid.dep.dev.key.KeycloakDevServicesProcessor] (build-10) Dev Services for Keycloak started.

where the invalid user credentials are admin:admin passed to Keycloak as env properties.... Will look at it separately

@sberyozkin
Copy link
Member Author

I'll update this PR with #28294 once it makes it

@sberyozkin sberyozkin force-pushed the oidc_error_path_restore_query branch from a856153 to 50125bc Compare October 3, 2022 08:53
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 3, 2022

Failing Jobs - Building 50125bc

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
✔️ JVM Tests - JDK 17
JVM Tests - JDK 17 MacOS M1 Set up runner ⚠️ Check → Logs Raw logs
✔️ JVM Tests - JDK 18

@sberyozkin
Copy link
Member Author

Tests look OK now

@sberyozkin sberyozkin merged commit a8dcdbe into quarkusio:main Oct 4, 2022
@sberyozkin sberyozkin deleted the oidc_error_path_restore_query branch October 4, 2022 09:25
@quarkus-bot quarkus-bot bot added this to the 2.14 - main milestone Oct 4, 2022
@gsmet gsmet modified the milestones: 2.14 - main, 2.13.1.Final Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using oidc error-path doesn't keep the original path params used for session handling
3 participants