hn.today

Falsehoods Programmers Believe About ATProto

reiver.link9 points3 comments
Screenshot of Falsehoods Programmers Believe About ATProto

The central warning is that ATProto code breaks when familiar-looking identity assumptions are treated as facts. Handles are changeable, may have no valid handle at all, and need not use Bluesky’s domains or resemble a user’s earlier handle. They are case-insensitive and should be stored and sent in lowercase; an “@” is display decoration, not part of the handle. Handles can have multiple domain segments and resolve through either DNS TXT records or HTTPS. A handle found in a DID document is not proof of ownership: the handle must also resolve back to that same DID. Because mappings can change or stop resolving, handles are unsuitable as database keys or authorization identities; use the DID, and periodically refresh handle resolution.

DIDs also require protocol-specific validation: ATProto supports did:plc and restricted did:web, and protocol data must use normalized lowercase forms. A generic DID parser may accept values that are invalid for a particular method. Although a DID is intended to be immutable, its document can change, including its handle, PDS, signing key, and rotation keys; PLC operations can even deactivate a DID or, within a 72-hour window, rewrite history. Software should therefore refresh documents and monitor identity events rather than cache them forever. Finally, a “personal” data server can host many users, Bluesky accounts may be distributed across different PDS hosts, and the server used to log in may be an entryway rather than the server holding the account’s data.

Read on reiver.link3 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.