PSA audit (non-mock fixes) + prod mock-guard #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/m1-vas"
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?
Remediates the non-mock PSA-audit findings; dev mocks are kept per decision, with a production guard added.
Also includes the prior m1 Google-OAuth + wiring commit on this branch.
Adds bunyip-side "Continue with Google" / "Sign up with Google" SSO buttons that ride the existing PKCE OIDC flow against mokosh-server with an &idp_hint=google query param appended. No mokosh-server code changes; the hint is opt-in on the IdP side and the flow degrades gracefully (user sees the chooser) if mokosh-server's IdP UI ignores it. The button hides when BUNYIP_OIDC_ISSUER is unset so dev builds without env baked in are safe. Refactors start_login into a small start_login_inner helper so the new start_login_with_idp_hint variant can share state + PKCE generation without duplicating the URL-building loop. Public callers of start_login keep their signature. Adds baseline security headers (X-Frame-Options DENY, X-Content-Type-Options nosniff, Referrer-Policy strict-origin-when-cross-origin) to the bunyip-web production Caddyfile. CSP is intentionally absent here; tune one after the queued security audit since Dioxus WASM needs script-src 'self' 'wasm-unsafe-eval' plus the mokosh-server origin in connect-src. Adds a TODO note on the AppShell active-org caption since me.memberships.first() can show the wrong org for multi-org users; the fix path (read mokosh_active_tenant claim from the JWT via modules/oidc/tokens.rs::parse_unverified, or extend MeResponse server-side) is documented in For AI/m1-vas-progress.md. Adds docs/getting-started.md per the PSA-1 milestone explicit ask ("Start of the documentation - Example: How do I get started?"). Covers the just dev fast path, mock-mode sign-in, the SSO overlay, the Google button, the cross-project domain layout, common commands, and where things live. Appends a May 26 update to dev-docs/milestone-1-handoff.md noting what landed since the May 15 snapshot (PRs #14 #18 #2 #4 #6 plus docker feat/PSA-Staging all merged) and what this sprint added. Local-only sprint per user constraint. No push.bunyip-web's derive_api_host apex branch returned format!("msp-api.{host}"), targeting the dead cross-origin scheme. On the c-01 apex deployment bunyip-web and bunyip-api are co-resident at a8n.systems, so the API host IS the SPA host - return it as-is. Updates the doc comment to describe the new same-origin apex behavior and the corresponding api_host_derivation unit-test assertions. The dev-host branch (<user>-bunyip.<rest>) is unchanged. Follow-up: README / dev-docs / docs/getting-started still describe the msp-api.<tld> scheme. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>