Policy bindings and evaluation
This page covers policy bindings: where they apply, how authentik evaluates them, and which options affect the result. For the broader binding model, see Bindings in authentik. For step-by-step instructions, see Working with policies.
Where policies can be bound
In authentik, a stage is attached to a flow through a stage binding. When you attach a policy to a stage inside a flow, you are binding the policy to that stage binding, not directly to the stage definition itself. To learn more, see Bindings.
| Binding target | What it controls | How to configure it |
|---|---|---|
| Flow | Whether the user can start or continue using the flow | Bind a policy to a flow |
| Stage binding | Whether a specific stage runs in that flow | Bind a policy to a stage binding |
| Application | Whether the user can access the application | Bind a policy to an application |
| Source | Whether the source appears under Connected services | Bind a policy to a source |
In the same binding UI, you can also bind a user or group directly. These bindings are simple membership checks and are useful when you want a direct allow or deny rule without creating a separate policy object.
Validate prompt data with policies
Some stages also have their own policy hooks. The most common example is the Prompt stage, which supports Validation Policies.
Use prompt-stage validation policies when the decision depends on data the user has just entered, such as:
- password complexity
- password history
- matching two prompt fields
- validating an email domain during enrollment
Prompt-stage validation is often the right place for Password, Password Uniqueness, and Expression policies.
How authentik evaluates policies
When a flow, stage binding, application, or source has multiple bindings, authentik evaluates them in order.
Policy engine mode
Every policy binding target has a Policy engine mode:
Any: the target passes when any binding passes.All: the target passes only when every binding passes.
The default mode is Any.
Order
Bindings are evaluated in ascending order. This matters most when you inspect logs or when you are combining multiple policies that produce end-user messages.
Enabled bindings only
Disabled bindings are skipped entirely.
Direct user and group bindings
Bindings to users and groups are evaluated alongside policy bindings:
- A user binding passes when the current user matches.
- A group binding passes when the current user is a member of that group.
These are a simple way to mix static membership checks with policy-based logic.
No bindings means pass
If a target has no applicable bindings, authentik treats the result as passing.
Binding options
Bindings have a few important options beyond the target and order.
Dry-run authentik: 2026.11.0+
Enable Dry-run on a policy binding to evaluate the policy without using its result or messages in the target's final policy decision. This setting defaults to off. It belongs to the binding, so the same policy can be enforced on one target and evaluated in dry-run mode on another.
Dry-run also supports direct user and group bindings. These bindings record whether the user or group membership check matches, including Negate Result, without affecting access. Static checks are evaluated without caching, so each observation reflects current membership.
Dry-run bindings are excluded from both Any and All decisions. A passing dry-run binding cannot grant access, and a failing dry-run binding cannot deny access. If only dry-run bindings remain, the engine uses its configured result for no applicable bindings, which normally passes. Disabled bindings are still skipped entirely.
To configure dry-run in the Admin interface:
- Open the target's bindings and create or edit a binding.
- Leave Enabled on and turn on Dry-run.
- Save the binding. The Mode column shows Dry-run or Enforced.
- Click View dry-run results in the binding's actions to open its filtered Event Log.
You can also enable Dry-run when configuring bindings in the application creation wizard.
authentik records every dry-run evaluation as a policy execution event, even when the policy's Execution logging option is disabled. The event shows the observed pass or fail result, messages, raw output, and whether the result came from the policy cache. Dry-run results are not added to flow context and cannot be consumed by later expression policies.
Dry-run does not prevent side effects: expression policies can still make network requests, create events, or modify state. Negate Result, Timeout, and Failure Result still apply to policy evaluation; the resulting verdict remains excluded from the final decision.
Negate
Negate flips the pass or fail result of the binding. This is useful when you want to express "everyone except this group" or turn an allow-style policy into a deny-style rule without copying it.
Negation only changes the boolean result. Any messages returned by the policy are left unchanged.
Timeout
Timeout limits how long authentik waits for a policy execution before it is terminated. This is especially relevant for expression policies or other policy types that can call external systems. The default is 30 seconds.
Failure result
If a policy errors during execution, Failure Result decides whether authentik should treat that failure as pass or fail.
Use this carefully:
- Fail closed when the policy protects access to something sensitive.
- Fail open only when availability is more important than enforcement for that specific check.
Execution logging
Individual policies can enable Execution logging. When enabled, authentik logs every execution of that policy, not only failures and exceptions. This is helpful while debugging complex access rules.
Common patterns
Limit application access with a group or policy
Bind a group directly when the rule is static. Bind a policy when access depends on runtime context such as network, source, prompt data, or request history.
Run a stage only for some users
Bind a policy to the stage binding, not just to the flow. The stage will only run when that binding passes.
Validate user input
Attach validation policies directly to the prompt stage when the decision depends on the values the user just entered.