feat(binjovi): route the staging dashboard on binjovi.dev through Oathkeeper #116
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/binjovi-dev-dashboard-routes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Second of three pull requests that make the staging dashboard at
https://binjovi.dev/open in a normal browser. The client registration is seanfarm #703; the proxy Deployment, the route split and the origin allow-list follow in binjovi.Kratos pins its session cookie to
sean.farm, so a browser onbinjovi.devnever carries a session, and the app answers401 invalid_identityto every operator. The design keeps Oathkeeper as the first hop forbinjovi.dev, exactly as for production, so the availability gate keeps the 401 it expects from an anonymous request. What changes is where the session comes from.binjovi.sean.farm(dashboard, services page, assets,apireads, and the two/api/v1/ui/command routes) gains abinjovi-dev-*twin with the same route and methods.cookie_sessionauthenticator asks the login proxy on the host,binjovi-staging-login.binjovi-staging.svc:4180/oauth2/userinfo, instead of Kratos, withsubject_from: emailandextra_from: '@this'. Thejwtauthenticator stays as the fallback.id_tokenmutator's claims template readsemailfrom.Extra.email, which is where the proxy's user info carries it, so the app receives the same identity token shape it already verifies (iss https://auth.sean.farm/oathkeeper,aud binjovi). No change to the app's auth config.errors: an HTML request with no session is redirected tohttps://binjovi.dev/oauth2/start?rd=<url>; anything else keeps the JSON 401. Oathkeeper is v0.40.9, which supports per-rule handler config and per-rule errors.binjovi-staging.binjovi-staging.svc:80, never the production Service.ReferenceGrantlets theHTTPRouteinbinjovi-stagingreachService/oathkeeper-proxy, asbinjovi-to-oathkeeperdoes for production.tests/binjovi-dev-route-contract.sh, wired intotests/check.sh, proves each twin carries its production route and method set, the proxy user info, the claims template, the redirect, the staging upstream, that exactly six rules reach staging, that nobinjovi-dev-*rule reaches the production app, and that the grant names the staging namespace. It was red before the rules and is green after;tests/check.shpasses in full; the rule list parses as one YAML sequence of 49 unique ids.https://claude.ai/code/session_01XdBRc9CHgFhAxCyHbdVtt6