From 796a5213a2a2c0792ee3274f5a55e0b538e59472 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Tue, 7 Mar 2023 20:57:10 -0500 Subject: [PATCH] Update ActivityPub resources --- site/posts/2019-09-22-activity-pub-resources.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/site/posts/2019-09-22-activity-pub-resources.md b/site/posts/2019-09-22-activity-pub-resources.md index 3f49cc5..34786b1 100644 --- a/site/posts/2019-09-22-activity-pub-resources.md +++ b/site/posts/2019-09-22-activity-pub-resources.md @@ -10,7 +10,7 @@ slug = "activity-pub-resources" This isn't really going to be a blog most, but more of a collection of tidbits and resources I found helpful in implenting the [ActivityPub integration](/meta/2019/reincarnation/#activity-pub) for the new version of my blog. -This post was last updated on Oct 10, 2019. +This post was last updated on Mar 7, 2023. @@ -19,7 +19,7 @@ This post was last updated on Oct 10, 2019. - Similarly, the [AS 2.0 Vocabulary](https://www.w3.org/TR/activitystreams-vocabulary/) defines all the objects and activities that AP actually uses in practice (and many more that it doesn't). - The [ActivityPub spec](https://www.w3.org/TR/activitypub/) itself is quite useful, despite its many omissions. - There's also [LitePub](https://litepub.social/litepub/), which has some extensions to AP. -- The least useful by far spec is [JSON-LD](https://www.w3.org/TR/json-ld/) which defines how to use JSON to represent linked data and objects graphs. AS2 and AP are both built on this, but if you're going for a simple implementation (or even a complex one), you can entirely ignore this and treat JSON-LD as plain old JSON objects. +- The least useful by far spec is [JSON-LD](https://www.w3.org/TR/json-ld/) which defines how to use JSON to represent linked data and object graphs. AS2 and AP are both built on this, but if you're going for a simple implementation (or even a complex one), you can entirely ignore this and treat JSON-LD as plain old JSON objects. [This](https://tinysubversions.com/notes/reading-activitypub/) is also a helpful resource about how to go about reading the AP specification. @@ -34,6 +34,10 @@ This post was last updated on Oct 10, 2019. - I'd also like to think [my own implementation](https://git.shadowfacts.net/shadowfacts/shadowfacts.net/src/branch/master/lib/activitypub) is fairly approachable (it's about 700 lines of not-too-complicated TypeScript). - Ted Unangst has a collection of [sample data](https://jawn.tedunangst.com/a/R526ZQ49MbYt5J4KpR) which is useful for comparing how different implementations represent things in AP. +### Libraries +- [activitystreams](https://lib.rs/crates/activitystreams) for serializing/deserializing AS2 types in Rust +- [http-signature-normalization](https://lib.rs/crates/http-signature-normalization) for dealing with part of HTTP signatures in Rust + ### Other - For actually testing federation, [ngrok](https://ngrok.com/) is very useful for testing your implementations against others. It creates a tunnel from your local machine to a public domain with HTTPS already setup. Because your code is still running locally, you have access to all your usual debugging tools and can iterate rapidly. - Testing against other implementations running locally (be it on your machine or inside a VM/container) lets you access debug logs and see what the other server is actually receiving, which can be quite useful.