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

Apps acting as a person reach the host through the person's PDS

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:host/proxy

What changes

Apps acting as a person reach the host through the person's own PDS. The host's DID document now names a second service, #opensocial (OpensocialGroupHost, at its public address), beside #atproto_pds. A person's PDS forwards a call sent with atproto-proxy: <host DID>#opensocial to it, signed as the person, and the host answers as it would that person's own service auth. An OAuth app asks the person's PDS for include:fyi.opensocial.basePermissions with that service as its audience. docs/design/signing-in.md gains a section, "Apps acting as a person".

Why

The lexicons already meant this: basePermissions is a permission set for apps acting as a person, and its rpc permissions inherit their audience. But the host's document named no service a PDS could proxy to. The prototype had the same service (config.ts's serviceId). The host already accepted service auth for any #fragment of its DID.

How it was checked

crates/opensocial/tests/commands.rs adds answers_a_call_a_persons_pds_proxies. The reference PDS (harness/pds.mjs) proxies getViewer to a host at localhost, as alice, and the host answers with her DID. tests/repos.rs checks the document names #opensocial. just cov is at 100% locally.

Shortcomings

Only a did:web host serves its own document. A host with another SERVICE_DID must name #opensocial in that DID's document itself.

🤖 Generated with Claude Code

Approved

This adds an #opensocial (OpensocialGroupHost) service, at the host's public URL, to the host's served DID document. A person's PDS can then proxy atproto-proxy: <host DID>#opensocial calls to it. It also adds a section to signing-in.md, a document assertion in repos.rs, and an end-to-end test of getViewer through the reference PDS.

All checks pass at this head, including test, which holds the 100% gate and the new proxy test. The change is small and matches your description. The docs page, the one the repo's docs rule points to, is updated. The did:web-only limit is already noted in the body. Nothing needs changing.

One note: harness/pds.mjs isn't in the diff, so the proxying must come from the reference PDS itself. The passing test confirms that, so the body's wording about the harness "proxying" is slightly loose, but that's harmless.

Merged as 2c2f40d