# Using Claims in PPL

**URL:** https://discuss.pomerium.com/t/using-claims-in-ppl/24
**Category:** Support
**Tags:** idp
**Created:** [October 20, 2021, 4:51pm UTC](https://discuss.pomerium.com/t/using-claims-in-ppl/24 "2021-10-20T16:51:51Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![alex](https://yyz1.discourse-cdn.com/flex031/user_avatar/discuss.pomerium.com/alex/32/9_2.png) [@alex](https://discuss.pomerium.com/u/alex)
#### Post date: [October 20, 2021, 4:51pm UTC](https://discuss.pomerium.com/t/using-claims-in-ppl/24/1 "2021-10-20T16:51:51Z")

</div>

> [@](#):
>
> [**View in #support on Slack**](https://pomerium-io.slack.com/archives/CK92MUAES/p1634723921068100)
> 
> ![Ronnie_Vink](https://canada1.discourse-cdn.com/flex031/uploads/pomerium/original/1X/97ed512de5d076cf61c8b756f33b3506a814798a.jpeg) **@Ronnie\_Vink:** Hi,  
> Im currently using Pomerium in Docker:  
> `pomerium: 0.15.4-1634234692+20e21964`  
> `envoy: 1.19.1+645d37bf7aa1e2eebfb217fc1b8ba2791463325513d508691599cc23da89bcdc`
> 
> Quick question regarding PPL and the use of IDP claims for route policies:
> 
> ```auto
> routes:
> - from: <https://verify.localhost>
> to: <http://verify>
> policy:
> - allow:
> or:
> # - email:
> # is: john.doe@acme.local
> - claim/email:
> has: john.doe@acme.local
> - claim/family_name:
> is: Doe           
> pass_identity_headers: true
> 
> ```
> 
> The above example results in a DENY, while the family\_name claim is Doe and the email claim is john.doe@acme.local. I double checked the user claims in [https://authenticate.localhost/.pomerium](https://authenticate.localhost/.pomerium)
> 
> The policy results in ALLOW when only using the email criteria type. When I only use claim/email instead it results in DENY again.
> 
> Is there something I’m missing regarding the use of IDP claims in PPL?

---

<div class="post-metadata">

### Author: ![alex](https://yyz1.discourse-cdn.com/flex031/user_avatar/discuss.pomerium.com/alex/32/9_2.png) [@alex](https://discuss.pomerium.com/u/alex)
#### Post date: [October 20, 2021, 4:52pm UTC](https://discuss.pomerium.com/t/using-claims-in-ppl/24/2 "2021-10-20T16:52:33Z")

</div>

Additional info from the thread:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/pomerium/original/1X/d9773a7d98f339a7e01fdbaaae404c65d7691731.png)

[Alex](https://app.slack.com/team/U027D9090FL) [18 minutes ago](https://pomerium-io.slack.com/archives/CK92MUAES/p1634747660070300?thread_ts=1634723921.068100&cid=CK92MUAES)

Hi [@Ronnie Vink](https://pomerium-io.slack.com/team/U01DVGRMWC9) . Have you tried using `is` instead of `has` for `claim/email` ?And as an aside, I’m curious why you want to use `claim/email` over just `email` ; do you have a situation where they’d be different?

[Ronnie Vink](https://app.slack.com/team/U01DVGRMWC9) [15 minutes ago](https://pomerium-io.slack.com/archives/CK92MUAES/p1634747809070700?thread_ts=1634723921.068100&cid=CK92MUAES)

yup used the `is` as well. it’s not about `claim/email` specifically. it’s about using idp claims like the `claim/family_name` example (or `claim/groups` ) in policies which seems to be not working at all. (edited)

[Ronnie Vink](https://app.slack.com/team/U01DVGRMWC9) [14 minutes ago](https://pomerium-io.slack.com/archives/CK92MUAES/p1634747875071000?thread_ts=1634723921.068100&cid=CK92MUAES)

FYI, I’m using Keycloak as OIDC provider. I added the groups claim in a separate scope, so any policies based on groups could be done with `claim/groups`

---

<div class="post-metadata">

### Author: ![calebdoxsey](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@calebdoxsey](https://discuss.pomerium.com/u/calebdoxsey)
#### Post date: [October 20, 2021, 6:47pm UTC](https://discuss.pomerium.com/t/using-claims-in-ppl/24/3 "2021-10-20T18:47:27Z")

</div>

Currently the `claim` criterion does not support the string matchers. It is rather used directly and only supports exact matches:

```auto
allow:
  and:
    - claim/family_name: Smith

```

---

<div class="post-metadata">

### Author: ![RonnieV](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@RonnieV](https://discuss.pomerium.com/u/RonnieV)
#### Post date: [October 20, 2021, 7:41pm UTC](https://discuss.pomerium.com/t/using-claims-in-ppl/24/4 "2021-10-20T19:41:36Z")

</div>

Works like a charm. Thanks so much! I can confirm below works:

```auto
routes:
  - from: https://verify.localhost
    to: http://verify
    pass_identity_headers: true
    policy:
      - allow:
          and:
            # - email: 
            # is: john.doe@acme.local
            - claim/family_name: Doe
            - claim/groups: DevOps

```

---

<div class="post-metadata">

### Author: ![RonnieV](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@RonnieV](https://discuss.pomerium.com/u/RonnieV)
#### Post date: [October 20, 2021, 7:46pm UTC](https://discuss.pomerium.com/t/using-claims-in-ppl/24/5 "2021-10-20T19:46:18Z")

</div>

Claim example on [https://www.pomerium.com/enterprise/reference/manage.html#pomerium-policy-language](https://www.pomerium.com/enterprise/reference/manage.html#pomerium-policy-language) should be updated accordingly:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/pomerium/original/1X/1958cfe13c6b84bb306d9a9258d68e8034b0bf9e.png)

---

<div class="post-metadata">

### Author: ![alex](https://yyz1.discourse-cdn.com/flex031/user_avatar/discuss.pomerium.com/alex/32/9_2.png) [@alex](https://discuss.pomerium.com/u/alex)
#### Post date: [October 20, 2021, 9:08pm UTC](https://discuss.pomerium.com/t/using-claims-in-ppl/24/6 "2021-10-20T21:08:53Z")

</div>

Thanks, I’ve [staged a fix](https://github.com/pomerium/pomerium/pull/2689) for the docs.
