@bnewbold There is no advantage in using DID URLs. That severely limits the number of DID methods developers can use, and excludes the most important method, did:key.
You're right, new URI scheme is much better. This approach is being explored in FEP-ef61 (where ap:// scheme was proposed).
ActivityPub IDs are RFC-3986 URIs, and that RFC doesn't forbid non-DNS naming authorities (idk about WHATWG standard). However, you can't build a valid RFC-3986 URI with plain DID because the portion after the last colon is parsed as a port number. Two solutions has been proposed:
- Percent encode DID: ap://did%3Akey%3Az6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2/actor - Pretend that we are using IP address from the future: ap://[vd.did🔑z6MkvUie7gDQugJmyDQQPhMCCBfKJo7aGvzQYF2BqvFvdwx6]/actor
i'm not sure I understand the advantage of leaning in to DID URLs instead of creating a new URI scheme (eg, fedi://).
it would be great if we could get WHATWG to allow DIDs in the authority section of URLs, at least non-HTTP URLs. I haven't started that conversation yet, but could be helpful for a bunch of DID-using projects.
curious to hear about how did:fedi resolution would work! aka how to discover authoritative server
I have been reading parts of the DID Resolution spec, yes. There are some inconsistencies I noticed when trying to sorta-implement it, such as the example for "8. DID URL Dereferencing Result" whereas it has didUrlDereferencingMetadata while the current JSON-LD context (which is https://w3id.org/did-resolution/v1 which redirects to a broken URL of https://w3c-ccg.github.io/did-resolution/contexts/did-resolution-v1.json, when I think it's instead meant to go to https://w3c.github.io/did-resolution/contexts/did-resolution-v1.json) defines a property name of dereferencingMetadata instead; or also relative-ref instead of relativeRef in some of the diagrams.
There had been light inferences about using DID URLs for binary content, but it's difficult to see the application of it, when most of it comes to returning a JSON resolution/dereferencing metadata document as an envelope. There's no mention of anything with content negotiation, like if there was a mechanism where: a DID-aware application could ask for the JSON info on resolution, or else, a non-DID-aware application (that doesn't list DID resolution media type in the 'Accept' header) could just be redirected to the dereferenced binary file instead.
There also doesn't seem to be much for options with simply pointing to the location of the resource, rather than embedding the resulting document directly.
I've generally tried just 'making up' some makeshift extensions to fill the gaps in my use-case, and might have some results within a week-ish (I have a resolver implemented with DID URL dereferencing, I just need to make further client-facing changes). There could also be a chance that I might have skipped over something important that might address my complaints, as I'm usually skimming through fragments of all the miscellaneous specs at a time.
@arcanicanis@silverpill@bnewbold@erlend sadly there isn't much support for DID URLs in the wild, as that whole set of features is optional and few DID method specifications even mention (whether mandatory or optional) how implementations could dereference DID URLs... I would mention that one of the formal objections complained about this unspecified behavior and thus the DID WG has prioritized the DID Resolution spec, which might help a little: https://w3c.github.io/did-resolution/#dereferencing
I stole a few ideas from did:plc and did:tdw, yes. It's just an experiment insofar, as I'm using it as a stand-in for other methods, as something I can adjust to my needs as I toy with DIDs in a way with reverse-compatibility to standard non-DID ActivityPub.
As it currently stands, there doesn't seem to be a lot of methods that clarify whether DID URLs are permitted or not with the method.
There were a few adjustments I was going to add, such as what other 'authoritative' servers the did:fedi can be discovered from, within the method-specific protocol, maybe.
Either way, I haven't been public about it yet. Just finished a basic key wrapping and serialization format to go along with it, and I'll probably push out a newer version of the generator demo (which presently lacks a polyfill for browsers that don't have native Ed25519 within WebCrypto) in a day or two. I'll probably be more vocal when I have results.
As for the primer, that was probably over a year ago, and the mentioned FEPs, even a year before that (with all those FEPs devised by @silverpill )
But standardization of it may take many years. And after that people will need to update all existing URI/URL parsing libraries and software that depends on them.
@silverpill @arcanicanis @erlend@bnewbold why is support for more did methods an assumed goal? for whom and in which use cases is a non http protocol handler justified? why is did:key important? why is ap:// the best possible url scheme for the AP protocol? it feels like we're talking at a general level and yet so many usecase-specific requirements and goals keep sneaking in
>why is support for more did methods an assumed goal?
Because extensibility is good. New DID methods are constantly being invented and there shouldn't be any artificial restrictions on their use.
>for whom and in which use cases is a non http protocol handler justified?
In an 'http' URL, the authority is derived from the domain name. In our case, authority is derived from a cryptographic identity, so a custom URI scheme is more appropriate.
>why is did:key important?
did:key doesn't depend on any external services and is the easiest to implement.
>why is ap: the best possible url scheme for the AP protocol?
It works and so far no other scheme has been proposed.