Skip to content

Commit 9d913fe

Browse files
committed
Minor updates
- ephemeral key warning - snippet showing how to override the authorization endpoint URL when the browser-facing endpoint is on a different host - tokenResponseMapping tip
1 parent b6e08be commit 9d913fe

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

docs/toolhive/guides-vmcp/authentication.mdx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,31 @@ spec:
375375
oidcConfig: { ... }
376376
```
377377

378+
:::warning[Signing keys and HMAC secrets]
379+
380+
`signingKeySecretRefs` and `hmacSecretRefs` are technically optional. When
381+
omitted, the auth server auto-generates ephemeral keys on startup. This is
382+
convenient for development, but **tokens become invalid after pod restart** —
383+
JWTs can no longer be verified (signing keys) and authorization codes and
384+
refresh tokens can no longer be decoded (HMAC secrets), forcing all users to
385+
re-authenticate. Always configure persistent keys for production. See
386+
[Set up embedded authorization server authentication](../guides-k8s/auth-k8s.mdx#set-up-embedded-authorization-server-authentication)
387+
for key generation steps.
388+
389+
:::
390+
391+
If the browser-facing authorization endpoint needs to be on a different host
392+
than the issuer (for example, behind an ingress that rewrites paths), set
393+
`authorizationEndpointBaseUrl` to override the `authorization_endpoint` in the
394+
OAuth discovery document. All other endpoints remain derived from `issuer`:
395+
396+
```yaml
397+
spec:
398+
authServerConfig:
399+
issuer: https://auth.internal.example.com
400+
authorizationEndpointBaseUrl: https://auth.example.com
401+
```
402+
378403
Each upstream provider `name` must be a valid DNS label (lowercase alphanumeric
379404
and hyphens, max 63 characters). This name is what
380405
[upstream token injection](#upstream-token-injection) and
@@ -385,6 +410,17 @@ providers, see
385410
The [complete example](#complete-example) below shows full provider
386411
configurations.
387412

413+
:::tip[Non-standard token responses]
414+
415+
Some OAuth 2.0 providers nest tokens under non-standard paths instead of
416+
returning them at the top level (for example, GovSlack returns the access token
417+
at `authed_user.access_token`). Add a `tokenResponseMapping` block to the
418+
`oauth2Config` with dot-notation paths for `accessTokenPath`, `scopePath`,
419+
`refreshTokenPath`, and `expiresInPath`. See the
420+
[CRD reference](../reference/crd-spec.md) for field details.
421+
422+
:::
423+
388424
### Incoming auth with the embedded auth server
389425

390426
When using the embedded auth server, configure `incomingAuth` to validate the

0 commit comments

Comments
 (0)