Skip to content

Commit

Permalink
feat: add id_token mutator cache config
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Wobrock committed Aug 9, 2024
1 parent f22a26e commit 32933d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/oathkeeper/pipeline/mutator.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ The ID Token Claims are as follows:
(minute), h (hour).
- `claims` (string, optional) - Allows you to customize the ID Token claims and support Go Templates. For more information, check
section [Claims](#id_token-claims)
- `cache` (object, optional) - Enables caching of computed tokens
- `enabled` (bool, optional) - Enable the cache, will use exp time of ID token to determine when to evict from cache. Defaults to
true.
- `max_cost` (int) - Max cost to cache. Defaults to 33554432.

```yaml
# Global configuration file oathkeeper.yml
Expand All @@ -161,6 +165,8 @@ mutators:
# jwks_url: file://../from/this/relative/location.json
ttl: 60s
claims: '{"aud": ["https://my-backend-service/some/endpoint"],"def": "{{ print .Extra.some.arbitrary.data }}"}'
cache:
max_cost: 10000
```

```yaml
Expand Down

0 comments on commit 32933d8

Please sign in to comment.