Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add id_token mutator cache config #1820

Merged
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
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
Loading