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

Update OIDC bearer doc with a section about response filters #45143

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

sberyozkin
Copy link
Member

This PR adds a missing section about OIDC response filters to the OIDC bearer guide

@sberyozkin sberyozkin requested a review from gastaldi December 16, 2024 13:45
@quarkus-bot quarkus-bot bot added area/docstyle issues related for manual docstyle review area/documentation labels Dec 16, 2024
import io.quarkus.oidc.runtime.OidcUtils;

@ApplicationScoped
@Unremovable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is @Unremovable always required? Wonder if beans with @OidcEndpoint can be considered @Unremovable by default

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gastaldi Thanks, interesting idea, we can probably make an enhancement request to introspect it at build time. Though @OidcEndpont is optional, without it a filter applies to all endpoint responses (in case of response filters)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, or maybe consider OidcResponseFilter implementations unremovable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, for all 3 types of filters (request, response, redirect)

@sberyozkin sberyozkin force-pushed the oidc_bearer_response_filters branch from 4a00109 to a781b4f Compare December 16, 2024 14:03
if (contentType.equals("application/json") {
String tenantId = rc.requestProperties().get(OidcUtils.TENANT_ID_ATTRIBUTE); <3>
String metadata = rc.responseBody().toString(); <4>
LOG.debugf("Tenant %s OIDC metadata: %s", tenantId, metadata);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a cleaner code, how about using io.quarkus.logging.Log instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gastaldi Sure, updated both docs, thanks

Copy link

github-actions bot commented Dec 16, 2024

🙈 The PR is closed and the preview is expired.

This comment has been minimized.

@sberyozkin sberyozkin force-pushed the oidc_bearer_response_filters branch from a781b4f to 160392c Compare December 16, 2024 15:24
@sberyozkin sberyozkin force-pushed the oidc_bearer_response_filters branch from 160392c to e72472f Compare December 16, 2024 15:26
Copy link

quarkus-bot bot commented Dec 16, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit e72472f.

✅ 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 sberyozkin merged commit 270ae56 into quarkusio:main Dec 16, 2024
5 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.18 - main milestone Dec 16, 2024
@sberyozkin sberyozkin deleted the oidc_bearer_response_filters branch December 16, 2024 16:40
@gsmet gsmet modified the milestones: 3.18 - main, 3.17.5 Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docstyle issues related for manual docstyle review area/documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants