Quarkus Feature Flags - Security
The extension provides integration with Quarkus Security.
It provides the SecurityIdentityFlagEvaluator that can be used to compute the current value of a feature flag based on the current SecurityIdentity.
If you want to use the Security integration in your application you’ll need to add the io.quarkiverse.flags:quarkus-flags-security extension to your build file first.
For instance, with Maven, add the following dependency to your POM file:
<dependency>
<groupId>io.quarkiverse.flags</groupId>
<artifactId>quarkus-flags-security</artifactId>
<version>{project-version}</version>
</dependency>
A typical feature flag configuration looks like:
quarkus.flags.runtime.delta.value=true (1)
quarkus.flags.runtime.delta.meta.evaluator=quarkus.security.identity (2)
quarkus.flags.runtime.delta.meta.authenticated=true (3)
quarkus.flags.runtime.delta.meta.roles-allowed=foo,bar (4)
| 1 | Flag delta is enabled by default. |
| 2 | The SecurityIdentityFlagEvaluator is used to compute the current value of the feature flag. |
| 3 | A user must be authenticated. |
| 4 | A user must have one of the defined roles. |