-
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
Make it possible to switch off Authentication on the dev environment easily #10330
Comments
Is this |
Yes, shipped with the main code, but default false means
Mocked authentication is disabled by default, so when the property setting is missing,
Authentication will be on by default.
|
@MarcusBiel thanks. |
For HTTP you should be able to include a HttpAuthenticationMechanism (with a CDI scope) in src/test/java and this will be used by the tests to authenticate. If you just make this return a mock user then you can get the same result. |
We could also add some kind of simple way to do this automatically, like an @testuser annotation that controls the user the test runs under. |
@stuartwdouglas and may be @testroles... |
That would just be part of the user annotation |
#10487 fixes this issue (thanks to Stuart). |
In Micronaut, using the @requires annotation, you can define that a mocked security filter is only active when a disable flag
is set to true - this way Authentication can be active on PROD by default, but you can deactivate it on DEV to simplify testing:
--
Would love to see something similar in Quarkus.
The text was updated successfully, but these errors were encountered: