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

WebSockets Next: activate CDI session context only if needed #44323

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Nov 5, 2024

Copy link

quarkus-bot bot commented Nov 5, 2024

Status for workflow Quarkus CI

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

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

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

You can consult the Develocity build scans.

&& bean.isClassBean()
&& bean.hasAroundInvokeInterceptors()
&& SecurityTransformerUtils.hasSecurityAnnotation(bean.getTarget().get().asClass())) {
// The given scope is RequestScoped, the bean is class-based, has an aroundInvoke interceptor associated and is annotated with a security annotation
Copy link
Member

Choose a reason for hiding this comment

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

CI is green, so it is probably unnecessary question, but this bean info comes from the ValidationPhaseBuildItem and I think this item already reflects AnnotationsTransformerBuildItem, so I am surprised that endpoints would have associated CDI interceptors. I thought they are removed. I suppose that class info does not reflect changes and you would need to use annotation store, but how is it that hasAroundInvokeInterceptors is true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's actually a very good question. I completely forgot that we remove the security annotations from endpoints. However, this PR does not change the logic, i.e. this condition was introduced in #43915: https://github.com/quarkusio/quarkus/pull/43915/files#diff-ceb74c4c03f53a1843b0c3b46d77068d483c1694677307b1415a86d6d91a8a34R487-R495.

Hm, so the annotations are removed and security interceptors should not be associated. But I guess that it's fine because we don't use the injected CurrentIdentityAssociation (which is @RequestScoped) for endpoint validation.

Copy link
Member

Choose a reason for hiding this comment

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

Right, that is true, we don't need CurrentIdentityAssociation for endpoint security checks. I didn't realize that. Cool, in that case it is fine.

Copy link

github-actions bot commented Nov 5, 2024

🙈 The PR is closed and the preview is expired.

Copy link

quarkus-bot bot commented Nov 5, 2024

Status for workflow Quarkus Documentation CI

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

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

Copy link
Member

@cescoffier cescoffier left a comment

Choose a reason for hiding this comment

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

LGTM

@mkouba mkouba merged commit 2245430 into quarkusio:main Nov 5, 2024
23 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.17 - main milestone Nov 5, 2024
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.

3 participants