Skip to content

Commit eb34d13

Browse files
authored
Security Consideration -- DID Resolver Clients should detect resolution cycles (#204)
* Security Consideration -- DID Resolver Clients should detect resolution cycles Signed-off-by: Stephen Curran <[email protected]> * Fix capitalization on DID Documents per feedback Signed-off-by: Stephen Curran <[email protected]> * Add note to DID URL Dereferencing section and adjust security considerations section Signed-off-by: Stephen Curran <[email protected]> * Cleaned up normative language in non-normative section. Fixed some ReSpec Signed-off-by: Stephen Curran <[email protected]> * Correct ReSpec Signed-off-by: Stephen Curran <[email protected]> * Fix link to resolution cycles section Signed-off-by: Stephen Curran <[email protected]> * Improve readability Signed-off-by: Stephen Curran <[email protected]> * Updates as per feedback Signed-off-by: Stephen Curran <[email protected]> --------- Signed-off-by: Stephen Curran <[email protected]>
1 parent 3ef6617 commit eb34d13

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

index.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,6 +1345,17 @@ <h2>Dereferencing the Resource</h2>
13451345
<li>Update the <var>selected <a>service endpoint</a> URL</var> to
13461346
the result of the "Reference Resolution" algorithm.</li>
13471347
</ol>
1348+
<div class="note">
1349+
<p>
1350+
Resolving a <a>service endpoint</a> — particularly one that is a DID — might
1351+
result in a <dfn>resolution cycle</dfn>, which is a set of steps that result in
1352+
an infinite loop. For example, a <a>service endpoint</a> might indirectly point
1353+
back through a sequence of resolutions to a previously dereferenced identifier.
1354+
A <a>DID resolver</a> recursively resolving a <a>service endpoint</a> is advised
1355+
to detect and handle such a cycle to prevent an infinite loop or resolution failure.
1356+
For further guidance, see Section <a href="#security-cycles-resolution">Resolution Cycles</a>.
1357+
</p>
1358+
</div>
13481359
</li>
13491360
</ol>
13501361
</li>
@@ -2775,6 +2786,41 @@ <h2>Non-DID Identifiers</h2>
27752786

27762787
</section>
27772788

2789+
<section id="security-cycles-resolution">
2790+
<h2>Resolution Cycles</h2>
2791+
2792+
<p>When a <a>DID resolver</a> client dereferences identifiers and linked resources in a <a>DID document</a>
2793+
especially fields like <code>verificationMethod</code>, <code>controller</code>,
2794+
or <code>alsoKnownAs</code> — it might encounter a <a>resolution cycle</a>.
2795+
These can occur when a <a>DID document</a> references another DID (or URL) that eventually leads
2796+
back to a previously dereferenced identifier, forming a loop. A <a>DID resolver</a> can
2797+
also encounter such a situation when dereferencing a <a>DID URL</a> that references
2798+
a <a>service endpoint</a>.</p>
2799+
2800+
<div class="example" title="Cycle Through Controllers">
2801+
<pre><code>did:example:alice
2802+
└── verificationMethod.controller → did:example:bob
2803+
└── verificationMethod.controller → did:example:alice</code></pre>
2804+
</div>
2805+
2806+
<p><strong><a>DID resolvers</a> and their clients that perform recursive dereferencing
2807+
are expected to expect, detect, and handle such cycles</strong>.</p>
2808+
2809+
<p><strong>Security and performance risks:</strong> If cycles are not detected and mitigated,
2810+
recursive dereferencing could lead to:</p>
2811+
<ul>
2812+
<li><strong>Infinite loops</strong> or <strong>stack overflows</strong> in software.</li>
2813+
<li><strong>Resource exhaustion</strong> (e.g., memory, network, or CPU).</li>
2814+
<li><strong>Denial-of-service (DoS)</strong> vulnerabilities in clients or intermediaries.</li>
2815+
</ul>
2816+
2817+
<p><strong>Mitigation guidance:</strong> Components that recursively
2818+
follow external <a>DID document</a> references are encouraged to
2819+
track identifiers that have already been dereferenced and to detect when a cycle has
2820+
occurred and take appropriate action. In addition, developers might wish to limit
2821+
recursion depth or breadth to reduce the potential attack surface.</p>
2822+
</section>
2823+
27782824
</section>
27792825
<section id="privacy-considerations">
27802826
<h1>Privacy Considerations</h1>

0 commit comments

Comments
 (0)