I’m using Quarkus 2.15.3.Final
and I ran into an issue.
I have an Auth Library where I have the following dependencies:
implementation 'io.quarkus:quarkus-resteasy-jackson'
implementation 'io.quarkus:quarkus-smallrye-jwt'
implementation 'io.quarkus:quarkus-smallrye-openapi'
My other Quarkus REST API services are using this auth library as a Gradle dependency.
My goal is to dynamically disable endpoint security checks using Docker Compose in those services.
In my application.properties
file of the auth library I have the following default settings
quarkus.http.auth.permission.authenticated.enabled=true
quarkus.http.auth.permission.authenticated.paths=/*
quarkus.http.auth.permission.authenticated.policy=authenticated
In my Docker Compose file of the service using the auth library as a dependency, I have the following setup where I inject env vars to disable security (excerpt)
access:
image: access-service:1.0.0-SNAPSHOT
ports:
- "8097:8080"
depends_on:
- infinispan
networks:
- shared-net
environment:
QUARKUS_HTTP_AUTH_PERMISSION_AUTHENTICATED_ENABLED: false
The problem is that security is still enabled. It is only disabled if I disable it through application properties in the library itself and recompile / rebuild the project.
1
The property is a build time property thus you can’t change it at runtime
2