Skip to content

Commit ed4cd49

Browse files
authoredJan 2, 2025
feat: add id_token mutator cache config (#1820)
1 parent f7cdc2c commit ed4cd49

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎docs/oathkeeper/pipeline/mutator.md

+6
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ The ID Token Claims are as follows:
147147
(minute), h (hour).
148148
- `claims` (string, optional) - Allows you to customize the ID Token claims and support Go Templates. For more information, check
149149
section [Claims](#id_token-claims)
150+
- `cache` (object, optional) - Enables caching of computed tokens
151+
- `enabled` (bool, optional) - Enable the cache, will use exp time of ID token to determine when to evict from cache. Defaults
152+
to true.
153+
- `max_cost` (int) - Max cost to cache. Defaults to 33554432.
150154

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

166172
```yaml

0 commit comments

Comments
 (0)