# Reference for policy format

**URL:** <https://discuss.hashicorp.com/t/reference-for-policy-format/38980>\
**Category:** Vault\
**Created:** [May 2, 2022, 6:42pm UTC](https://discuss.hashicorp.com/t/reference-for-policy-format/38980 "2022-05-02T18:42:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ftriboix](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/ftriboix/32/27430_2.png) [@ftriboix](https://discuss.hashicorp.com/u/ftriboix)\
**Post date:** [May 2, 2022, 6:42pm UTC](https://discuss.hashicorp.com/t/reference-for-policy-format/38980/1 "2022-05-02T18:42:17Z")

</div>

Hello,

I have been browsing the Vault documentation in search of a reference document for the format of policies, without success. Especially, I am looking for a list of capabilities, and whether a wildcard can be used to say “all capabilities”.

Many thanks for your help!

---

<div class="post-metadata">

**Author:** ![maxb](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/maxb/32/26655_2.png) [@maxb](https://discuss.hashicorp.com/u/maxb)\
**Post date:** [May 2, 2022, 7:00pm UTC](https://discuss.hashicorp.com/t/reference-for-policy-format/38980/2 "2022-05-02T19:00:23Z")

</div>

Strangely, there isn’t a reference document for this important syntax.

[Policies | Vault by HashiCorp](https://www.vaultproject.io/docs/concepts/policies) is the closest, but it’s more of a guide than a reference.

It does include the complete list of capabilities, in this section: [Policies | Vault by HashiCorp](https://www.vaultproject.io/docs/concepts/policies#capabilities)

There is no wildcard. All capabilities would be written as `["read", "list", "create", "update", "delete", "sudo"]` - do not include `sudo` unless you genuinely want to authorize Vault administrative actions.

Extra parts of the policy syntax that only apply to Vault Enterprise are documented at [Vault Enterprise Control Groups | Vault by HashiCorp](https://www.vaultproject.io/docs/enterprise/control-groups).

---

<div class="post-metadata">

**Author:** ![ftriboix](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/ftriboix/32/27430_2.png) [@ftriboix](https://discuss.hashicorp.com/u/ftriboix)\
**Post date:** [May 3, 2022, 5:43am UTC](https://discuss.hashicorp.com/t/reference-for-policy-format/38980/3 "2022-05-03T05:43:48Z")

</div>

Thanks @maxb . I did see this list of capabilities, but the documentation does not say that it is exhaustive…

I believe I can use wildcards in paths, is that correct? Will this match any path:

```nohighlight
path "*" {
  ...
}

```

? Thanks!

---

<div class="post-metadata">

**Author:** ![maxb](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/maxb/32/26655_2.png) [@maxb](https://discuss.hashicorp.com/u/maxb)\
**Post date:** [May 3, 2022, 7:14am UTC](https://discuss.hashicorp.com/t/reference-for-policy-format/38980/4 "2022-05-03T07:14:06Z")

</div>

I can’t find the word “exhaustive” in that page? The list there was complete up to Vault 1.8 …

A new `"patch"` capability was added in Vault 1.9 to control the new support for using HTTP PATCH on KVs, and it seems that hasn’t been added to the documentation.

Wildcards **are** covered in the previously linked document.

```auto
path "*" { ... }

```

works as you might expect, but beware that with policy like:

```auto
path "*" { ... all the permissions ... }

path "foobar" { ... just read ... }

```

the more specific block takes precedence, and writes to `foobar` will be denied.

---

<div class="post-metadata">

**Author:** ![ftriboix](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/ftriboix/32/27430_2.png) [@ftriboix](https://discuss.hashicorp.com/u/ftriboix)\
**Post date:** [May 3, 2022, 7:15am UTC](https://discuss.hashicorp.com/t/reference-for-policy-format/38980/5 "2022-05-03T07:15:56Z")

</div>

Great, thanks a lot @maxb !

---

<div class="post-metadata">

**Author:** ![aram](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@aram](https://discuss.hashicorp.com/u/aram)\
**Post date:** [May 3, 2022, 8:04am UTC](https://discuss.hashicorp.com/t/reference-for-policy-format/38980/6 "2022-05-03T08:04:27Z")

</div>

@jeffsanicola has put together a very nice vault policy guide you can find on github

> **[GitHub - jeffsanicola/vault-policy-guide: A brief guide to help illustrate...](https://github.com/jeffsanicola/vault-policy-guide)**
>
> A brief guide to help illustrate some of the more nuanced aspects of HashiCorp Vault's policies. - GitHub - jeffsanicola/vault-policy-guide: A brief guide to help illustrate some of the more nu...

---

<div class="post-metadata">

**Author:** ![ftriboix](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/ftriboix/32/27430_2.png) [@ftriboix](https://discuss.hashicorp.com/u/ftriboix)\
**Post date:** [May 3, 2022, 9:23am UTC](https://discuss.hashicorp.com/t/reference-for-policy-format/38980/7 "2022-05-03T09:23:54Z")

</div>

That’s great! Thanks a lot @aram !
