-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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: fire authorization sucesss and failure events for HTTP upgrade security checks #45800
base: main
Are you sure you want to change the base?
WebSockets Next: fire authorization sucesss and failure events for HTTP upgrade security checks #45800
Conversation
michalvavrik
commented
Jan 22, 2025
- when working on Support permission checkers for WebSockets Next #45704 I have mentiond that HTTP upgrade checks don't have security events (docs https://quarkus.io/guides/security-customization#observe-security-events) integrated, hence fixing that
- this PR also adds a smoke tests for the rest of supported authorization scenarios
Thanks Michal, chatbot links can be offered as part of the HTTP application, I wonder, how does the event listener know where exactly it failed, at the HTTP Upgrade time, or at some non-WS HTTP request time ? |
The other question, so we recommend using authentication at the HTTP upgrade time, but also allow it on methods like |
c00b4c0
to
7521bf2
Compare
This really depends on where is is thrown, sadly I don't have a short answer, so please endure: It depends on where is authorization failure / success performed:
Long answer short: you need to inspect event properties. I think we could unify it somehow, but this will always differ based on what is authorized. For example eagerly performed security checks on Quarkus REST endpoints has again different set of properties because there you know: method (it is annotated right?), routingcontext, security check name
Not sure what you mean, I think I have tests for everything. if I missed something please let me know and I'll fix it. If you wonder what happens there in regards of security events? every authorization has it's own event, so HTTP Security policies has their own authorization event instance fired and security annotations has their own event instance fired. That's not new, because you can't know if next authorization is coming in a different level, so you can't fire one event per all different authorizations. |
@michalvavrik It is just that the PR says |
Status for workflow
|
This test method https://github.com/quarkusio/quarkus/pull/45800/files#diff-d45d0fb9a839e6fdf80b00f4e49eea69992399f252c82e5ad3206c231b25ef9dR224 checks security events on bean methods after insecure upgrade. Sorry if I am slow, it's just that it is something that had worked before, this PR is only fixing events for security annotations placed next to |