Skip to content

Quarkus path based authentication #10201

@vishalgoel1988

Description

@vishalgoel1988

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:

  1. Create quarkus project with quarkus-keycloak-oidc plugin.
  2. Connect project to keycloak.
  3. Try /health with below configs.

Configuration

# Add your application.properties here, if applicable.
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

Screenshots
(If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

  • Output of uname -a or ver:
  • Output of java -version:
  • GraalVM version (if different from Java):
  • Quarkus version or git rev:
  • Build tool (ie. output of mvnw --version or gradlew --version):

Additional context
(Add any other context about the problem here.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions