You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TestSecurity#permissions method says that " If you need to test custom permissions, you can add them with io. quarkus. security. identity. SecurityIdentityAugmentor.. But when we use it with a custom annotation like following example, that permission does not get invoked.
cmasantos
changed the title
TestSecurity#permissions use SecurityIdentityAugmentor only work with proactive auth
TestSecurity#permissions using SecurityIdentityAugmentor only work with proactive auth
Nov 13, 2024
To clarify situation TestSecurity#permissions using SecurityIdentityAugmentor only work with proactive auth - the TestSecurity#permission works, but it sets string permissions. So the issue I can see is that your augmentor is not applied.
Internally, it may require radical changes as we basically need to drop TestIdentityAssociation or apply augmentors in there (which feels wrong). I'll have try it. Thanks
I have looked into this, it turns out augmentors were not applied to the identity produced with @TestSecurity at all. Thank you for bringing this up. I'll open PR in few minutes that will fix it.
Description
Hello,
The
TestSecurity#permissions
method says that "If you need to test custom permissions, you can add them with io. quarkus. security. identity. SecurityIdentityAugmentor.
. But when we use it with a custom annotation like following example, that permission does not get invoked.Example:
with custom permission:
then on the test:
it ends up on a 403 - (Quarkus 3.16.2) -
If we try to user the
SecurityIdentityAugmentor
it will not have any different effect, the identity will be anonymous and no permission will get call.Implementation ideas
No response
The text was updated successfully, but these errors were encountered: