> For the complete documentation index, see [llms.txt](https://docs.balkan.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.balkan.id/lifecycle-management/policies.md).

# Policies

Configure policies to automate approvals, denials, and reviewer routing for access workflows.

## Policies

Policies let administrators automate access decisions in BalkanID. You can use them to approve, deny, or route items based on defined conditions.

Policies help reduce manual review work. They also keep decisions consistent and auditable.

### What a policy does

A policy is made up of ordered clauses. Each clause contains:

* One or more conditions
* One action to run when those conditions match

Policies are evaluated from top to bottom. The first matching clause wins.

Common uses include:

* Auto-approving low-risk requests
* Auto-denying restricted access
* Routing requests to a specific reviewer
* Setting reviewer precedence on reviews

### Open the Policies page

1. Sign in to BalkanID at `<yourdomain>.balkanid.app`.
2. Go to **Configure → Global Settings → Policies**.

From this page, you can:

* View existing policies
* Check policy type and status
* Create a new policy
* Edit or deactivate a policy

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2Fu10rwjmgjjD8z8tBy4Qh%2Fimage.png?alt=media&#x26;token=cfedb03f-94a9-4a3a-804b-bebdd6e12816" alt=""><figcaption></figcaption></figure></div>

### Create a policy

1. Click **Create Policy**.
2. Select the policy type:
   * **Campaign**
   * **Purpose**
   * **Request**
3. Enter the policy details:
   * **Name**
   * **Description**
   * **Status**
   * **Priority** for request policies

Use a clear name that reflects the outcome.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FYaLZZg2tP0rfxNJUj8I2%2Fpolicy_editor_page.png?alt=media&#x26;token=b587d422-5a4b-4711-ae2c-0a46a8a4cca1" alt=""><figcaption></figcaption></figure></div>

### Add clauses and rules

Each policy contains one or more clauses. A clause defines **when** the policy applies and **what** happens next.

In the policy editor, you can:

* Create a new rule inline
* Reuse an existing saved rule

Rules are built from attributes such as:

* User attributes like department, team, title, or employment type
* Application or entitlement attributes
* Campaign, purpose or request context
* Compliance violation context for accesses being reviewed.
* Whether BalkanID granted the access itself, and how — available on campaign policies

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FH0ijjDJa9nDUSBHbdCHG%2Fimage.png?alt=media&#x26;token=6a2bb721-8867-4ebf-8642-6cd916bb81b1" alt=""><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FJkxLHf4feLZb45gsIDYc%2Fimage.png?alt=media&#x26;token=669e877c-3771-4452-be2c-0cb84c5398ec" alt=""><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2F8YV3U6TSo9HCmTmYA1nZ%2Fpolicy-balkanid-created-access.png?alt=media" alt="The Policy Definition dialog for a campaign policy. In the first clause, the Context Kind list is open and BalkanID-Created Access is highlighted alongside Active Compliance Violation and Access Change Status."><figcaption><p>Selecting the BalkanID-Created Access attribute in a campaign policy rule</p></figcaption></figure></div>

{% hint style="warning" %}
Clause order matters. Put the most specific clauses first. Put broader fallback clauses later.
{% endhint %}

### Available actions

#### Auto-approve

Use this action when the matched request is low risk and does not need manual review.

* The system approves the item automatically
* No reviewer action is required
* The action appears in audit history

A common campaign use is to auto-approve access BalkanID granted itself. That access already went through an approval when it was requested, so reviewers can spend their time on access that arrived some other way. Build the rule on the **BalkanID-Created Access** attribute, and narrow it further by access type if you only want to clear permanent grants.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2Ff7Xk0RYnP2rcunDdQLZx%2FScreenshot%202026-01-31%20at%2010.55.50%E2%80%AFPM.png?alt=media&#x26;token=80296b7f-aeca-4e43-9e2b-088e28343f18" alt=""><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FiDdkGOtrDR6m3Gb4Ywu6%2Fimage.png?alt=media&#x26;token=70907a34-5894-4cfa-9089-a6a9d9416c71" alt=""><figcaption></figcaption></figure></div>

#### Auto-deny

Use this action when the matched request should never proceed.

* The system denies the item automatically
* Unnecessary review cycles are avoided
* The decision remains fully auditable

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FHTXNFB3UCOiS9Y1JZlHL%2Fimage.png?alt=media&#x26;token=a76b08f3-79ef-4eee-8dc1-b606058e743b" alt=""><figcaption></figcaption></figure></div>

#### Auto-assign to reviewer

Use this action when ownership should be routed to a known reviewer or approval group.

* The item is assigned automatically
* Routing stays consistent
* Escalation paths stay predictable

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FajZlHxdRj0NOm9cWQHdw%2Fimage.png?alt=media&#x26;token=314e7823-fe49-4a93-9e4f-56aef3261863" alt=""><figcaption></figcaption></figure></div>

#### Assign reviewer precedence

{% hint style="info" %}
This action is only applicable for campaign based policies.
{% endhint %}

Use this action to customize routing for specific reviews within a campaign—such as applying different assignment priorities or changing the number of required reviewers.

* The item is automatically routed and assigned without manual effort.
* Review workflows remain stable and uniform throughout the process.
* Escalation paths stay clear, dependable, and easy to track.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FH3lKqe0n5IWfzjwLQWyb%2FScreenshot%202026-06-18%20at%204.25.17%E2%80%AFPM.png?alt=media&#x26;token=f2035181-dabb-4d22-abd0-002c5dc5f021" alt=""><figcaption></figcaption></figure></div>

### How policy evaluation works

When an item enters a policy-controlled workflow:

1. BalkanID evaluates the attached policy.
2. Clauses are checked in order.
3. The first matching clause runs its action.
4. If no clause matches, the item follows the default manual workflow.

Policies can be attached to:

* Access request workflows
* Campaign Access Review flows
* Purpose-based access flows

### Audit and visibility

Policy-driven decisions are marked as system actions. BalkanID records the policy and rule that triggered the outcome.

You can review this information in audit logs and activity history. This makes policy behavior easier to validate and troubleshoot.

### Best practices

* Keep policy names specific and outcome-based
* Put narrow rules before broad rules
* Use auto-approve only for low-risk access
* Use auto-deny for clearly prohibited access
* Use auto-assignment when ownership is well defined
* Use assign-precedence for high-risk assets (like sensitive groups) to enforce strict, multi-level reviews. Keep standard items on the default path to minimize workflow complexity.
* Start with inactive policies if you want to validate setup before rollout

For related workflows, see [Access requests](https://docs.balkan.id/lifecycle-management/access-requests.md), Campaigns and [Purposes](https://docs.balkan.id/lifecycle-management/jitpbac/purposes.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.balkan.id/lifecycle-management/policies.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
