fix: correct the JWK env var examples/docs (#2022)

Closes STOR-465
This commit is contained in:
Philip Jenvey 2026-01-26 12:32:34 -08:00 committed by GitHub
parent 574f3552d6
commit d26ca2146e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 8 deletions

View File

@ -77,16 +77,16 @@ Ex. `poetry run python locustfile.py`
```sh
# Should be set to the "n" component of the JWK
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_N
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__N
# Should be set to the "e" component of the JWK (this value should almost always be "AQAB")
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_E
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_KTY=RSA
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_USE=sig
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_ALG=RS256
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__E
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__KTY=RSA
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__USE=sig
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__ALG=RS256
# These two environment variables don't affect the load tests, but they need to be set:
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_KID=""
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK_FXA_CREATED_AT=0
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__KID=""
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK__FXA_CREATED_AT=0
```
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.

View File

@ -24,7 +24,7 @@ ONE_YEAR = 60 * 60 * 24 * 365
TOKENSERVER_PATH = "/1.0/sync/1.5"
# This is a private key used to "forge" valid tokens. The associated public
# key must be set using the SYNC_TOKENSERVER__FXA_PRIMARY_JWK_* environment
# key must be set using the SYNC_TOKENSERVER__FXA_PRIMARY_JWK__* environment
# variables on Tokenserver.
VALID_OAUTH_PRIVATE_KEY = private_key = serialization.load_pem_private_key(
open(os.environ["OAUTH_PEM_FILE"], "rb").read(),