-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 path based authentication #10201
Comments
@vishalgoel1988 I think it was fixed for 1.6.0, hi Pedro @pedroigor can you check please ? |
Hi, Is there any expected release time for 1.6.0? |
|
I have keycloak-authorization-policy in my pom, but I have disabled policy-enforcer in application.properties. |
|
Hi, Acc. to https://quarkus.io/guides/security#matching-multiple-paths-longest-wins, support is already there and it should work, |
@vishalgoel1988 Yeah, you are right. How do you disable the |
|
https://quarkus.io/guides/security-keycloak-authorization#quarkus-keycloak-keycloak-policy-enforcer-config_configuration |
You can't really mix the policy enforcer and fine grained permissions. If you use the policy enforcer it will check every URL, so both the enforcer and the path based security will need to allow if (i.e. a deny from path based security will always deny, but an allow will still be checked by KC). We could maybe add the options for KC to be a named security policy, so it could be used with path based auth, i.e. instead of quarkus.http.auth.permission.authenticated.policy=authenticated you would have quarkus.http.auth.permission.authenticated.policy=keycloak-policy-enforcer I don't really know if this is a good idea though, as I thought the intention with the policy enforcer is that it controls everything. |
But I have policy enforcer off in my configs. Are you saying I should not even have authorization extension? |
#quarkus.keycloak.policy-enforcer.enable=true is not off. |
Oh, it is commented out. |
Yes exactly |
Do you have spaces after /health/* in your config file? I just copy/pasted for my test and it failed because it ends with a space and not a *. |
Trailing whitespace could otherwise cause confusion Fixes quarkusio#10201
Urghhh.... |
The linked pr should fix it |
Describe the bug
Hi,
It seems that path based authentication policy does not work. I have following in my application.properties.
#authn
quarkus.http.auth.permission.authenticated.paths=/*
quarkus.http.auth.permission.authenticated.policy=authenticated
#allow /health/* always for probeness
quarkus.http.auth.permission.health.paths=/health/*
quarkus.http.auth.permission.health.policy=permit
quarkus.http.auth.permission.health.methods=GET
#authz/policy enforcer
#quarkus.keycloak.policy-enforcer.enable=true
When I am browsing /health/ready, it is still giving me 401. I tried many diff-2 combinations, but nothing worked out.
Though, I use policy enforcer and DISABLE /health/* in policy enforcer, it works out.
Expected behavior
/health/* should return with 200 without policy-enforcer too.
Actual behavior
/health/* returns 401
To Reproduce
Steps to reproduce the behavior:
Configuration
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a
orver
:java -version
:mvnw --version
orgradlew --version
):Additional context
(Add any other context about the problem here.)
The text was updated successfully, but these errors were encountered: