Repository navigation
Description
Summary
The consent page of the embedded authorization server ("Allow this app to sign you in?") is the one page every user of a vMCP gateway sees before the upstream IdP. For operators who run the gateway via the Kubernetes operator, nothing on that page can be adapted:
- The line "You will sign in with … next." shows the upstream's
name, a routing key such ascorp-idp. Show a display name for upstreams on the embedded auth server consent page #6922 addedDisplayNamefor exactly this, but theVirtualMCPServerCRD does not expose it, so operator deployments cannot use it. - All text is English and hard-coded (
consentPageTemplate,classifyRedirect), withlang="en"and "ToolHive" in the title. Our users are German speakers who do not know ToolHive. - The layout is fixed: colours and markup are built in (
pageStyles,consentStyles,consentPageTemplate), no logo can be added, and the CSP only allows those two style blocks by hash. The page looks like a different product than the company sign-in that follows it.
The page is a security control: it asks the user to check where the sign-in is sent and to deny if they did not just start the app. That only works if users understand the page. A page in a foreign language that names an internal key and an unknown product trains users to click "Approve" without reading.
Rewriting the page in a reverse proxy is fragile and touches a security-sensitive flow (handle, browser binding cookie, Origin check, CSP), so we would rather not do that.
Proposal
Part 1 (small): displayName in the CRD
Add an optional displayName to spec.authServerConfig.upstreamProviders[] and pass it through to UpstreamRunConfig.DisplayName. Semantics as in #6922: display only, never a key, same sanitising and length cap. With no displayName the page stays as today.
authServerConfig:
upstreamProviders:
- name: corp-idp
displayName: "Corporate sign-in"
type: oidcAcceptance: a VirtualMCPServer with displayName: "Corporate sign-in" renders "You will sign in with Corporate sign-in next." and keeps corp-idp under Technical details.
Part 2: localized text for the consent page
Let the operator provide the page text, without changing structure or security behaviour:
- A fixed set of message keys (heading, summary texts from
classifyRedirect, labels, "not verified" hint, remember checkbox and help text, buttons, page title). Values are plain text, rendered throughhtml/templateas today; no HTML, no extra CSS, so the CSP stays as it is. - Shipped catalogs at least for
en(default, today's text). The operator selects a locale, e.g.authServerConfig.consentPage.locale: deonce a German catalog ships (we would contribute it), optionally with a ConfigMap reference for custom or additional catalogs. A missing key falls back to English. langattribute follows the selected locale.- Optional: a product name for the title instead of "ToolHive".
What Part 2 does not change: which facts are shown (destination, client name marked as not verified, technical details), form fields, CSP, Origin and binding checks. Security-relevant messages (the "only continue if you just started that app" warning and the "not verified" hint) must not be empty: an empty or missing value falls back to the shipped text. If you prefer, these keys could also be limited to shipped, reviewed catalogs.
Part 3: custom layout (theme, logo, optional custom stylesheet)
We would also like the page to look like the rest of our sign-in (company colours and logo), so users recognise it as part of the same flow. The shared pageStyles already uses CSS custom properties (--brand, --bg, --card, …, in v0.73.0 and v0.74.0), which makes a theme cheap.
Trust model: the operator is trusted. The page protects users against unknown DCR clients, not against the operator. The remaining risk is an operator hiding a warning by mistake, so the proposal is narrow by default, with one explicitly trusted escape hatch:
- Theme values, not a free stylesheet: the operator sets values for an allowlist of the existing variables (light and dark), e.g.
authServerConfig.authPages.theme.brand: "#0b5cad". Values are validated (colours only), and the generated:rootblock is hashed at startup like the existing style blocks. Selectors,content:,displayandurl()cannot be set this way, so with theme values alone the warning, the "not verified" marker and the technical details cannot be hidden or changed by styling. This should be the recommended way. - Custom stylesheet (operator-trusted option): for layouts the variables cannot express (spacing, card width, header with logo, button shapes), an optional stylesheet from a ConfigMap, e.g.
authServerConfig.authPages.styleConfigMapRef, with a size limit, appended after the built-in styles and hashed at startup like them (no'unsafe-inline'; a change takes effect after a restart). This is explicitly operator-trusted: a stylesheet can hide, relabel or move any element, including the destination, the warning, the "not verified" marker, the technical details, the remember checkbox and the buttons. With a custom stylesheet active, the guarantee from Part 2 covers the text but not its visibility. Write access to that ConfigMap therefore equals write access to the consent page (RBAC). The documentation should say so, and the server could log a warning at startup when a custom stylesheet is active. - Logo: optional, shown above the heading, supplied as an image (PNG or SVG as
data:URI, with a size limit). - CSP: the consent page already sends
default-src 'none'; style-src 'sha256-…'; frame-ancestors 'none'; base-uri 'none'. Part 3 only adds the hash of the theme block, the hash of an optional stylesheet andimg-src data:. Becausedefault-src 'none'stays, externalurl(),@importand fonts (alsodata:fonts) remain blocked, so neither theme nor stylesheet can make the user's browser contact other hosts or track sign-ins. Acceptance: a stylesheet with an externalurl()triggers no request. All other headers (X-Frame-Options, no scripts) stay unchanged. - Scope: consent page. Applying the same theme to the device verification page could be a separate, opt-in setting, as company branding there also makes device-code phishing look more credible; the client facts and warnings would stay fixed there in the same way.
A full HTML template override would give more freedom, but a presence check cannot ensure that required elements are visible, and it would add maintenance load. We do not ask for it here.
If you prefer, the parts can be separate issues; Part 1 is independent and much smaller.
Environment
- ToolHive operator and vMCP v0.73.0; the same code is in v0.74.0 and on
main(checked 2026-12-03) - Embedded auth server with several upstream providers, clients registered via DCR (Claude desktop app and others), so the consent page is shown on every new sign-in that is not remembered.
Activity
nilsberberich commentedon Dec 3, 2026
I'd like to work on this. I would start with Part 1 (
displayNamein the CRD), as it is small and independent, and send it as a separate PR. For Parts 2 and 3 I'd wait for your feedback on the proposed design before implementing anything. Happy to split them into separate issues if that suits you better.