> For the complete documentation index, see [llms.txt](https://docs.abbey.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abbey.io/reference/access-policies/policy-bundles.md).

# Policy Bundles

A policy bundle is a collection of Rego code placed within a location accessible by the Abbey Github app. Rego code is read from this location and then evaluated in our policy evaluator during the access request flow. If the policy evaluation step fails, then access will not be granted to a given resource.

In this example we'll be looking at the included policy bundle in the [Quickstart Policy Bundle](https://github.com/abbeylabs/abbey-starter-kit-quickstart/tree/main/policies/common).

## .manifest

Take a look at the `.manifest` file.&#x20;

```
{"roots": ["common"]}
```

This specifies that the root package of the bundle is the `common` package.

## common.rego

```rego
package common

import data.abbey.functions

allow[msg] {
    functions.expire_after("5m")
    msg := "granting access for 5 minutes"
}
```

`common.rego` contains the actual policy code that is being executed. In this case, we're using an Abbey provided function called `expire_after` (defined [here](https://github.com/abbeylabs/policy-library/blob/main/src/abbey/functions/expire_after.rego)) to say that this policy will revoke access after `5 minutes`. Go ahead and change this to whatever value you like. If you want an Access Request to expire after `60 minutes`, you can change the value in `expire_after` to `"60m"`.

## Using the Policy Bundle in a Grant Kit

You can refer to the Policy Bundle in your Grant Kit like so:

<pre class="language-diff"><code class="lang-diff">resource "abbey_grant_kit" "grant_kit_example" {
  ...

<strong>+  policies = [
</strong>+    { bundle = "github://replace-me-with-organization/replace-me-with-repo/policies" } # CHANGEME
+  ]
}
</code></pre>

Make sure `bundle` points to a URI which points to the top of a bundle directory.
