mirror of
https://codeberg.org/fediverse/fep.git
synced 2026-08-08 13:35:51 +00:00
Deploying from 7377aa17ea [SKIP CI]
This commit is contained in:
+1
-1
@@ -1085,7 +1085,7 @@
|
||||
<tr>
|
||||
<td><a href="../fep/19b3/">FEP-19b3: Specifying Properties of a Service</a></td>
|
||||
<td><a href="https://codeberg.org/fediverse/fep/src/branch/main/fep/19b3/fep-19b3.md"><img src='../assets/codeberg.png' width=20 height=20 alt='codeberg'></a></td>
|
||||
<td>-</td>
|
||||
<td><a href="https://codeberg.org/fediverse/fep/issues/719">#719</a></td>
|
||||
<td><a href="https://socialhub.activitypub.rocks/t/fep-19b3-specifying-properties-of-a-service/8311">Discussions</a></td>
|
||||
<td>2025-11-04</td>
|
||||
</tr>
|
||||
|
||||
@@ -598,6 +598,7 @@
|
||||
<th>Authors</th>
|
||||
<th>Status</th>
|
||||
<th>Date received</th>
|
||||
<th>Tracking issue</th>
|
||||
<th>Discussions</th>
|
||||
<th>Repository</th>
|
||||
</tr>
|
||||
@@ -607,6 +608,7 @@
|
||||
<td>Helge</td>
|
||||
<td><code>DRAFT</code></td>
|
||||
<td>2025-11-04</td>
|
||||
<td><a href="https://codeberg.org/fediverse/fep/issues/719">#719</a></td>
|
||||
<td><a href="https://socialhub.activitypub.rocks/t/fep-19b3-specifying-properties-of-a-service/8311">Discussions</a></td>
|
||||
<td><a href="https://codeberg.org/fediverse/fep/src/branch/main/fep/19b3/fep-19b3.md">codeberg</a></td>
|
||||
</tr>
|
||||
|
||||
+34
-33
@@ -497,6 +497,15 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#comparing-ap-uris" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Comparing 'ap' URIs
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -634,15 +643,6 @@
|
||||
<nav class="md-nav" aria-label="Discussion">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#ap-uri-syntax" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
'ap' URI syntax
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#discovering-locations" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
@@ -800,18 +800,22 @@
|
||||
<p>An <a href="https://www.w3.org/TR/activitypub/">ActivityPub</a> object can be made portable by using an identifier that is not tied to a single server. This proposal describes a new identifier type that has this property and is compatible with the <a href="https://www.w3.org/TR/activitypub/">ActivityPub</a> specification.</p>
|
||||
<h3 id="ap-uris">'ap' URIs<a class="headerlink" href="#ap-uris" title="Permanent link">¶</a></h3>
|
||||
<p>'ap' URI is constructed according to the <a href="https://datatracker.ietf.org/doc/html/rfc3986.html">RFC-3986</a> specification, but with a <a href="https://www.w3.org/TR/did-core/">Decentralized Identifier</a> in place of the authority:</p>
|
||||
<div class="highlight"><pre><span></span><code>ap://did:example:123456/path/to/object?name=value#fragment-id
|
||||
<div class="highlight"><pre><span></span><code>ap://did:example:abcdef/path/to/object?name=value#fragment-id
|
||||
\_/ \________________/ \____________/ \________/ \_________/
|
||||
| | | | |
|
||||
scheme authority path query fragment
|
||||
</code></pre></div>
|
||||
<ul>
|
||||
<li>The URI scheme MUST be <code>ap</code>.</li>
|
||||
<li>The authority component MUST be a valid <a href="https://www.w3.org/TR/did-core/">DID</a>.</li>
|
||||
<li>The authority component MUST be a valid <a href="https://www.w3.org/TR/did-core/">DID</a>. Colons and other reserved characters MAY be <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-2.1">percent-encoded</a>.</li>
|
||||
<li>The path is REQUIRED. It MUST be treated as an opaque string.</li>
|
||||
<li>The query is OPTIONAL. To avoid future conflicts, implementers SHOULD NOT use parameter names that are not defined in this proposal.</li>
|
||||
<li>The fragment is OPTIONAL.</li>
|
||||
</ul>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Warning</p>
|
||||
<p>An 'ap' URI is not a valid <a href="https://datatracker.ietf.org/doc/html/rfc3986.html">RFC-3986</a> URI if reserved characters in the authority component are not percent-encoded. Nevertheless, this form is considered canonical.</p>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>ActivityPub specification <a href="https://www.w3.org/TR/activitypub/#obj-id">requires</a> identifiers to have an authority "belonging to that of their originating server". The authority of 'ap' URI is a DID, which does not belong to any particular server.</p>
|
||||
@@ -820,6 +824,14 @@ scheme authority path query fragment
|
||||
<p class="admonition-title">Warning</p>
|
||||
<p>The URI scheme might be changed to <code>ap+ef61</code> in a future version of this document, because these identifiers are not intended to be used for all ActivityPub objects, but only for portable ones.</p>
|
||||
</div>
|
||||
<h3 id="comparing-ap-uris">Comparing 'ap' URIs<a class="headerlink" href="#comparing-ap-uris" title="Permanent link">¶</a></h3>
|
||||
<p>Two 'ap' URIs are equivalent when their canonical forms are identical.</p>
|
||||
<p>To produce a canonical 'ap' URI, the following operations MUST be performed:</p>
|
||||
<ul>
|
||||
<li>If the URI is a <a href="#compatible-ids">compatible identifier</a>, convert it into an 'ap' URI.</li>
|
||||
<li>If the authority component is percent-encoded, decode it.</li>
|
||||
<li>Remove query component.</li>
|
||||
</ul>
|
||||
<h3 id="did-methods">DID methods<a class="headerlink" href="#did-methods" title="Permanent link">¶</a></h3>
|
||||
<p>Implementers MUST support the <a href="https://w3c-ccg.github.io/did-key-spec/">did:key</a> method. Other DID methods SHOULD NOT be used, as it might hinder interoperability.</p>
|
||||
<div class="admonition note">
|
||||
@@ -847,20 +859,8 @@ scheme authority path query fragment
|
||||
<li>Cryptographic origins are used. They are similar to web origins described in <a href="https://www.rfc-editor.org/rfc/rfc6454.html">RFC-6454</a> but computed using a different algorithm.</li>
|
||||
<li>Authentication via fetching from an origin is not possible. The main authentication method is verification of a signature.</li>
|
||||
</ul>
|
||||
<p>The origin of an 'ap' URI is computed by the following algorithm:</p>
|
||||
<ol>
|
||||
<li>Let <code>uri-scheme</code> be the <code>ap</code> string.</li>
|
||||
<li>Let <code>uri-host</code> be the authority component of the URI.</li>
|
||||
<li>Let <code>uri-port</code> be the number 0.</li>
|
||||
<li>Return the triple <code>(uri-scheme, uri-host, uri-port)</code>.</li>
|
||||
</ol>
|
||||
<p>And the origin of a <a href="https://www.w3.org/TR/did-core/#did-url-syntax">DID URL</a> is computed by the following algorithm:</p>
|
||||
<ol>
|
||||
<li>Let <code>uri-scheme</code> be the <code>ap</code> string.</li>
|
||||
<li>Let <code>uri-host</code> be the DID component of the DID URL.</li>
|
||||
<li>Let <code>uri-port</code> be the number 0.</li>
|
||||
<li>Return the triple <code>(uri-scheme, uri-host, uri-port)</code>.</li>
|
||||
</ol>
|
||||
<p>The origin of an 'ap' URI is identical to the authority component of its canonical form (i.e. it is a DID without percent encoding).</p>
|
||||
<p>The origin of a <a href="https://www.w3.org/TR/did-core/#did-url-syntax">DID URL</a> is identical to its <code>did</code> component.</p>
|
||||
<p>Actors, activities and objects identified by 'ap' URIs MUST contain <a href="https://codeberg.org/fediverse/fep/src/branch/main/fep/8b32/fep-8b32.md">FEP-8b32</a> integrity proofs. Collections identified by 'ap' URIs MAY contain integrity proofs. If collection doesn't contain an integrity proof, <a href="#collections">another authentication method</a> MUST be used.</p>
|
||||
<p>The value of <code>verificationMethod</code> property of the proof MUST be a <a href="https://www.w3.org/TR/did-core/#did-url-syntax">DID URL</a> where the DID matches the authority component of the 'ap' URI.</p>
|
||||
<div class="admonition note">
|
||||
@@ -906,17 +906,21 @@ scheme authority path query fragment
|
||||
<li><code>https://server1.example</code></li>
|
||||
<li><code>https://server2.example</code></li>
|
||||
</ul>
|
||||
<p>Implementations MUST discard query parameters when comparing 'ap' URIs and treat URIs with different query parameter values as equal.</p>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Important</p>
|
||||
<p>When comparing 'ap' URIs, query parameters are discarded and canonical URIs are used.</p>
|
||||
</div>
|
||||
<h3 id="inboxes-and-outboxes">Inboxes and outboxes<a class="headerlink" href="#inboxes-and-outboxes" title="Permanent link">¶</a></h3>
|
||||
<p>Servers and clients use gateways to deliver activities to inboxes or outboxes. Servers specified in the <code>gateways</code> property of an actor object MUST accept POST requests targeting its inbox and outbox collections.</p>
|
||||
<p>Portable inboxes and outboxes function as described in the <a href="https://www.w3.org/TR/activitypub/">ActivityPub</a> specification. These endpoints are also used to synchronize activities between gateways used by an actor.</p>
|
||||
<p>Servers specified in the <code>gateways</code> property of an actor object MUST accept POST requests targeting its inbox collection.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight"><pre><span></span><code>POST https://social.example/.well-known/apgateway/did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2/actor/inbox
|
||||
</code></pre></div>
|
||||
<p>Activities delivered to an inbox might be not portable. If the server does not accept deliveries on behalf of an actor, it MUST return <code>405 Method Not Allowed</code>.</p>
|
||||
<p>Activities delivered to an inbox might be not portable. If the server does not accept deliveries on behalf of an actor, it MUST return <code>404 Not Found</code>.</p>
|
||||
<p>Upon receiving an activity in actor's inbox, the server SHOULD forward it to inboxes located on other servers where actor's data is stored. An activity MUST NOT be forwarded from inbox more than once.</p>
|
||||
<p>Servers specified in the <code>gateways</code> property of an actor object MAY accept POST requests targeting its outbox collection. Such servers MUST implement <a href="https://codeberg.org/fediverse/fep/src/branch/main/fep/ae97/fep-ae97.md">FEP-ae97</a>.</p>
|
||||
<p>Activities delivered to an outbox are performed by a portable actor and therefore MUST be portable too. The server MUST verify them as described in section <a href="#authentication-and-authorization">Authentication and authorization</a> and then process them as described in <a href="https://codeberg.org/fediverse/fep/src/branch/main/fep/ae97/fep-ae97.md">FEP-ae97</a>. Clients MAY deliver activities to multiple outboxes, located on different servers.</p>
|
||||
<p>Upon receiving an activity in actor's outbox, the server SHOULD forward it to outboxes located on other servers where actor's data is stored. An activity MUST NOT be forwarded from outbox more than once.</p>
|
||||
<p>Gateways SHOULD implement <a href="https://codeberg.org/fediverse/fep/src/branch/main/fep/ae97/fep-ae97.md">FEP-ae97</a> actor registration API.</p>
|
||||
<h3 id="collections">Collections<a class="headerlink" href="#collections" title="Permanent link">¶</a></h3>
|
||||
<p>Collections associated with portable actors (such as inbox and outbox collections) MAY not have <a href="https://codeberg.org/fediverse/fep/src/branch/main/fep/8b32/fep-8b32.md">FEP-8b32</a> integrity proofs. Consuming implementations MUST NOT process unsecured collections retrieved from servers that are not listed in the <code>gateways</code> array of the actor document.</p>
|
||||
<h2 id="portable-objects">Portable objects<a class="headerlink" href="#portable-objects" title="Permanent link">¶</a></h2>
|
||||
@@ -970,6 +974,7 @@ scheme authority path query fragment
|
||||
<div class="highlight"><pre><span></span><code>GET https://social.example/.well-known/apgateway/hl:zQmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n
|
||||
</code></pre></div>
|
||||
<h2 id="compatibility">Compatibility<a class="headerlink" href="#compatibility" title="Permanent link">¶</a></h2>
|
||||
<p><a name="compatible-ids"></a></p>
|
||||
<h3 id="identifiers_1">Identifiers<a class="headerlink" href="#identifiers_1" title="Permanent link">¶</a></h3>
|
||||
<p>'ap' URIs might not be compatible with existing <a href="https://www.w3.org/TR/activitypub/">ActivityPub</a> implementations. To provide backward compatibility, gateway-based HTTP(S) URIs of objects can be used instead of their canonical identifiers:</p>
|
||||
<div class="highlight"><pre><span></span><code>https://social.example/.well-known/apgateway/did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2/path/to/object
|
||||
@@ -981,10 +986,6 @@ scheme authority path query fragment
|
||||
<p>WebFinger address of a portable actor can be obtained by the reverse discovery algorithm described in section 2.2 of <a href="https://swicg.github.io/activitypub-webfinger/">ActivityPub and WebFinger</a> report, but instead of taking the hostname from the identifier, it MUST be taken from the first gateway in actor's <code>gateways</code> array.</p>
|
||||
<h2 id="discussion">Discussion<a class="headerlink" href="#discussion" title="Permanent link">¶</a></h2>
|
||||
<p>(This section is non-normative.)</p>
|
||||
<h3 id="ap-uri-syntax">'ap' URI syntax<a class="headerlink" href="#ap-uri-syntax" title="Permanent link">¶</a></h3>
|
||||
<p>'ap' URIs are not valid per <a href="https://datatracker.ietf.org/doc/html/rfc3986.html">RFC-3986</a>. To make them valid, the authority component can be percent-encoded:</p>
|
||||
<div class="highlight"><pre><span></span><code>ap://did%3Akey%3Az6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2/actor
|
||||
</code></pre></div>
|
||||
<h3 id="discovering-locations">Discovering locations<a class="headerlink" href="#discovering-locations" title="Permanent link">¶</a></h3>
|
||||
<h4 id="arbitrary-paths">Arbitrary paths<a class="headerlink" href="#arbitrary-paths" title="Permanent link">¶</a></h4>
|
||||
<p>The <code>gateways</code> array can contain HTTP(S) URIs with a path component, thus enabling discovery based on the <a href="https://indieweb.org/follow_your_nose">"follow your nose"</a> principle, as opposed to discovery based on a <a href="https://datatracker.ietf.org/doc/html/rfc8615">well-known</a> location.</p>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user