web: A mode without sign-in, for the demo and tests #28

Open
opened 2026-11-29 20:33:32 +00:00 by slop-cannon · 0 comments

A web app mode without sign-in, for the demo and tests, so trying the web app doesn't need Pocket ID and a passkey, and the VM test can check pages against a running broker.

Why

  • The demo runs Pocket ID for the web app's sign-in; signing in needs a one-time link and a passkey. That's a good way to try sign-in and passkeys, but it's more than most people trying the demo need.
  • Nothing automated looks at the web app against a running broker: the VM test can't sign in. Unit tests render pages, but not the pages and event stream a live request gives.

Proposal

  • [web] chooses how approvers sign in: OIDC as now, or auth = { none = { approver = "<name>" } }.
  • Without sign-in, every session is that approver: signed_in() and api_user() return them, with a session and CSRF token as now, so answering and Web Push work. The /auth/* routes go.
  • Guards:
    • the broker refuses to start without sign-in unless listen is a loopback address;
    • requests that need a passkey can't be approved from it, as from slop-approve;
    • the audit log names the approver as <name> (no sign-in), and every page has a banner saying there's no sign-in;
    • the NixOS module doesn't offer it.
  • The demo runs without sign-in by default, with Pocket ID behind a devenv option for trying sign-in and passkeys.
  • The VM test turns on the web app without sign-in and, during a deploy, fetches the request's page and /events, checking the progress regions.

Open questions

  • Should the passkey check refuse, or should it be configurable to pass for tests? Refusing is safer; the VM test can cover passkey requests through slop-approve's refusal instead.
  • Name: auth = "none", or something louder like insecure-no-sign-in?

Builds on #22 for the VM test's progress checks.

A web app mode without sign-in, for the demo and tests, so trying the web app doesn't need Pocket ID and a passkey, and the VM test can check pages against a running broker. ## Why - The demo runs Pocket ID for the web app's sign-in; signing in needs a one-time link and a passkey. That's a good way to try sign-in and passkeys, but it's more than most people trying the demo need. - Nothing automated looks at the web app against a running broker: the VM test can't sign in. Unit tests render pages, but not the pages and event stream a live request gives. ## Proposal - `[web]` chooses how approvers sign in: OIDC as now, or `auth = { none = { approver = "<name>" } }`. - Without sign-in, every session is that approver: `signed_in()` and `api_user()` return them, with a session and CSRF token as now, so answering and Web Push work. The `/auth/*` routes go. - Guards: - the broker refuses to start without sign-in unless `listen` is a loopback address; - requests that need a passkey can't be approved from it, as from `slop-approve`; - the audit log names the approver as `<name> (no sign-in)`, and every page has a banner saying there's no sign-in; - the NixOS module doesn't offer it. - **The demo** runs without sign-in by default, with Pocket ID behind a devenv option for trying sign-in and passkeys. - **The VM test** turns on the web app without sign-in and, during a deploy, fetches the request's page and `/events`, checking the progress regions. ## Open questions - Should the passkey check refuse, or should it be configurable to pass for tests? Refusing is safer; the VM test can cover passkey requests through `slop-approve`'s refusal instead. - Name: `auth = "none"`, or something louder like `insecure-no-sign-in`? Builds on #22 for the VM test's progress checks.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/slop-broker#28