Planned Changes to DID Documents (August 2023) #1510
Replies: 4 comments 9 replies
-
Hell yes! thank god, glad to hear it. The old uncompressed raw bytes encoding for |
Beta Was this translation helpful? Give feedback.
-
We are going to take our time with this roll out to ensure it isn't as disruptive as the recent repo v3. A week or so before making any large change in prod we will:
Towards that final point, going to tag a couple folks as an early heads up if they aren't aware of this change (not trying to promote/exclude anybody; and sorry if this is spammy): @rudyfraser @redsolver @MarshalX @mozzius @jcsalterego @videah @myConsciousness @DavidBuchanan314 @jessejanderson @Amazingca @MattStypa |
Beta Was this translation helpful? Give feedback.
-
Do I need to update anything in the |
Beta Was this translation helpful? Give feedback.
-
Hi, I seem to be affected by this. My DID is I was able to find this page, but it's unclear to me how to fix my public key. The docs say that the format has been changed to I tried just fixing the format of the DID to include the handle in front of the I don't really understand why any valid multibase encoding wouldn't work, as it's my impression that that's kind of the whole point of multibase, but it also seems to be such a niche format that I can't find much in the way of tooling to perform the encoding for me. This could have been communicated better. Not everyone is going to follow the GitHub page for breaking changes like this. I'm not a prospective API developer, I'm just a user who wanted to set up did:web. |
Beta Was this translation helpful? Give feedback.
-
We're planning to roll out some changes to DID Documents as they are used in atproto, in particular the
verificationMethod
syntax for public cryptographic keys. This change will impact:If you're only working with identity (DIDs and handles) via the PDS API endpoints or the repo event stream, and not verifying identities locally via direct DID resolution, you shouldn't need to do anything.
No internal changes to did:plc operation logs or atproto repositories is required.
Timeline
@atproto/identity
library which supports both DID document formatsThe Changes
The two changes to
verificationMethod
objects are to:#atproto
fragment in theid
field (instead of just the fragment). This is only required forverificationMethod
, not forservice
objects, per the DID Core specification.Multikey
type
, instead of per-key-type, and use the correctpublicKeyMultibase
encoding for that type (still base58btc multibase; but include multicodec to indicate key type; and use "compressed" bytes for P-256 and K-256 keys)It is good practice to support full DID identifiers in the
service
id
field as well, though we will continue to produce the terser fragment-only format for now (as allowed by the specification). Eg, check if theid
field ends with#atproto_pds
instead of if it equals#atproto_pds
.The current format for
publicKeyMultibase
uses un-compressed bytes (which is why the strings are so long), and do not include a multicodec type indicator, relying on thetype
field to disambiguate. This is the only place in the entire atproto protocol that this encoding is used, and it is confusingly similar to the new format, so removing it should remove a major footgun for developers. The new encoding matches that ofdid:key
encoding (that is, the part following thedid:key:
prefix).The atproto specifications haven't been updated yet, but you can preview the changes here:
Examples
Here is the current DID document for the
@atproto.com
account:and here is what it would look like after these changes:
Beta Was this translation helpful? Give feedback.
All reactions