Skip to content

Commit edf86e4

Browse files
committed
test: Add aud claim validation to load tests
1 parent fdd8843 commit edf86e4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

nix/tools/generate_targets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def generate_jwt(now: int, exp_inc: Optional[int], is_hs: bool) -> str:
3333
payload = {
3434
"sub": f"user_{random.getrandbits(32)}",
3535
"iat": now,
36+
"aud": "veryveryveryveryverylonglonglonglonglongaudience",
3637
"role": "postgrest_test_author",
3738
}
3839

nix/tools/loadtest.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ let
6363
# load test works across branches
6464
# TODO clean once PGRST_JWT_CACHE_MAX_ENTRIES merged and released
6565
export PGRST_JWT_CACHE_MAX_LIFETIME="86400"
66+
export PGRST_JWT_AUD="audience|([a-z]er[a-z])*(long)*aud..nce"
6667
6768
mkdir -p "$(dirname "$_arg_output")"
6869
abs_output="$(realpath "$_arg_output")"

0 commit comments

Comments
 (0)