fix: resolve handles through authoritative HTTPS #77

Merged
starsetbyte merged 1 commit from fix/authoritative-handle-resolution into feat/device-trust-foundation 2026-07-11 21:21:28 +00:00
Owner

Continuation from density/P1 handoff

This branch picks up the authoritative handle-resolution item in docs/plans/2026-07-11-density-pass-handoff.md.

Policy

  • Try https://<handle>/.well-known/atproto-did first.
  • For arbitrary custom domains, fail closed if the authoritative endpoint is absent; never ask the centralized Bluesky resolver to vouch for them.
  • Retain centralized com.atproto.identity.resolveHandle only as an explicit compatibility fallback for bsky.social and *.bsky.social.
  • Preserve bidirectional DID-document alsoKnownAs verification.

Changes

  • Added authoritative HTTPS resolution and first-party fallback policy to HandleResolver.
  • Added handle normalization/validation and response-body ownership via use.
  • Added MockWebServer tests for authoritative success, custom-domain failure, first-party fallback, and malformed responses.
  • Updated existing OAuth discovery tests for the new request sequence.

Verification

./gradlew :app:testDebugUnitTest :app:lintDebug :app:assembleDebug --no-daemon

BUILD SUCCESSFUL.

## Continuation from density/P1 handoff This branch picks up the authoritative handle-resolution item in `docs/plans/2026-07-11-density-pass-handoff.md`. ### Policy - Try `https://<handle>/.well-known/atproto-did` first. - For arbitrary custom domains, fail closed if the authoritative endpoint is absent; never ask the centralized Bluesky resolver to vouch for them. - Retain centralized `com.atproto.identity.resolveHandle` only as an explicit compatibility fallback for `bsky.social` and `*.bsky.social`. - Preserve bidirectional DID-document `alsoKnownAs` verification. ### Changes - Added authoritative HTTPS resolution and first-party fallback policy to `HandleResolver`. - Added handle normalization/validation and response-body ownership via `use`. - Added MockWebServer tests for authoritative success, custom-domain failure, first-party fallback, and malformed responses. - Updated existing OAuth discovery tests for the new request sequence. ### Verification `./gradlew :app:testDebugUnitTest :app:lintDebug :app:assembleDebug --no-daemon` **BUILD SUCCESSFUL**.
fix: resolve handles through authoritative HTTPS
All checks were successful
peregrine-ci / assembleDebug Build succeeded (26s)
5610ab0609
starsetbyte force-pushed fix/authoritative-handle-resolution from 5610ab0609
All checks were successful
peregrine-ci / assembleDebug Build succeeded (26s)
to f4811ad750
All checks were successful
peregrine-ci / assembleDebug Build succeeded (23s)
2026-07-11 21:20:06 +00:00
Compare
starsetbyte merged commit f25a3b3f5b into feat/device-trust-foundation 2026-07-11 21:21:28 +00:00
Sign in to join this conversation.
No description provided.