Skip to content

feat(pds): implement PDS-side identity endpoints#179

Merged
ascorbic merged 3 commits into
mainfrom
feat/pds-identity-endpoints
May 24, 2026
Merged

feat(pds): implement PDS-side identity endpoints#179
ascorbic merged 3 commits into
mainfrom
feat/pds-identity-endpoints

Conversation

@ascorbic
Copy link
Copy Markdown
Owner

Summary

Implements three PDS-side com.atproto.identity.* endpoints that previously fell through to the AppView proxy and returned 501. Each follows the existing resolveHandle pattern: serve the local account directly, fall through to the proxy for foreign identities.

  • resolveDid — returns {didDoc} for our local DID; foreign DIDs fall through to the AppView proxy.
  • resolveIdentity — returns {did, handle, didDoc} for our local handle or DID; foreign identifiers fall through.
  • getRecommendedDidCredentials (authenticated) — returns rotationKeys, alsoKnownAs, verificationMethods, and the atproto_pds service entry, used by other PDSes during inbound migration. The signing key is derived from SIGNING_KEY via Secp256k1Keypair.import().did().

Also extracts the DID document construction (previously inlined in /.well-known/did.json) into a shared buildDidDocument(env) helper so the well-known route and the new XRPC routes return identical documents.

Test plan

  • pnpm --filter @getcirrus/pds test — 303 unit + 84 CLI tests pass, including 9 new tests in test/identity.test.ts covering each endpoint's happy path, missing-param 400s, fall-through for foreign identifiers, and auth enforcement on getRecommendedDidCredentials.
  • pnpm --filter @getcirrus/pds check — publint + attw clean.

Adds three com.atproto.identity.* endpoints that previously fell through
to the AppView proxy and returned 501:

- resolveDid: returns the local DID document for our DID
- resolveIdentity: returns {did, handle, didDoc} for our DID or handle
- getRecommendedDidCredentials: returns rotation keys, alsoKnownAs,
  verification methods, and PDS service entry for inbound migration

Foreign DIDs and handles still fall through to the AppView proxy.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 24, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
pdscheck 43f7a9c May 24 2026, 07:55 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 24, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
atproto-pds 43f7a9c May 24 2026, 07:55 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 24, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
cirrusdocs 43f7a9c Commit Preview URL

Branch Preview URL
May 24 2026, 07:55 PM

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 24, 2026

Open in StackBlitz

npm i https://pkg.pr.new/create-pds@179
npm i https://pkg.pr.new/@getcirrus/oauth-provider@179
npm i https://pkg.pr.new/@getcirrus/pds@179

commit: 43f7a9c

@ascorbic ascorbic enabled auto-merge (squash) May 24, 2026 19:53
@ascorbic ascorbic disabled auto-merge May 24, 2026 19:53
@ascorbic ascorbic enabled auto-merge (squash) May 24, 2026 19:54
@ascorbic ascorbic merged commit 9f8adee into main May 24, 2026
7 checks passed
@ascorbic ascorbic deleted the feat/pds-identity-endpoints branch May 24, 2026 19:55
@mixie-bot mixie-bot Bot mentioned this pull request May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant