fix(auth): remove redundant Cloudflare Access login#28
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 20, 2026, 11:57 PM ET / July 21, 2026, 03:57 UTC. Summary Reproducibility: yes. at source level: the workflow and removal-script tests define the exact migration paths, but the supplied evidence does not include a real deployed before/after authorization transcript. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Approve the boundary only if maintainers want Krillswitch’s GitHub-role and token checks to be the sole production authorization layer, then capture a redacted production or staging transcript showing authorized access, ungranted-session denial, token automation, and the guarded Access-removal migration. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the workflow and removal-script tests define the exact migration paths, but the supplied evidence does not include a real deployed before/after authorization transcript. Is this the best way to solve the issue? Unclear: the implementation is a focused way to remove duplicate login, but whether replacing defense in depth with application-only authorization is the best solution depends on maintainer security policy. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 5fa9dca504c2. Label changesLabel justifications:
Evidence reviewedSecurity concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
9bf120e to
8479073
Compare
What Problem This Solves
Fixes an issue where people and automation had to pass a separate Cloudflare Access identity gate before Krillswitch could apply its own GitHub-backed roles or role-scoped access tokens. This produced two human login steps and two automation credentials without using the Cloudflare identity inside the application.
Why This Change Was Made
The admin hostname now relies directly on Better Auth GitHub sessions for people and ksat_ tokens for automation. The deployment removes the legacy Cloudflare Access application only after the updated Worker deploy succeeds, verifying its exact application id, name, and hostname before deletion.
The obsolete Access policy provisioning, workflow inputs, CLI headers, environment variables, tests, and documentation are removed. Public flag evaluation and Krillswitch role enforcement are unchanged.
User Impact
People visit the dashboard, sign in once with GitHub, and receive the role resolved by Krillswitch. OpenClaw organization members receive viewer access; explicitly granted users receive their assigned role; all other GitHub users see the no-access screen.
CLI and agent automation now need only a role-scoped Krillswitch access token.
Migration
The krillswitch-admin GitHub environment must retain KRILLSWITCH_ACCESS_APP_ID for the first admin deployment. That deployment uses the existing Cloudflare token to delete the matching legacy Access application. After successful removal, the variable can be removed and later deployments skip the migration step.
Evidence