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

Introduce OidcRequestFilter #36634

Merged

Conversation

sberyozkin
Copy link
Member

Fixes #22432.

Related to #36563.

This PR adds an option to customize OIDC client requests made by either quarkus-oidc-client or quarkus-oidc extensions, where users can add new headers, bby analyzing the request Buffer body if necessary along the way.

Two tests have been added:

@quarkus-bot

This comment has been minimized.

@sberyozkin
Copy link
Member Author

@michalvavrik Hey Michal, should we also disable MySql test and keep the Postgresql one only ? It should be enough

@sberyozkin sberyozkin force-pushed the oidc_client_request_customizer branch from b97b34a to ee61fa7 Compare October 23, 2023 18:29
Quarkus Documentation automation moved this from To do to Reviewer approved Oct 23, 2023
@michalvavrik
Copy link
Contributor

@michalvavrik Hey Michal, should we also disable MySql test and keep the Postgresql one only ? It should be enough

This is really pity, because there is nothing wrong with these tests, they are not even flaky. Insufficient CI makes them flaky:

2023-10-23T15:56:11.0914706Z 2023-10-23 15:56:11,049 INFO  [tc.qua.io/.0.4] (build-23) Container quay.io/keycloak/keycloak:22.0.4 started in PT28.958038924S
2023-10-23T15:56:15.1280828Z 2023-10-23 15:56:15,066 ERROR [io.qua.oid.dep.dev.key.KeycloakDevServicesProcessor] (build-23) Admin token can not be acquired: null [Error Occurred After Shutdown]
2023-10-23T15:56:15.2283056Z 2023-10-23 15:56:15,135 ERROR [io.qua.oid.dep.dev.key.KeycloakDevServicesProcessor] (build-23) Realm quarkus can not be created 401 - Unauthorized  [Error Occurred After Shutdown]

Yeah, I suppose we need to disable it, because IMO there is nothing to fix if CI doesn't have enough resources, or what else could be an issue?

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 23, 2023

✔️ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@sberyozkin
Copy link
Member Author

Thanks @michalvavrik @gastaldi, 2 reviews are sufficient, hey @pedroigor, any concerns, then please ping me

@sberyozkin sberyozkin merged commit 1e69886 into quarkusio:main Oct 23, 2023
24 checks passed
Quarkus Documentation automation moved this from Reviewer approved to Done Oct 23, 2023
@quarkus-bot quarkus-bot bot added the kind/enhancement New feature or request label Oct 23, 2023
@sberyozkin sberyozkin deleted the oidc_client_request_customizer branch October 23, 2023 22:17
@quarkus-bot quarkus-bot bot added this to the 3.6 - main milestone Oct 23, 2023
@sberyozkin
Copy link
Member Author

@michalvavrik I can take care of disabling the mysql test following the same approach you did for mssql, we'd still have progresql in deployment and oracle in integration tests, decent coverage :-)

@github-actions
Copy link

🙈 The PR is closed and the preview is expired.

@calvernaz
Copy link

After changing my build.gradle.kts, gradle.properties and settings.gradle.kts to use the snapshot repository and version 999-SNAPSHOT, I get the build of materials, but the extensions still stuck on 3.5.0.

@michalvavrik
Copy link
Contributor

After changing my build.gradle.kts, gradle.properties and settings.gradle.kts to use the snapshot repository and version 999-SNAPSHOT, I get the build of materials, but the extensions still stuck on 3.5.0.

Not sure I copy, that depends on BOM, right? Is you group id io.quarkus? (without platform)? You can provide an example.

@calvernaz
Copy link

yea the BOM seems to still carry quarkus-oidc and not the latest, which I expected.

quarkusPluginId=io.quarkus
quarkusPluginVersion=999-SNAPSHOT
quarkusPlatformGroupId=io.quarkus.platform
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformVersion=999-SNAPSHOT

and build.gradle.kts

    
    implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
    implementation("io.quarkus:quarkus-resteasy-reactive-jackson")
    implementation("io.quarkus:quarkus-oidc")
    implementation("io.quarkus:quarkus-arc")

bom

How can I use extensions snapshots then?

@michalvavrik
Copy link
Contributor

IMO quarkusPlatformGroupId=io.quarkus.platform => quarkusPlatformGroupId=io.quarkus, I don't have super much experience with Gradle.

@calvernaz
Copy link

That did the job @michalvavrik, thanks!

@michalvavrik
Copy link
Contributor

Perfect!

@sberyozkin sberyozkin changed the title Introduce OidcClientRequestFilter Introduce OidcRequestFilter Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Improve OIDC client pluggability
4 participants