Unofficial Draft
Copyright © 2022 the document editors/authors. Text is available under the Creative Commons Attribution 4.0 International Public License; additional terms may apply.
The did:tag DID method enables any controller of an HTTP accessible domain or subdomain, or of an email address, to create unique, interoperable, persistent DIDs with minimal dependencies on other technologies or systems. By leveraging a subset of the tagURI specification [RFC4151], the did:tag DID method enables the creation of DIDs which are "unique across space and time while being tractable to humans," without preventing the creation of DIDs which are largely intractable to humans. did:tag DIDs can be resolved either synchronously, via the web, or asynchronously, via email or other defined alternative resolution services.
This document is a draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organization.
The goal of this proposal is to go beyond the already good work done with other DID methods, particularly the did:web method, and address several issues for which satisfactory solutions are not already provided. The key issues addressed here include:
Persistence: It is generally accepted that ideal decentralized identifiers would be memorable, secure from misuse, and globally unique. But, an identifier should also not become less memorable as time passes, or less secure, or less likely to be unique. Thus, to the set of three basic naming qualities, we should add a fourth quality; that of persistence. [WYMANS-TETRAHEDRON]
Unfortunately, as Zooko Wilcox-O'Hearn [ZOOKOS-TRIANGLE] pointed out in 2001, it is not possible to simultaneously optimize all of the base qualities of decentralized identifiers. For example: identifiers may be secure, global, and even likely to remain so for quite some time, perhaps by using very long cryptographic hash functions to mint them, but such names are typically not very memorable, at least not by human beings. Thus, our process for creating names needs to incorporate a tradeoff between the various desirable attributes of ideal identifiers.
Web DIDs do a good job of addressing three of the desirable qualities of a decentralized identifier. [WEB-DID] The DID Document provides the data needed to make them secure, the ability to structure them with human readable components allows them to be memorable, and their linkage to DNS records provides an ability to ensure that they are unique by limiting the number of those who can mint them.
did:web:example.com:user:alice
However, while an issuer of Web DIDs may work hard to ensure that duplicate DIDs are not issued, maintaining uniqueness over time can be challenging. A Web DID might be issued to a user named Alice in one year, but then Alice may cease to become a user in some future year. Once that happens, some new Alice may wish to have the simple, memorable identifier "user:alice," but be told that that identifier was issued to a long-gone user in some previous year. Alternatively, the new Alice may be assigned the name she desires, thus causing potential confusion for all those who once interacted with the old Alice. Of course, domains tend to change owners over time and a domain owner may not even be aware that there had once been another Alice.
These issues of identifier persistence were considered and addressed in the preparation of the IETF's tagURI scheme. [RFC4151] The solution was to define a scheme, very much like that used for Web DIDs, but with an added component that specifies a date during which the issuer of the identifier claims to have had authority to use the domain name incorporated within the name. Using tagURIs, it is becomes possible to create only slightly less memorable names for multiple Alice's at different times. For instance, the following are several possible tagURIs that might identify different Alice's without conflict. Each of these DID could be minted by a different issuer without a need to know of any earlier issuer who might have had authority to use the same domain name. Each of these DIDs might also have been minted by the same Alice -- although it would generally be preferred if users were consistent in the DIDs they use.
tag:example.com,2000:user:alice
tag:example.com,2050:user:alice
tag:example.com,2090-10-15:user:alice
tag:example.com,2090-10-16:user:alice
In order to gain the benefits of persistence provided by tagURIs, this proposal describes a DID method that relies on tagURIs as its base rather than the web URLs which were the focus of the Web DID.
Enabling all to be issuers: Ideally, everyone would be able to generate useful DIDs without needing to rely on other issuers or needing to invest in complex technical capabilities such as those provided by virtue of obtaining a DNS domain name and operating a web site. Unfortunately, most existing DID methods assume that an issuer has ready access to capabilities that are not commanded by the vast majority of users. Even something as "simple" as registering domain name and maintaining a web site to host DID documents is far beyond the capacity of many. Nonetheless, individuals will often need to generate identifiers.
While only a small percentage of those who may need to issue DIDs maintain, or could maintain, their own web sites, almost every user of the Internet has a unique email address that can be used to exchange content with others. And, crude as it may seem, the email protocol provides much the same ability to engage in "request/response" exchanges as is provided by the HTTP and similar protocols. Thus, the needs of users without web sites could be addressed by providing a mechanism for minting DIDs from tagURIs which incorporate an email address rather than a domain name. For instance, the following are valid tagURIs incorporating email addresses:
tag:john@example.com,2000:sender_key
tag:paul@example.com,2021:living_room_tv
tag:admin@example.com,2022:
tag:lookup@example.com,2022:vp_sales
Each of these tagURIs can be easily converted into a DID, using the tag
method, by simply prepending the text did:.
The simplest way to support such email-based DIDs would be to define a
resolution method that allows one to send an appropriately structured
email message to the specified address. The appropriate response to such
a message would be another email message containing the requested DID
Document as an attachment. Such a system could be implemented by having
custom software monitor and respond to messages sent to a particular
email inbox. It could also be implemented using completely manual means.
A "john@example.com" might receive a message with a subject of
RESOLVE: did:tag:john@example.com,2000:sender_key and know
that the desired response was an email with the corresponding DID
document as an attachment. With only a little difficulty, the
appropriate response could be prepared and sent.
Asynchronous Resolution: An email based DID resolution method, unlike a web-based method, allows asynchronous DID resolution. In some cases, the resolution might occur hours, days, even weeks after a resolution request was made. But, even a very slow response might actually be the fastest possible response. An asynchronous resolution capability would be particularly useful in environments when connectivity is difficult to maintain or where bandwidth is very slow. As an extreme example, it is very unlikely that one would be successful in using https to fetch a DID document from a web server in New York City if one were making the request from a habitat on Mars or one of its moons.
Alternative DID resolution mechanisms. Just as web addresses can sometimes be temporarily unavailable due to technical issues, a web address's availability is sometimes limited by local or regional administrative policy. One's employer, or one's government, might block web access to sites that traffic in either pornography or discussions of human rights and liberty. However, even though a user may be blocked from directly accessing a web site, and thus from resolving DIDs normally resolved by doing so, it is often the case that it is possible to exchange email with addresses on that site, if only because email doesn't require direct, point-to-point connections. Thus, it is useful to define a mechanism by which even a normally web-accessible DID document could be retrieved via indirect, asynchronous email protocols. In order to provide this mechanism, I propose that an ``AltResolution'' service be provided as a means to inform users of an alternative to web-based DID resolution that may be employed when web-based resolution is ineffective.
The tag DID method specification conforms to the requirements specified in the Decentralized Identifiers v1.0 Specification [DID-CORE]. For more information about DIDs and DID method specifications, please also see the [DID-PRIMER]
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words MUST and SHOULD in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
{
"@context": "https://www.w3.org/ns/did/v1",
"id": "did:tag:example.com,2021-10-26:Bob",
"verificationMethod": [{
"id": "did:tag:example.com,2021:faHiOpRlPVQcY_-tA4A",
"type": "JsonWebKey2020",
"controller": "did:tag:example.com,2021:123",
"publicKeyJwk": {
"crv": "Ed25519",
"x": "VCpo2LMLhn6iWku8MKvSLg2ZAoC-nlOyPVQaO3FxVeQ",
"kty": "OKP",
"kid": "_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A"
}
}],
"service": [{
"id": "did:tag:example.com,2021:asynch",
"type": "AltResolution",
"serviceEndpoint": "mailto:did@example.com"
}],
}
The target system of the tag DID method is either:
The namestring that shall identify this DID method is:
tag. A DID that uses this method MUST begin with the
following prefix: did:tag. Per the DID specification,
this string MUST be in lowercase. The remainder of the DID, after the
prefix, is specified below.
The syntax of a did:tag method specific identifier is a subset of tagURI syntax as defined in [RFC4151]. The following constraints are applied in order to avoid conflict with DID URLs:
The modified and constrained abnf for tagURIs supported as components of DIDs using this method appears below:
tag-did = "did:" tagURI_subset tagURI_subset = "tag:" taggingEntity ":" specific taggingEntity = authorityName "," date authorityName = DNSname / emailAddress date = year ["-" month ["-" day]] year = 4DIGIT month = 2DIGIT day = 2DIGIT DNSname = DNScomp *( "." DNScomp ) ; see RFC 1035 DNScomp = alphaNum [*(alphaNum /"-") alphaNum] emailAddress = 1*(alphaNum /"-"/"."/"_") "@" DNSname alphaNum = DIGIT / ALPHA specific = *( pchar / ":" ) ; pchar from RFC 3986
The tagURI syntax pchar definition prevents the use of some email addresses. This should be addressed. Ideally, allowed characters would include all those allowed by RFC 2822/5322, however, that would conflict with the DID specification which supports a smaller set of characters. The conflict could be resolved by requiring that all characters other than ALPHA, DIGIT, ".", and "-" must be %-encoded or otherwise escaped. While that may be a solution, it is not ideal.
did:tag:example.com,2021:Alice did:tag:example.com,2021:Bob did:tag:example.com,2021:user:Alice did:tag:www.example.com,2021:user:Alice did:tag:example.com,2021-10-26:C2AVvLMv6gmMNam3uVAjZpfkcJCwD did:tag:yaml.org,2002:int did:tag:did@example.com,2021:Bob
Creating a web-accessible DID is done by:
.well-known URL if it represents the
entire domain, or under the specified path if many DIDs will be
resolved in this domain.
For example, for the domain name www.example.com, the domain
global DID document will be available under the following URL:
did:tag:www.example.com: -> https://www.example.com/.well-known/didtag.json
Because this DID contains no date element, it is read as equivalent to a similar DID that does include the current date and time.
If optional specific data is provided within the tagURI, the DID Document will be available under the specified path:
did:tag:www.example.com,2021:alice -> https://www.example.com/alice/didtag-2021.json did:tag:www.example.com,2021-11-01:user:alice -> https://www.example.com/user/alice/didtag-2021-11-01.json
The following steps MUST be executed to resolve the DID document from a tag DID whose tagURI authorityName is a DNSname:
https://.
/.well-known/ to the HTTPS URL.
didtag to the string..json to complete the URL.GET request to the URL using an
agent that can successfully negotiate a secure HTTPS connection,
which enforces the security requirements as described in
2.5 Security and privacy considerations.
GET request, the client SHOULD utilize [RFC8484] in
order to prevent Man-in-the-middle attacks as well as to prevent
tracking of the lookup.
The following steps MUST be executed to resolve the DID document for a tag DID whose tagURI authorityName is an emailAddress:
A properly formatted email message might look like:
From: bob@example.com
To: alice@example.com
Subject: RESOLVE: did:tag:alice@example.com,2022:public_key
Alice, I'd like to be able to send you encrypted messages. Please
send the appropriate DID document as an attachment to your reply.
Yours,
bob
Please note that when a DID document is updated, the DID will remain the same, but the contents of the DID document will change, e.g., by including a new verification key or adding service endpoints.
Please note that this DID method does not specify any authentication or authorization mechanism for writing to the DID Document. It is left to implementations to protect DID documents from unauthorized modification.
To delete the DID document, it has to be removed or has to be rendered no longer publicly available due to some other means.
This section is non-normative.
When optional tagURI specific data is used to resolve DID documents rather than just a bare taggingEntity, verification with signed data proves that the entity in control of DID document has the private keys. It neither proves nor implies that the operator of the service identified by the authorityName has the private keys.
This example:
did:tag:example.com,2020:u:bob
resolves to the DID document at:
https://example.com/u/bob/didtag-2020.json
In this scenario, it is probable that example.com has given user Bob control over the DID document to which the DID resolves, and proofs of control refer to Bob rather than all of example.com.
It is important to recognize that a single entity may have any number of DIDs that may or may not be functionally equivalent. There is also no implication that any one DID should be considered ``authoritative."
This section is non-normative.
A reference implementation will be provided at some future time if there is any indication that doing so would be useful.