From d2e96fce59985cf27ab497b60095fb42dcfa1420 Mon Sep 17 00:00:00 2001 From: helge Date: Tue, 18 Apr 2023 23:58:05 +0000 Subject: [PATCH] FEP-612d: Identifying ActivityPub Objects through DNS (#85) Co-authored-by: Helge Reviewed-on: https://codeberg.org/fediverse/fep/pulls/85 Co-authored-by: helge Co-committed-by: helge --- feps/fep-612d.md | 81 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 feps/fep-612d.md diff --git a/feps/fep-612d.md b/feps/fep-612d.md new file mode 100644 index 0000000..7b4c542 --- /dev/null +++ b/feps/fep-612d.md @@ -0,0 +1,81 @@ +--- +authors: Helge +status: DRAFT +dateReceived: 2023-04-18 +--- +# FEP-612d: Identifying ActivityPub Objects through DNS + +## Summary + +In [ActivityPub], objects are identified through their id, which is a dereferenciable URI. For this, one adds a TXT record to DNS with name `_apobjid` and value corresponding to the URI of the ActivityPub object. If a domain name is then passed to a FediVerse application, it can then perform the DNS lookup, and resolve it to the ActivityPub object. + +## Discussion + +This FEP is inspired by [BlueSky], and it gets the FediVerse half of the way there. It allows one to look up the ActivityPub Actor from an associated domain name, it does not address the issue of diplaying the domain name instead of the FediVerse handle. One first step would be to include the domain name in [alsoKnownAs](https://www.w3.org/TR/did-core/#dfn-alsoknownas). Then use some property of the actor to specify, which object to display. + +## Other Mechanisms + +Two other mechanisms to identify ActivityPub objects beside their id are currently in use: + +### Webfinger + +The FediVerse handle `username@domain.tld` is commonly used as an identifier for users on the FediVerse. This handle can be resolved by performing a Webfinger lookup via + +```http +GET https://domain.tld/.well-known/webfinger?resource=acct:username@domain.tld +``` + +the activity pub object is then contained in the link with type `application/activity+json`. + +### HTML Link header + +The second method, that is less commonly used, is to provide a HTML link header of the form + +```html + +``` + +A FediVerse object receiving this HTML as a response to a lookup, can then parse it and use the link to lookup the corresponding object. + +### Content Negotiation + +On a server supporting content negotiation, a request with Accept header "application/activity+json" will be either served or redirected to the corresponding ActivityPub object. The author does not a method to identify where the ActivityPub object is, as it is being directly served. + +## Example of using DNS to identify an ActivityPub object + +The following shows an example configuration for the domain `mymath.rocks` correspond to the actor with FediVerse handle `@helge@mymath.rocks`, i.e. the author, + +```bash +$ dig _apobjid.mymath.rocks + +;; ANSWER SECTION: +_apobjid.mymath.rocks. 7200 IN TXT "https://mymath.rocks/endpoints/SYn3cl_N4HAPfPHgo2x37XunLEmhV9LnxCggcYwyec0" +``` + +The corresponding object being + +```json +{ + "@context": ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1"], + "id":"https://mymath.rocks/endpoints/SYn3cl_N4HAPfPHgo2x37XunLEmhV9LnxCggcYwyec0", + "name":"Helge", + "preferredUsername":"helge", + "summary":"

I like Math, cows, and wrote bovine.

", + "type":"Person", ... +} +``` + +## References + +- [ActivityPub] Christine Lemmer Webber, Jessica Tallon, [ActivityPub](https://www.w3.org/TR/activitypub/), 2018 +- [BlueSky] Jay Graber [Domain Names as Handles in Bluesky](https://blueskyweb.xyz/blog/3-6-2023-domain-names-as-handles-in-bluesky), 2023 + +## 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.