-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Make SecurityCheckStorage bean unremoveable #28736
Conversation
Hi @geoand, #28732 mentions that making the bean unremovable causes JAX-RS custom exception mappers for Forbidden and Unauthorized being ignored, I know @michalvavrik has added a few tests for the custom mappers, yeah, actually, I think Michal added the one for |
There is already |
Now you folks confused me :). Do we or do we not need to do anything else for this? |
The issue with reproducer is that RBAC annotations aren't inherited from interface, actual |
That might be the case, but why is this bean not unremovable? It seems very fishy to me that the proper functionality depends on the bean not being present... |
And just to add to the previous comment, if what has been done here is problematic, why do no tests fail? |
I suspected this was the case and in practice to solve my problem I just eliminated the interface. I opened this issue to understand why they aren't inherited. This error is also a bit obscure. |
@geoand |
@davidfrickert agree. @geoand IMHO bean should be unremovable. |
Yeah, looks like @davidfrickert may not have done it correctly, as Michal pointed out as, indeed, as far as I recall, RBAC annotations are not inherited. I propose to wait a little bit for @davidfrickert to clarify, before we merge the fix which indeed looks good |
There is no reason I can think of why a bean in Quarkus that is obtained programmatically by Quarkus itself would not be made unremoveable. |
Cool, so all is good |
So yeah, I agree the usage was not correct to begin with, and this fix only oncovers the real issue |
Thanks for the fix @geoand. @michalvavrik @sberyozkin - about the RBAC annotations, why are they not inherited to the class, is that a limitation or on purpose? In any case, should it not be documented in the Quarkus Security guides? Like this one - https://quarkus.io/guides/security-openid-connect - for example. About my problem with the exception mappers, it seems to actually be related to |
🙏🏼 |
@davidfrickert |
ah @davidfrickert there is already one #22540 |
@michalvavrik Didn't check the annotation so that was my bad. But it's nice that there is already an issue and PR for it, thanks! |
Fixes: #28732