UI Login with Keycloak
NOCFoundry’s browser UI acts as an OIDC public client and uses Authorization Code + PKCE to access the protected /api surface.
Local demo flow
- Start Keycloak:
docker compose -f examples/keycloak/docker-compose.keycloak.yaml up -d
- Bootstrap the demo realm and clients:
./examples/keycloak/keycloak-setup.sh
- Start NOCFoundry with:
examples/tools-configs/keycloak-protected-validation.yamlexamples/server-configs/protected-api-mcp-ui.yaml
Important client details
The setup script creates:
noc-foundryfor the resource-side auth servicenoc-foundry-uifor the browser PKCE client
The UI client must:
- allow
/ui/auth/callback - allow
/ui/for post-logout redirect - include the API audience expected by endpoint auth
Logout behavior
The browser logout flow sends:
client_idpost_logout_redirect_uriid_token_hint
That allows Keycloak to complete logout cleanly and return the operator to the UI without the extra confirmation screen.