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

Support Quarkus REST endpoint security annotations placed on endpoint implementations #41784

Conversation

michalvavrik
Copy link
Contributor

@michalvavrik michalvavrik commented Jul 9, 2024

follow-up for the #41564

This PR aims to assure that when a security annotation is placed on a method that is actually invoked (returns endpoint response), than security is applied. Also, that when the security is applied, then default JAX-RS security is not applied as requested in the #39964. Extra tests comparing to #41564 are to assert endpoint implementation is identified for supported scenarios (tested scenarios). CDI interceptors that are backup for eager checks here are untouched by this PR, as well as all existing tests.

@quarkus-bot

This comment has been minimized.

@michalvavrik michalvavrik force-pushed the feature/latest-secure-impl-method-quarkus-rest branch from d31ccbe to d30e0e6 Compare July 10, 2024 06:36
@michalvavrik michalvavrik requested a review from geoand July 10, 2024 06:39
Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

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

Amazing work!

@quarkus-bot

This comment has been minimized.

@michalvavrik
Copy link
Contributor Author

Failing: integration-tests/rest-client

I have only renamed one property and added Javadoc, before this change it worked so I think it's flaky. Anyway Caused by: java.lang.RuntimeException: Unable to establish TLS connection with: wrong.host.badssl.com:443 seems unrelated.

@michalvavrik
Copy link
Contributor Author

3 other builds with similar failures in last 7 days https://ge.quarkus.io/s/hc3vcgptusrom

@geoand
Copy link
Contributor

geoand commented Jul 10, 2024

Almost certainly unrelated, but I relaunched that job anyway

Copy link
Member

@sberyozkin sberyozkin left a comment

Choose a reason for hiding this comment

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

Everything is done very precisely with a great test coverage, minor question about the exception message, up to Michal what to do with it...

Thanks @michalvavrik

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 10, 2024

Status for workflow Quarkus CI

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

Failing Jobs

Status Name Step Failures Logs Raw logs Build scan
✔️ Native Tests - HTTP Failures Logs Raw logs 🚧

Failures

⚙️ Native Tests - HTTP #

- Failing: integration-tests/rest-client 

📦 integration-tests/rest-client

Failed to execute goal uk.co.automatictester:truststore-maven-plugin:3.0.0:generate-truststore (wrong-host-truststore) on project quarkus-integration-test-rest-client: Execution wrong-host-truststore of goal uk.co.automatictester:truststore-maven-plugin:3.0.0:generate-truststore failed: Unable to establish TLS connection with: wrong.host.badssl.com:443

@sberyozkin sberyozkin merged commit cbc6eac into quarkusio:main Jul 10, 2024
52 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.13 - main milestone Jul 10, 2024
@sberyozkin
Copy link
Member

I've just merged and noticed the test failure, but it does not look related at all

@michalvavrik michalvavrik deleted the feature/latest-secure-impl-method-quarkus-rest branch July 10, 2024 15:26
@michalvavrik
Copy link
Contributor Author

I've just merged and noticed the test failure, but it does not look related at all

I think @geoand re-run the test failure and it was fixed. So the CI was green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment