Skip to content

Commit ad09939

Browse files
aspiersclaude
andcommitted
docs: apply prettier formatting
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 445ecea commit ad09939

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

docs/architecture.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ endpoint to issue an AT Protocol authorization code. For new users, a handle-pic
8080
`pds.example`). A single-domain design — one origin, routing the auth paths
8181
by path prefix the way [pds-gatekeeper](https://tangled.org/baileytownsend.dev/pds-gatekeeper)
8282
does — was **considered and rejected**. The reasons:
83-
8483
- **Mechanism (how the takeover happens)**: PDS Core overrides the
8584
Authorization Server metadata so `authorization_endpoint` points at the
8685
Auth Service. OAuth clients redirect the browser straight there, so the
@@ -117,7 +116,6 @@ endpoint to issue an AT Protocol authorization code. For new users, a handle-pic
117116

118117
**On re-examination, none of the three benefits is a non-negotiable, and all
119118
the costs are artifacts of being cross-origin-but-same-site:**
120-
121119
- _Cookie isolation_ is already done by explicit cookie **naming**
122120
(`epds_csrf`, `magic_account_session`, the `DEVICE_COOKIE_NAMES` set), not
123121
by origin — so it survives a collapse to one origin, optionally hardened
@@ -139,7 +137,6 @@ endpoint to issue an AT Protocol authorization code. For new users, a handle-pic
139137

140138
Beyond dissolving those costs, collapsing to one origin has **positive**
141139
benefits the split forecloses:
142-
143140
- **Fewer privileged cross-service endpoints.** The split forces the two
144141
services to talk over authenticated HTTP: the HMAC-signed
145142
`/oauth/epds-callback` and the `/_internal/*` / `/_magic/*` lookup

docs/design/single-domain-migration.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ that case is accepted and focuses on _how_.
1313

1414
## Summary of the change
1515

16-
| Concern | Today (two origins) | After (one origin) |
17-
| --- | --- | --- |
18-
| Auth UI location | `https://auth.pds.example/oauth/authorize`, `/auth/*`, `/account/*` | `https://pds.example/auth/*` (path-prefixed) |
19-
| `authorization_endpoint` (AS metadata) | `https://auth.<host>/oauth/authorize` | `https://<host>/auth/oauth/authorize` |
20-
| `sec-fetch-site` on `/oauth/authorize` | `same-site`, rewritten to `same-origin` (item 5) | naturally `same-origin` — rewrite **deleted** |
21-
| Device-session cookies | `Domain=<parent>` so sibling subdomain can read them (items 14–15) | host-only on the single origin — **plumbing deleted** |
22-
| Auth session cookie | `magic_account_session` / better-auth `session` on `auth.<host>` | same names, path-scoped `/auth` on `<host>` |
23-
| CSP | per-route in each service (unchanged approach) | per-route, unchanged |
24-
| Deploy units | two services | still two processes, one origin (Caddy path-routes) — or merged later |
16+
| Concern | Today (two origins) | After (one origin) |
17+
| -------------------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------- |
18+
| Auth UI location | `https://auth.pds.example/oauth/authorize`, `/auth/*`, `/account/*` | `https://pds.example/auth/*` (path-prefixed) |
19+
| `authorization_endpoint` (AS metadata) | `https://auth.<host>/oauth/authorize` | `https://<host>/auth/oauth/authorize` |
20+
| `sec-fetch-site` on `/oauth/authorize` | `same-site`, rewritten to `same-origin` (item 5) | naturally `same-origin` — rewrite **deleted** |
21+
| Device-session cookies | `Domain=<parent>` so sibling subdomain can read them (items 14–15) | host-only on the single origin — **plumbing deleted** |
22+
| Auth session cookie | `magic_account_session` / better-auth `session` on `auth.<host>` | same names, path-scoped `/auth` on `<host>` |
23+
| CSP | per-route in each service (unchanged approach) | per-route, unchanged |
24+
| Deploy units | two services | still two processes, one origin (Caddy path-routes) — or merged later |
2525

2626
The routing model is exactly pds-gatekeeper's: **Caddy routes by path**, sending
2727
`/auth/*` (and the auth-owned `/oauth/authorize`, `/account/*`) to the

0 commit comments

Comments
 (0)