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

Don't convert WebApplicationException in REST Client when produced by a custom mapper #42290

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Aug 2, 2024

The idea is that if a user has opted to create an exception, we should always honor it - even if it's a WebApplicationException

@geoand
Copy link
Contributor Author

geoand commented Aug 2, 2024

@FroMage WDYT?

This comment has been minimized.

This comment has been minimized.

@FroMage
Copy link
Member

FroMage commented Aug 2, 2024

My only objection would be the original security mistake of JAX-RS which is that client and server share the same exception type, and so it's too easy for client calls to leak client call details to server users. Things like status code, reason, headers, bodies.

That's why our clients don't throw WebApplicationException instances. Now, in the case of custom mappers… Given that they're separate exception mappers to the server mappers, perhaps that's alright. But given that the original issue was avoiding security leaks, make sure you keep this in mind while reviewing the feature?

I can't think a security reason to refuse this PR, myself.

@geoand
Copy link
Contributor Author

geoand commented Aug 2, 2024

But given that the original issue was avoiding security leaks, make sure you keep this in mind while reviewing the feature?

Yeah, the use in the reported issue is legit and does things properly

@geoand geoand requested a review from FroMage August 2, 2024 12:52
@geoand
Copy link
Contributor Author

geoand commented Aug 5, 2024

@FroMage mind reviewing this?

Thanks

… a custom mapper

The idea is that if a user has opted to create an exception,
we should always honor it - even if it's a WebApplicationException

Fixes: quarkusio#42275
Copy link
Member

@FroMage FroMage left a comment

Choose a reason for hiding this comment

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

LGTM

@geoand
Copy link
Contributor Author

geoand commented Aug 5, 2024

🙏🏼

@geoand geoand added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Aug 5, 2024
Copy link

quarkus-bot bot commented Aug 5, 2024

Status for workflow Quarkus CI

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

✅ 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.

You can consult the Develocity build scans.

@geoand geoand merged commit b5231da into quarkusio:main Aug 5, 2024
32 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.14 - main milestone Aug 5, 2024
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Aug 5, 2024
@geoand geoand deleted the #42275 branch August 5, 2024 12:00
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.

REST Client Replaces WebApplicationException Instances Returned By ExceptionMapper
2 participants