fep

FEP-fc48: Generic ActivityPub server

Summary

Generic ActivityPub server is a server that implements standard ActivityPub client API or FEP-ae97 client API, and can process any activity (including activities those behavior is not defined in the ActivityPub specification).

Motivation

Most of existing ActivityPub servers are designed for a specific type of application: a micro-blog, a forum, a video sharing service. This leads to a situation where users are expected to have separate accounts for each application type.

Even a server that implements the entirety of ActivityPub specification is limited because it doesn’t support custom activities.

A truly generic server does not have these limitations and can work with any type of client application.

Capabilities

A generic ActivityPub server MUST be able to:

Object classification

A generic server MUST determine the class of an object before processing it. The classification of ActivityPub objects is covered in FEP-2277: ActivityPub core types.

Activities and side effects

A generic server MUST support the following basic activities:

The side effects of these activities are implicit and are defined in the ActivityPub specification.

A generic server can only carry out the side effects of basic activities. Therefore, clients MUST specify the side effects of all other activities as additional activities. Clients can embed them into an activity using the result property, or send them separately.

A generic server MAY support other activity types defined in the ActivityPub specification.

Authentication and authorization

A generic server MUST verify all objects according to the universal authentication and authorization procedures described in FEP-fe34: Origin-based security model.

When processing activities submitted by a client, the server can only check permissions for basic activities. Therefore, recipients SHOULD NOT use the same-origin policy to verify permissions.

Managing collections

A generic server MUST automatically create inbox, outbox and other actor collections defined in the ActivityPub specification after registering an actor.

Other collections MUST be created by clients using Create activities where object is an empty collection.

Examples

Upon receiving a Follow activity, approved by the user, the client is expected to publish an Accept activity and two additional activities representing side effects:

Upon receiving an Accept activity in response to a Follow, the client is expected to publish two additional activities representing side effects:

References

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.