Skip to content

Commit d26ca21

Browse files
authored
fix: correct the JWK env var examples/docs (#2022)
Closes STOR-465
1 parent 574f355 commit d26ca21

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tools/tokenserver/loadtests/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@ Ex. `poetry run python locustfile.py`
7777
7878
```sh
7979
# Should be set to the "n" component of the JWK
80-
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_N
80+
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__N
8181
# Should be set to the "e" component of the JWK (this value should almost always be "AQAB")
82-
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_E
83-
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_KTY=RSA
84-
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_USE=sig
85-
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_ALG=RS256
82+
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__E
83+
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__KTY=RSA
84+
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__USE=sig
85+
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__ALG=RS256
8686
8787
# These two environment variables don't affect the load tests, but they need to be set:
88-
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_KID=""
89-
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_FXA_CREATED_AT=0
88+
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__KID=""
89+
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__FXA_CREATED_AT=0
9090
```
9191

9292
Note that, because these settings cache the JWK used to verify OAuth tokens, no verification requests will be made to FxA, so the value of `SYNC_TOKENSERVER__FXA_OAUTH_VERIFIER_URL` does not matter; however, Tokenserver expects it to be set, so setting it to something like `http://localhost` will suffice.

tools/tokenserver/loadtests/locustfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
TOKENSERVER_PATH = "/1.0/sync/1.5"
2525

2626
# This is a private key used to "forge" valid tokens. The associated public
27-
# key must be set using the SYNC_TOKENSERVER__FXA_PRIMARY_JWK_* environment
27+
# key must be set using the SYNC_TOKENSERVER__FXA_PRIMARY_JWK__* environment
2828
# variables on Tokenserver.
2929
VALID_OAUTH_PRIVATE_KEY = private_key = serialization.load_pem_private_key(
3030
open(os.environ["OAUTH_PEM_FILE"], "rb").read(),

0 commit comments

Comments
 (0)