-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
706 lines (667 loc) · 29.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>did:dns Method Specification</title>
<script src="https://www.w3.org/Tools/respec/respec-w3c" async class="remove"></script>
<script class="remove">
var respecConfig = {
specStatus: "unofficial",
shortName: "did-method-dns",
group: "credentials",
editors: [{
name: "Markus Sabadello",
url: "https://www.linkedin.com/in/markus-sabadello-353a0821",
company: "Danube Tech",
companyURL: "https://danubetech.com/",
w3cid: 46729
}],
authors: [
{
name: "Markus Sabadello",
url: "https://www.linkedin.com/in/markus-sabadello-353a0821",
company: "Danube Tech",
companyURL: "https://danubetech.com/",
w3cid: 46729
}],
github: "https://github.com/danubetech/did-method-dns",
localBiblio: {
"DID-PRIMER": {
title: "DID Primer",
href: "https://github.com/WebOfTrustInfo/rebooting-the-web-of-trust-fall2017/blob/master/topics-and-advance-readings/did-primer.md",
authors: [
"Drummond Reed",
"Manu Sporny",
],
publisher: "Rebooting the Web of Trust 2017"
},
"DID-WEB": {
title: "did:web Method Specification",
href: "https://w3c-ccg.github.io/did-method-web/",
editors: [
"Michael Prorock",
"Orie Steele",
"Oliver Terbu"
],
status: "Draft Community Group",
publisher: "W3C Credentials Community Group"
},
"DID-KEY": {
title: "did:key Method Specification",
href: "https://w3c-ccg.github.io/did-method-key/",
editors: [
"Manu Sporny",
"Dmitri Zagidulin",
"Dave Longley",
"Orie Steele"
],
status: "Unofficial Draft",
publisher: "W3C Credentials Community Group"
},
"DID-IN-DNS": {
title: "The Decentralized Identifier (DID) in the DNS",
href: "https://tools.ietf.org/html/draft-mayrhofer-did-dns-01",
authors: ["A. Mayrhofer", "D. Klesev", "M. Sabadello"],
status: "Internet Draft",
publisher: "IETF"
},
"WELL-KNOWN-DID": {
title: "Well Known DID Configuration",
href: "https://identity.foundation/specs/did-configuration/",
editors: [
"D. Buchner",
"O. Steele",
"T. Looker"
],
status: "Approved Deliverable",
publisher: "DIF"
},
"DNSSEC": {
title: "Well Known DID Configuration",
href: "https://identity.foundation/specs/did-configuration/",
editors: [
"D. Buchner",
"O. Steele",
"T. Looker"
],
status: "Approved Deliverable",
publisher: "DIF"
}
},
};
</script>
</head>
<body>
<section id="abstract">
<p>
Many early DID methods were based on distributed ledgers or other decentralized infrastructure, and some of
those still remain popular. However, the DID community has also seen a lot of innovation and has come up with
new types of DID methods. One of them is <code>did:web</code>, which is based on traditional DNS and web
server infrastructure. The DID method presented here is <code>did:dns</code>, which follows a similar
idea but offers several improvements over <code>did:web</code>.
</p>
</section>
<section id="sotd">
</section>
<section>
<h1>
Introduction
</h1>
<section>
<h2>
Preface
</h2>
<p>
The <code>did:dns</code> 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]].
</p>
</section>
<section id="conformance">
<!-- This section is filled automatically by ReSpec. -->
</section>
<section>
<h2>
Example
</h2>
<pre class="example nohighlight" title="Example DIDs">
did:dns:danubetech.com
did:dns:support.examplecompany.com
</pre>
<pre class="example" title="Example DNS zone file entry">
_key1._did.danubetech.com. IN URI 100 10 "did:key:z6MkjvBkt8ETnxXGBFPSGgYKb43q7oNHLX8BiYSPcXVG6gY6"
</pre>
<pre class="example" title="Example DID document">
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/x25519-2020/v1",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "did:dns:danubetech.com",
"verificationMethod": [
{
"type": "Ed25519VerificationKey2020",
"publicKeyMultibase": "z6MkjvBkt8ETnxXGBFPSGgYKb43q7oNHLX8BiYSPcXVG6gY6",
"id": "did:dns:danubetech.com#z6MkjvBkt8ETnxXGBFPSGgYKb43q7oNHLX8BiYSPcXVG6gY6",
"controller": "did:dns:danubetech.com"
}
],
"authentication": [
"did:dns:danubetech.com#z6MkjvBkt8ETnxXGBFPSGgYKb43q7oNHLX8BiYSPcXVG6gY6"
],
"assertionMethod": [
"did:dns:danubetech.com#z6MkjvBkt8ETnxXGBFPSGgYKb43q7oNHLX8BiYSPcXVG6gY6"
],
"capabilityInvocation": [
"did:dns:danubetech.com#z6MkjvBkt8ETnxXGBFPSGgYKb43q7oNHLX8BiYSPcXVG6gY6"
],
"capabilityDelegation": [
"did:dns:danubetech.com#z6MkjvBkt8ETnxXGBFPSGgYKb43q7oNHLX8BiYSPcXVG6gY6"
],
"keyAgreement": [
{
"type": "X25519KeyAgreementKey2020",
"publicKeyMultibase": "z6LShpe5Jrd7ia4pvPRjqx8HXYGJxKWGyF1bWtCmD2j48X6s",
"id": "did:dns:danubetech.com#z6LShpe5Jrd7ia4pvPRjqx8HXYGJxKWGyF1bWtCmD2j48X6s",
"controller": "did:dns:danubetech.com"
}
]
}
</pre>
</section>
</section>
<section>
<h1>
did:dns Method Specification
</h1>
<section>
<h2>
Target system
</h2>
<p>
The target system of the <code>did:dns</code> method is the Domain Name System (DNS), or more specifically,
the set (or chain) of DNS zone files controlled by the authoritative DNS servers of the domain
name that is the method-specific identifier in the DID.
</p>
</section>
<section>
<h2>
Method name
</h2>
<p>
The method name that shall identify this DID method is: <code>dns</code>.
A DID that uses this method MUST begin with the following prefix:
<code>did:dns</code>. Per the DID specification, this string MUST be in
lowercase.
</p>
</section>
<section>
<h2>
Method-specific identifier
</h2>
<p>
The method specific identifier is a fully qualified domain name.
The formal rules describing valid domain name syntax are described in
[[RFC1035]], [[RFC1123]], and [[RFC2181]].
</p>
<p>
The domain name name may consist of an arbitrary number of subdomains.
</p>
<pre class="nohighlight">
dns-did = "did:dns:" domain-name
</pre>
</section>
<section>
<h2>
DID method operations
</h2>
<section>
<h3>
Create
</h3>
<p>
Creating a DID is done by:
</p>
<ol>
<li>
Registering a domain name or subdomain via traditional means (e.g. using the services
of a domain name registrar, who in turn may use EPP or other protocols).
</li>
<li>
Configuring the domain name's authoritative DNS zone file to include Resource Records (RRs) following
the patterns described in the <a href="#resolve"></a> section.
</li>
</ol>
</section>
<section>
<h3>
Resolve
</h3>
<p>
The following steps MUST be executed to resolve a DID to a DID document using the
<code>did:dns</code> method.
</p>
<ol>
<li>
Create an empty DID document, called the <var>resolved DID document</var>.
</li>
<li>
Set the value of the <code>id</code> property of the <var>resolved DID document</var> to
the DID that is being resolved.
</li>
<li>
Resolve the domain name in the DID's method-specific identifier to look up
Resource Records (RRs) associated with the domain name.
<p class="note">
This step SHOULD use DNSSEC and other security mechanisms. See
sections <a href="#relation-to-dnssec"></a> and
<a href="#security-considerations"></a>.
</p>
</li>
<li>
If the domain name does not exist, the DID is considered to not exist either, and a
<code>notFound</code> error MUST be returned by the resolution process, as defined in
[[DID-CORE]].
</li>
<li>
Look up RRs matching the following conditions, and follow the corresponding rules to construct
the <var>resolved DID document</var>:
<ul>
<li>
Verification Methods: For each RR that meets the following conditions:
<ol>
<li>
The value of the <strong>TYPE</strong> field is <code>URI</code>.
</li>
<li>
The value of the <strong>NAME</strong> field matches the following pattern:
<pre>
_<id>._did.<method-specific-id>.
</pre>
</li>
<li>
The value of the <strong>RDATA</strong> field is a string that is a
<code>did:key</code> DID according to the [[DID-KEY]] specification.
</li>
</ol>
Perform the following steps:
<ol>
<li>
Resolve the DID in the <strong>RDATA</strong> field to a DID document, according
to the [[DID-KEY]]
specification. The result is called the <var>verification method DID document</var>.
</li>
<li>
Copy the verification method from the <var>verification method DID document</var>
to the <var>resolved DID document</var>. This is called the
<var>resolved verification method</var>.
</li>
<li>
Set the value of the <code>id</code>
property in the <var>resolved verification method</var> as follows, using the
<code><id></code> part of the value of the <strong>NAME</strong> field:
<pre>
"id": "<input-did>#<id>"
</pre>
</li>
<li>
Set the value of the <code>controller</code>
property in the <var>resolved verification method</var> as follows:
<pre>
"controller": "<input-did>"
</pre>
</li>
<li>
Construct appropriate verification relationships (<code>authentication</code>,
<code>assertionMethod</code>) in the <var>resolved DID document</var>.
The value of the verification relationship is a set
containing the value of <code>id</code> property of the
<var>resolved verification method</var>.
<p class="issue" data-number="7">
TODO: Need to decide if/how to explicitly express verification relationships
(<code>authentication</code>, <code>assertionMethod</code>, etc.).
</p>
</li>
</ol>
</li>
<li>
Services: For each RR that meets the following conditions:
<ol>
<li>
The value of the <strong>TYPE</strong> field is <code>URI</code>.
</li>
<li>
The value of the <strong>NAME</strong> field matches the following pattern:
<pre>
_<id>._<type>._did.<method-specific-id>.
</pre>
</li>
<li>
The value of the <strong>RDATA</strong> field is any valid URI, EXCEPT
a <code>did:key</code> DID.
</li>
</ol>
Perform the following steps:
<ol>
<li>
Construct a service property in the <var>resolved DID document</var>. This is called
the <var>resolved service</var>.
</li>
<li>
Set the value of the <code>id</code>
property in the <var>resolved service</var> as follows, using the
<code><id></code> part of the value of the <strong>NAME</strong> field:
<pre>
"id": "<input-did>#<id>"
</pre>
</li>
<li>
Set the value of the <code>type</code>
property in the <var>resolved service</var> to the <code><type></code> part
of the value of the <strong>NAME</strong> field.
</li>
<li>
Set the value of the <code>serviceEndpoint</code>
property in the <var>resolved service</var> to the
value of the <strong>RDATA</strong> field.
</li>
</ol>
</li>
<li>
All other RRs MUST be ignored during the DID document construction step.
</li>
</ul>
</li>
</ol>
</section>
<section>
<h3>
Update
</h3>
<p>
To update the DID document, the domain name's authoritative DNS zone file is updated with Resource
Records (RRs) that follow the patterns described in the <a href="#resolve"></a> section.
</p>
<p class="note">
See considerations in <a href="#did-document-updates"></a>.
</p>
</section>
<section>
<h3>
Deactivate
</h3>
<p>
To deactivate the DID document, the domain is deleted.
</p>
<p class="note">
See considerations in <a href="#did-document-deactivation"></a>.
</p>
<p class="issue" data-number="6">
Discuss if there should be a way to explicitly mark a domain name as "deactivated".
</p>
</section>
</section>
</section>
<section class="informative">
<h2>
Relation to other technologies
</h2>
<section>
<h3>
Relation to the did:web method
</h3>
<p>
Similar to this specification, [[?DID-WEB]] also defines a new DID method based on domain names. The syntax
of the identifiers is equivalent with the exceptions that 1. the method name in this specification is
<code>dns</code> instead of
<code>web</code>, and 2. the <code>did:web</code> method also allows an optional colon-separated path
component as part of its method-specific identifier, which is not supported by this specification. In terms
of functionality, the main difference between the two methods is that while the <code>did:web</code>
method requires both DNS and web infrastructure for its operation, the <code>did:dns</code> method requires
only DNS infrastructure.
</p>
</section>
<section>
<h3>
Relation to DID-in-DNS
</h3>
<p>
The [[?DID-IN-DNS]] specification also provides a way to connect existing DNS infrastructure with DIDs. It
uses similar Resource Records (RRs). It
however does not define a new DID method specification; rather, it defines a way of discovering a DID
(using any DID method) from a domain name, using the DNS infrastructure and protocol. This is intended for
use cases where a domain name is used for bootstrapping initial relationships or interactions, but the
domain name is not intended to be used beyond such an initial step.
</p>
</section>
<section>
<h3>
Relation to Well Known DID Configuration
</h3>
<p>
Similar to [[?DID-IN-DNS]], the [[?WELL-KNOWN-DID]] specification also does not define a new DID method and
is rather used for discovery of a DID (using any DID method) via an existing domain name.
</p>
<p>
As the discovery
mechanism, it uses a <code>/.well-known/</code> path (see [[RFC8615]]) on a web server in addition to DNS.
</p>
</section>
<section>
<h3>
Relation to DKIM
</h3>
<p>
This specification fulfills a similar purpose as DKIM (see [[RFC6376]]) insofar as it also associates public
keys with domain names, using Resource Records (RRs). However, while DKIM is focused on a single use case
(e-mail), this specification can be used with any service and protocol that supports DIDs.
</p>
<p>
DKIM uses <strong>TXT</strong> RRs, while this DID method specification uses
<strong>URI</strong> RRs.
</p>
<p>
It would be possible to define a DID method that uses DKIM keys directly in a DID document.
However, in this DID method specification, we have chosen to keep DID document keys independent of
DKIM keys.
</p>
</section>
<section>
<h3>
Relation to DNSSEC
</h3>
<p>
Similar to this specification as well as DKIM, DNSSEC (see [[RFC4033]]) also associates public keys with
domain names. DNSSEC does this for the purpose of securing the resolution process of domain names themselves.
It is highly RECOMMENDED that DNSSEC is used when resolving domain names during the <a href="#resolve"></a>
operation.
</p>
<p>
DNSSEC uses <strong>DNSKEY</strong> and other RRs (see [[RFC4034]]), while this DID method specification uses
<strong>URI</strong> RRs.
</p>
<p>
It would be possible to define a DID method that uses DNSSEC keys directly in a DID document.
However, in this DID method specification, we have chosen to keep DID document keys independent of
DNSSEC keys.
</p>
</section>
</section>
<section class="informative">
<h2>
Security considerations
</h2>
<section>
<h3>
DNS Security Considerations
</h3>
<p class="note" title="Applies similarly to did:web">
This section was copied and adapted from the [[?DID-WEB]] specification, since
similar considerations apply in both DID methods.
</p>
<p>
DNS presents many of the attack vectors that enable active security and privacy
attacks on the <code>did:dns</code> method, and it's important that implementors address these
concerns via proper configuration of DNS. For example, without proper security
of the DNS resolution via <a href="https://tools.ietf.org/html/rfc8484">DNS over HTTPS</a> it's possible for
active attackers to intercept the result of the DNS resolution via a Man in the
Middle attack which would point at a malicious server with the incorrect DID
document.
</p>
<p>
Additionally, implementors should be aware of issues presented by a Spoofed DNS
records where the record returned by a malicious DNS Server is inauthentic and
allows the record to be pointed at a malicious server which contains a different
DID Document. To prevent this type of issue, usage of DNSSEC which is defined in
<a href="https://tools.ietf.org/html/rfc4033">RFC4033</a>,
<a href="https://tools.ietf.org/html/rfc4034">RFC4034</a>, and
<a href="https://tools.ietf.org/html/rfc4035">RFC4035</a>.
</p>
</section>
<section>
<h3>
DID Document Integrity Verification
</h3>
<p class="issue" title="Hashlinks">
Add discussion of using <a
href="https://tools.ietf.org/html/draft-sporny-hashlink">Hashlinks</a> and the
<code>hl</code> DID parameter to aid
integrity protection and verification of the DID document.
</p>
</section>
<section>
<h3>
DID Document Auditing and History
</h3>
<p>
The DID operations defined in this specification do not provide an immutable history of changes that is
typical for blockchain/DLT based DID methods, and which can be used for auditing purposes. This can lead
to certain attacks where the DID document is manipulated temporarily, or different DID documents are
presented to different resolvers, without an easy way to detect this behavior.
</p>
<p class="issue">
Add further discussion and possible mitigations.
</p>
</section>
<section>
<h3>
DID Document Updates
</h3>
<p>
Updates to a DID document may not be immediately visible to all resolvers, since standard DNS caching
mechanisms (e.g. TTL values) apply.
</p>
</section>
<section>
<h3>
DID Document Deactivation
</h3>
<p>
If a domain name is deleted, similar to when it is updated, the deletion may not be immediately visible,
since standard DNS caching mechanisms (e.g. TTL values) apply.
</p>
<p>
In some cases, if a domain name is deleted, grace periods may apply during which a domain name can be
restored.
</p>
<p>
If a domain is deleted, it may in the future be registered by another entity. This is known as the
"identifier recycling problem". It means that it cannot be assumed that a DID is a persistent identifier
for the same DID subject.
</p>
</section>
<section>
<h3>
Authorization of DID Operations
</h3>
<p>
Unlike some other DID methods, this one does not use the DID document for
authorization decisions of create/update/deactivate operations on the DID. This depends on
authorization mechanisms of the underlying DNS infrastructure. In other words, the authority to update
the domain name is linked to the authority to update the DID document.
</p>
</section>
<section>
<h3>
Decentralization
</h3>
<p>
The DID Working Group has extensively discussed the meaning of "decentralized" identifiers, and various
aspects of this terms. In a traditional sense, a domain name may not be considered a decentralized
identifier. For further considerations, see [[?DID-RUBRIC]].
</p>
</section>
</section>
<section class="informative">
<h2>
Privacy considerations
</h2>
<section>
<h3>
DNS Privacy Considerations
</h3>
<p class="note" title="Applies similarly to did:web">
This section was copied and adapted from the [[?DID-WEB]] specification, since
similar considerations apply in both DID methods.
</p>
<p>
Due to the nature of the <code>did:dns</code> method relying upon a DNS in order to resolve
the DID, all resolutions of a <code>did:dns</code> identifier have the potential to be
tracked by a DNS provider. To mitigate the
issue of the relying party being tracked when resolving the DID document, the
relying party should look to either use a trusted Universal Resolver service to
gain herd privacy, utilize a VPN service or perform a resolution over the TOR
network. Another emerging solution that will be useful to address this is <a
href="https://tools.ietf.org/html/draft-pauly-dprive-oblivious-doh-03">
draft-pauly-dprive-oblivious-doh-03</a>
</p>
</section>
<section>
<h3>
Domain Name String
</h3>
<p>
The domain name string itself often gives a hint about the identity of the registrant. This is in fact
usually a desired property of human-readable identifiers such as domain names, especially for
organizations.
</p>
<p>
For individuals however, the use of a domain name as a basis for a DID can negatively
impact their privacy, since (unlike other DID methods) it might be possible to learn about the identity
of the subject purely from the DID itself, even without DID resolution or other interaction.
</p>
</section>
<section>
<h3>
Whois Data
</h3>
<p>
The WHOIS protocol (see [[RFC3912]]) typically allows anyone to query DNS registries for human-readable
records about registrants of a domain name. This can be mitigated by domain privacy services that hide
the registrant's information from the WHOIS records.
</p>
</section>
</section>
<section class="appendix informative">
<h1>
Reference implementations
</h1>
<p>
It is expected that the DIF Universal Resolver project will add an implementation (a "driver") that supports
the <code>did:dns</code> method. Other implementations are encouraged as well.
</p>
</section>
<section class="appendix informative">
<h1>
Acknowledgements
</h1>
<p>
The author would like to thank Alexander Mayrhofer of <a href="https://www.nic.at/">nic.at</a> for his
leadership in the [[?DID-IN-DNS]] work as well as advice on this specification and other DNS-related topics
on multiple occasions.
</p>
</section>
</body>
</html>