You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* implement EdDSA JWTs
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|`FMSG_DATA_DIR`|*(required)*| Path where message data files are stored, e.g. `/var/lib/fmsgd/`|
12
-
|`FMSG_API_JWT_SECRET`|*(required)*| HMAC secret used to validate JWT tokens. Prefix with `base64:` to supply a base64-encoded key (e.g. `base64:c2VjcmV0`); otherwise the raw string is used. |
12
+
|`FMSG_JWT_JWKS_URL`|*(prod)*| URL of the IdP's JWKS endpoint (e.g. `https://idp.fmsg.io/.well-known/jwks.json`). When set, the API verifies EdDSA tokens issued by the IdP. Public keys are fetched and cached, refreshed and looked up by the token's `kid` header. |
13
+
|`FMSG_JWT_ISSUER`|*(prod, required with JWKS)*| Expected `iss` claim value (e.g. `https://idp.fmsg.io`). Tokens with a different issuer are rejected. |
14
+
|`FMSG_JWT_AUDIENCE`|*(optional)*| When set, tokens must include this value in their `aud` claim. |
15
+
|`FMSG_API_JWT_SECRET`|*(dev)*| HMAC secret for HS256 token verification. Used only in dev mode (when `FMSG_JWT_JWKS_URL` is unset). Prefix with `base64:` to supply a base64-encoded key. Either this or `FMSG_JWT_JWKS_URL` must be set. |
13
16
|`FMSG_TLS_CERT`|*(optional)*| Path to the TLS certificate file (e.g. `/etc/letsencrypt/live/example.com/fullchain.pem`). When set with `FMSG_TLS_KEY`, enables HTTPS on port 443. |
14
17
|`FMSG_TLS_KEY`|*(optional)*| Path to the TLS private key file (e.g. `/etc/letsencrypt/live/example.com/privkey.pem`). Must be set together with `FMSG_TLS_CERT`. |
15
18
|`FMSG_API_PORT`|`8000`| TCP port for plain HTTP mode (ignored when TLS is enabled) |
0 commit comments