Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 8 additions & 22 deletions content/cloudflare-one/identity/users/validating-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,19 @@ You can use the JWT created by Cloudflare Access to validate requests on your or

## Manual verification

{{<Aside>}}

<b>Before you start</b>

Install [`lokey`](https://github.com/jpf/lokey) and [`jq`](https://stedolan.github.io/jq/download/).

{{</Aside>}}

1. Run this command:

```bash
curl -s https://<your team domain>/cdn-cgi/access/certs | jq .keys[0] | lokey to pem -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA01SvMv4TgFIECQgzHaRL DGVaKhRQHjgdiSOpbqhHQMdcNtBIM0HAQbrs7YS6sQCCdZC5wCvlq3xgqdU5J6k YI5OCSsIWXKkobAl6PbXHdN0bJximeiHGa3O0hMREP6RKBoI6ayNmZ3WlVGWY 6ie47KGqN69l7fPKyZvszb4GdpxE0r8gllZZwIuPjzlghXRlrkaP48ucQwo+tq PSSdDdW57TCFmy+G547W5iWZWJIeNkfVu9t6FktvCwSZ1ekum3X7IQcd0O0DWSR Aj9tzNDPkzOeSFxmQkKpWs8Qw7ZBIfLOsO3DCH6VPNhS2cqhw1AAMunh8alDKQU aQIDAQAB -----END PUBLIC KEY-----
```

If an error occurs while running `lokey`, install the [Python six](https://pypi.python.org/pypi/six) library, and try again:

```sh
$ pip install six==1.10.0
```

1. Go to [jwt.io](https://jwt.io/).

1. Select the RS256 algorithm.

1. Paste the JWT into the field on the left.
1. Paste the JWT into the **Encoded** field on the left. Get the `kid` value of the header box on the decoded column.

1. Get your public key:

1. Go to `https://<your team domain>/cdn-cgi/access/certs`.
2. Under `public_certs`, locate the entry with the `kid` value you found in Step #3.
3. Copy the `cert` value.

1. Enter the public key in the **Public Key** field.
1. In the **Verify Signature** box, paste the `cert` value into the **Public Key** field.

1. Ensure that the signature says **verified**.

Expand Down