-
Notifications
You must be signed in to change notification settings - Fork 23
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
Seems quarkus.security.jaxrs.deny-unannotated-endpoints=true is not working #160
Comments
Seems there is an undocumented |
Sorry about the late answer. Can you give me an example of your |
The following is what i'm using right now. quarkus.http.auth.form.enabled=true
quarkus.http.auth.permission.dashboard.paths=admin/*
quarkus.http.auth.permission.dashboard.policy=dashboard-policy
quarkus.http.auth.policy.dashboard-policy.roles-allowed=ADMIN,ADMIN_EMPLOYEE,SHOP,SHOP_EMPLOYEE
quarkus.http.auth.proactive=false
quarkus.security.jaxrs.deny-unannotated-endpoints=true |
OK thanks. Lemme try that. |
After some quick investigation i found the following: In order to reproduce it you have to start the project without If you start the project with I see that @Override
public Uni<ChallengeData> getChallenge(RoutingContext context) {
if (config.getLoginPage() != null) {
// we need to store the URL
storeInitialLocation(context);
return getRedirect(context, config.getLoginPage());
} else {
return super.getChallenge(context);
}
} |
Mmmm, I actually need more info. How do you serve your |
I serve the login page with the following class. @Path("/p/auth")
//@PermitAll
public class AuthResource extends Controller {
@Path("login")
@LoginPage
@Blocking
public TemplateInstance loginForm() {
}
} There are two errors:
Let me know if you can reproduce it, if not i will try to create a reproducer project. |
I can reproduce the first issue. As to the second issue, this is because we're redirecting to your Now, I could do several things to mitigate this:
Let me think a bit about this. |
I've fixed the first issue. For the second, I will now log the following error and return a 401:
If there are no other issues, I'll close this issue :) |
It throws the following exception
Also how we can redirect to login page if the user is not authenticated? This works great but it does not work when used with quarkus.http.auth properties. The quarkus.http.auth properties are used in pre-matching so a UnauthorizedException is never thrown.
The text was updated successfully, but these errors were encountered: