~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Someone not signed in sees only a group's handle, and is asked to sign in

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:console/signed-out

What changes

The boundary. public means anyone signed in, everywhere. A caller with no service auth and no console cookie now learns of a group only what its DID document already says:

  • getGroup answers {"group": {"did", "handle"}} and nothing more, whatever the group's access records say. A switched-off group is answered the same way, without deactivated.
  • listGroups lists every group by its DID and handle alone. Signed in, it answers as before. It now reads the caller, so it takes service auth for fyi.opensocial.listGroups or the console's cookie.
  • listSpaceRecords and getSpaceBlob refuse with 401 AuthMissing, including for a space whose access record is public.
  • /img/{did}/{cid} serves someone not signed in only what the group's public repo holds. A listed group's avatar and banner live in meta, so they go to anyone signed in (who reads meta by its public access) and no longer to anyone at all. The special case for a declared group is gone, because the access record already covers it.

groupView and groupViewDetailed now require only did and handle, so the signed-out answer still validates. meta and members are still sent to anyone signed in. getGroup's and listGroups' descriptions say what a caller without auth gets.

The console, signed out. The home page shows "Groups on <the host's hostname>", "Sign in with your Atmosphere account to see your groups, or to start one." and one Sign in button. There is no list of groups, and it makes no listGroups call. A group's page shows the group's handle, "Sign in to see this group." and Sign in; the dialog's back brings the visitor back to that page. Both use a new templates/Welcome.svelte. Signed in, both pages are unchanged. On every page the footer now reads "<hostname> runs opensocial".

The sign-in dialog follows knotless's: a row of Atmosphere app icons scrolling slowly (the same twenty, copied into web/static/atmo/), faded at its edges and still under prefers-reduced-motion; "What is an Atmosphere account?"; the Handle field; Cancel and Sign in; and, under a divider, "Don't have an account? Create one". New tokens: --text-3xl, --text-hero, --measure, --app-icon, --apps-run, --opaque (a mask's opaque stop).

Why

A group whose meta was public showed its profile, rules and pictures to anyone on the web, signed in or not. The intent of public is anyone with an Atmosphere account, so the host now holds every route to that, and the console offers a visitor who is signed out one thing to do: sign in.

How it was checked

  • New and changed tests, written to fail first:
    • signed-out getGroup gives exactly the DID and handle (groups.rs).
    • listGroups gives profiles to a signed-in stranger and only DID and handle to no one (groups.rs).
    • a switched-off group signed out (lifecycle.rs).
    • a public space is readable by a stranger signed in and refused to no one, records and files (index.rs).
    • a listed group's avatar is 404 signed out and 200 to a stranger signed in (group_config.rs).
  • Tests that relied on signed-out reads now sign in (group_handle.rs, lifecycle.rs).
  • e2e:
    • the signed-out home page, its heading, line and footer, and the dialog's icons, links, focus and Cancel.
    • a group's page signed out showing only the handle, with the host's own signed-out answer.
    • signing in from that page and coming back to it.
    • the visibility flow now checks listGroups as a signed-in non-member.
  • Run here: the workspace's tests, cargo fmt --all, clippy with warnings denied, node harness/lexicons.mjs, node harness/docs.mjs, node harness/layers.mjs, npm run check. Coverage and e2e are left to the runner.

Shortcomings

  • "Create one" links to https://bsky.app/ for now. Where it should go is an open question for the owner: a PDS this host signs people up on, a chooser of providers, or atmosphereaccount.com.
  • The host's name on the home page and in the footer is the console's own hostname, as the browser reached it. When the console and the host are served apart, that is the console's address, not the host's handle domain.
  • com.atproto.space.getSpaceCredential without a delegation token still issues credentials for a moved-in space marked publicRead. No group's meta or members is ever marked so.

Review

Start at crates/group-host/src/group_api.rs (get_group, list_groups), then blobs.rs may_see and index_api.rs readable.

🤖 Generated with Claude Code

Approved

This makes public mean anyone signed in. A caller with no auth gets only a group's DID and handle from getGroup and listGroups, a 401 from space records and blobs, and only public-repo images from /img. I read the diff of group_api.rs, blobs.rs and index_api.rs, the three files the body names, and found no bugs. The change does what the body says:

  • get_group returns before any deactivation or access check, so a switched-off group looks the same as any other to someone signed out.
  • may_see returns false for no one before it reaches the spaces, which closes the old listed-group exception.
  • readable goes through signed_in, so a public space no longer opens to an anonymous caller.

I did not read the console files (web/, Welcome.svelte, CSS tokens), the tests, the lexicons or the docs. I also did not check the CI runs, so I'm not vouching for the layers, docs, lexicon or e2e checks. One thing for the author to confirm: this changes the listGroups and getGroup contract, so docs/reference/api.md should say it. I couldn't tell from what I read whether the diff updates it.

Merged as 85e2854