Skip to content

Commit

Permalink
docs: clarify jwtMetrics opt-out logic (#3066)
Browse files Browse the repository at this point in the history
Follow up on #3055

Signed-off-by: Alexander Yastrebov <[email protected]>
  • Loading branch information
AlexanderYastrebov authored May 7, 2024
1 parent ac9e852 commit f15ffba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/reference/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ jwtValidation("https://login.microsoftonline.com/{tenantId}/v2.0")

> This filter is experimental and may change in the future, please see tests for example usage.
The filter parses (but does not validate) JWT token from `Authorization` request header on response path if status is not 4xx
The filter parses (but does not validate) JWT token from `Authorization` request header on response path
and increments the following counters:

* `missing-token`: request does not have `Authorization` header
Expand All @@ -1577,6 +1577,8 @@ jwtMetrics.custom.GET.example_org.200.invalid-token

and therefore requires approximately `count(HTTP methods) * count(Hosts) * count(Statuses) * 8` bytes of additional memory.

The filter does nothing if response status is 4xx or route is opt-out via annotation or state bag value.

The filter requires single string argument that is parsed as YAML.
For convenience use [flow style format](https://yaml.org/spec/1.2.2/#chapter-7-flow-style-productions).

Expand Down

0 comments on commit f15ffba

Please sign in to comment.