Repository navigation
feat(remote): resolve identities by did:atomic identifier - #260
Open
graywolf336 wants to merge 1 commit into
Open
graywolf336 wants to merge 1 commit into
graywolf336 wants to merge 1 commit into
Conversation
Signed objects carry only the signer's DID (a blake3 fingerprint of the
public key); verifying them requires recovering the key by DID. Adds
StorageClient::resolve_identity_by_did against the new
GET /identities/by-did/{did} endpoint, authenticating like the
name/email resolution.
The returned key is re-derived against the requested DID before the
call succeeds (via atomic_canonical::did::did_matches_public_key): a
server that answers a fingerprint lookup with the wrong key must not
silently validate a spoofed signer. Unit tests cover the match and
every untrustworthy-answer path (mismatch, missing, unparseable).
Contributor
Author
|
Heads-up for reviewers: this branch is intentionally based on |
graywolf336
force-pushed
the
feature/identity-did-lookup
branch
from
October 15, 2026 15:13
6c992b3 to
e60f47c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Signed objects (attestations, delegations) carry only the signer's
did:atomic:...identifier —base32(blake3(public_key)), a one-way fingerprint of the key. Verifying such an object requires recovering the public key by DID, which the client had no path to do.The server side (companion PR in
atomic-storage— linked below) addsGET /identities/by-did/{did}, backed by a newkey_fingerprintlookup column.What
StorageClient::resolve_identity_by_did(did)inatomic-remote/src/storage.rs, next to the existing public-key resolution:GET /identities/by-did/{did}with the same bearer auth asresolve_identity_by_email/by_name(the endpoint is authenticated because holding a DID proves nothing — DIDs circulate in public signed objects).atomic_canonical::did::did_matches_public_key. The server indexes by the fingerprint, so a spoofed answer would otherwise be well-formed — and a client that trusts this key to verify a signature must not take it on faith. Mismatch, missing key, and unparseable key all fail the call; never silently succeed. (Done inside the method, so callers cannot forget it.)atomic-identityadded as a dependency ofatomic-remoteforPublicKey::from_base32(already a workspace member dep).Verification
Companion
Server PR: atomicdotdev/atomic-storage#108 (merge server first or ship together — this method 404s against servers without the endpoint, which surfaces as a clean
RemoteError, not a panic).