-
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
quarkus.http.auth.proactive = false and @PermitAll still trigger custom auth #27316
Comments
@fediazgon #23775 should've resolved it, can you please create a reproducer ? |
Thanks for the prompt response @sberyozkin. I've created a reproducer here https://github.com/fediazgon/quarkus-reproducer-27316. I think the problem is not For example, for this resource (included in the reproducer):
The following call:
has the following trace:
I would not have expected |
I could use |
@fediazgon Apologies for a delay. @michalvavrik Hi Michal, would you be interested to check this issue ? |
@sberyozkin yes, this is interesting, I'll have a look. thank you |
@michalvavrik Thanks Michal |
This is super easy to fix, but I need to be sure there is an agreement it's a bug (for me this is expected behavior, but let see about you :-)). We call your Line 110 in 8787a2a
Why do we do it? We basically say If someone needs the identity, he can subscribe to the identity we put into the routing context, so we need to create the
then when you call your reproducer
you get just
you would still get
as then we have to subscribe to identity in order to determine your roles. Needless to say I can't guarantee some other extension won't call My point is that the identity is correctly requested (subscribed) only when we really need it, but we need |
Hi @michalvavrik Thanks for the analysis and sorry for missing your ping. IMHO though it is not providing a resolution as such, |
@sberyozkin IMHO it goes against reactive approach (if you are doing logic when |
Describe the bug
I have a custom
HttpAuthenticationMechanism
that is still triggered even after adding@PermitAll
to an endpoint andquarkus.http.auth.proactive = false
toapplication.properties
.Expected behavior
HttpAuthenticationMechanism#authenticate
should not be called.Actual behavior
HttpAuthenticationMechanism#authenticate
is called.How to Reproduce?
This is my custom
HttpAuthenticationMechanism
:The custom
IdentityProvider
:This is the endpoint:
Output of
uname -a
orver
Darwin C02Z63TTLVDR 21.6.0 Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:25 PDT 2022; root:xnu-8020.140.41~1/RELEASE_X86_64 x86_64
Output of
java -version
java version "17.0.3" 2022-04-19 LTS Java(TM) SE Runtime Environment (build 17.0.3+8-LTS-111) Java HotSpot(TM) 64-Bit Server VM (build 17.0.3+8-LTS-111, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.11.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
Additional information
No response
The text was updated successfully, but these errors were encountered: