mirror of
https://codeberg.org/fediverse/fep.git
synced 2026-08-05 11:46:04 +00:00
FEP-9091: Export Actor Service Endpoint (#353)
Reviewed-on: https://codeberg.org/fediverse/fep/pulls/353 Co-authored-by: Dmitri Zagidulin <dzagidulin@gmail.com> Co-committed-by: Dmitri Zagidulin <dzagidulin@gmail.com>
This commit is contained in:
committed by
silverpill
parent
43dc13de79
commit
a5d315af2f
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"@context": {
|
||||
"@protected": true,
|
||||
"Export": "https://w3id.org/fep/9091#Export"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
---
|
||||
slug: "9091"
|
||||
authors: Dmitri Zagidulin <@dmitri@social.coop>
|
||||
status: DRAFT
|
||||
dateReceived: 2024-07-08
|
||||
discussionsTo: https://socialhub.activitypub.rocks/t/fep-9091-export-actor-service-endpoint/4354
|
||||
---
|
||||
# FEP-9091: Export Actor Service Endpoint
|
||||
|
||||
## Summary
|
||||
|
||||
This FEP defines an API endpoint used to initiate the "Export Actor" operation.
|
||||
The output and semantics of the _result_ of the export operation is out of scope, and left
|
||||
to subsequent FEPs.
|
||||
The endpoint only specifies how to _start_ the operation, and by extension, how to tell if
|
||||
a given Actor's server supports this operation.
|
||||
|
||||
## Data Model: Export Service Endpoint
|
||||
|
||||
Conforming ActivityPub Actor profiles MUST specify their export API endpoints using the
|
||||
`service` descriptor property (inspired by the
|
||||
[DID Core Services](https://www.w3.org/TR/did-core/#services) section, and used in other
|
||||
FEPs such as [FEP-e3e9: Actor Relative URLs][FEP-e3e9]):
|
||||
|
||||
* The expanded `type` of the service descriptor object MUST be `https://w3id.org/fep/9091#Export` (see example below).
|
||||
* The `service` property MUST NOT contain more than one node with the `#Export` type.
|
||||
- If a client encounters multiple service descriptor objects with type ending in
|
||||
`#Export`, the client SHOULD just use the first entry.
|
||||
|
||||
### Example Actor Profile with Export Service Endpoint
|
||||
|
||||
```js
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://www.w3.org/ns/did/v1"
|
||||
],
|
||||
"id": "https://alice-personal-site.example/actor",
|
||||
"type": "Person",
|
||||
"name": "Alice",
|
||||
"service": [{
|
||||
"id": "https://alice-personal-site.example/actor#export",
|
||||
"type": "https://w3id.org/fep/9091#Export",
|
||||
"serviceEndpoint": "https://alice-personal-site.example/actor/accountExport"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
## Protocol: Initiating the Export Actor Operation
|
||||
|
||||
If a client conforming to this FEP wishes to start the 'Export Actor' process, such as to
|
||||
create a backup of the Actor profile, its private key material, and all content associated
|
||||
with this actor, the client MUST perform the following steps:
|
||||
|
||||
1. Fetch the Actor profile object.
|
||||
2. Locate the `service` description object with the expanded `type` equal to `https://w3id.org/fep/9091#Export`.
|
||||
3. Locate the corresponding `serviceEndpoint` URL, in that description object.
|
||||
|
||||
* If no such service description item exists, this means that the server hosting the
|
||||
Actor's profile does not support this operation.
|
||||
|
||||
4. The client makes an HTTP `POST` to the URL in the `serviceEndpoint` to initiate the
|
||||
export operation.
|
||||
|
||||
* The client MUST include appropriate authorization credentials that indicate that
|
||||
it is authorized to perform this operation (that it's authorized to receive the
|
||||
highly private result of account export). The exact format of these authorization
|
||||
credentials is out of scope of this FEP.
|
||||
|
||||
### Example Request and Response
|
||||
|
||||
Example synchronous request (with an empty body) and response:
|
||||
|
||||
```http
|
||||
POST /actor/accountExport HTTP/1.1
|
||||
Host: alice-personal-site.example
|
||||
Authorization: Bearer ....
|
||||
Accept: application/x-tar
|
||||
Content-Length: 0
|
||||
```
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-type: application/x-tar
|
||||
Transfer-Encoding: chunked
|
||||
|
||||
<binary data of the resulting .tar file>
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
* [FEP-e3e9: Actor Relative URLs][FEP-e3e9]
|
||||
|
||||
* Christine Lemmer Webber, Jessica Tallon, [ActivityPub][AP], 2018
|
||||
* S. Bradner, Key words for use in RFCs to Indicate Requirement Levels, 1997
|
||||
* Manu Sporny, Dave Longley, Markus Sabadell, Drummond Reed, Orie Steele, Christopher Allen, [Decentralized Identifiers][DID] (DIDs) v1.0, 2022
|
||||
|
||||
[AP]: https://www.w3.org/TR/activitypub/
|
||||
[DID]: https://www.w3.org/TR/did-core/
|
||||
[FEP-e3e9]: https://codeberg.org/fediverse/fep/src/branch/main/fep/e3e9/fep-e3e9.md
|
||||
|
||||
## Copyright
|
||||
|
||||
CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
||||
|
||||
To the extent possible under law, the authors of this Fediverse Enhancement
|
||||
Proposal have waived all copyright and related or neighboring rights to this work.
|
||||
Reference in New Issue
Block a user