-
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
Mixing auth-mechanizms fails TestSecurity
tests
#38298
Comments
/cc @sberyozkin (security) |
@01epa Thanks, I've just updated the issue name a bit to make the problem clearer |
TestSecurity
tests
@01epa One more edit to make it even more clearer. Looks like fixing it will require adding a new |
The The easiest thing that we can do is to allow to explicitly select test I actually run into same situation and here quarkus/integration-tests/oidc-code-flow/src/main/resources/application.properties Line 209 in 0b209bd
TestSecurity paths as we have no exclusions pattern on HTTP Perms (IMO not necessary).
I think |
Describe the bug
In case if security is mixed (basic+bearer) accordingly to quarkus doc I have to specify an authentication mechanizm
After that tests with
@TestSecurity
failed.Looks like the problem is in the transport method -
io.quarkus.test.security.TestHttpAuthenticationMechanism#getCredentialTransport
since it does return null for tests and as a resultfindBestCandidateMechanism
here returns baisic auth mechanizm instead of nullExpected behavior
Test passed
Actual behavior
Test failed
How to Reproduce?
To reproduce the issue just replace lines in application.properties file
from
to
and run test TestSecurityTestCase
If commented out line
then everything will work.
The same problem is with bearer mechanizm.
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
latest
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: