fep

FEP-bebd: Follow Invites

Summary

This document describes an alternative method of accepting follow requests via an ‘invite code’ intended to be used with Private FEP-1b12 Groups, although it is applicable to any Actor. It further defines an extension of Webfinger to resolve an InviteCode to its corresponding Actor.

Why is this needed?

It is useful to allow some mechanism of joining communities via a secret rather than knowing the Actor ID and having manually accepted requests.

Some use cases include:

Requirements

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this specification are to be interpreted as described in [RFC-2119].

InviteCodes

InviteCode is an ActivityStreams Object that represents a short code used to automatically Approve Follow requests.

It MUST contain the following properties:

The document MAY contain additional properties.

The InviteCode name MAY be user-defined. It is RECOMMENDED that the name is a short, alphanumeric string. If InviteCodes are to be dereferenceable via Webfinger as described below, the name MUST be able to form a valid URL.

As InviteCodes can be dereferenced via Webfinger, they MUST be unique per instance.

Follow Activities using an InviteCode

A Follow activity MAY include the ID of an InviteCode in the instrument field.

{
	"id": "https://example.com/myFollowActivity",
	"type": "Follow",
	"actor": "https://example.com/myActor",
	"object": "https://remote.example/remoteActor",
	"instrument": "https://remote.example/remoteInvite",
}

When an Actor receives a Follow activity containing an InviteCode:

  1. If the Actor does not manually approve follows, the InviteCode is ignored
  2. The Actor MUST ensure that the InviteCode exists and was acknowledged prior to its use
  3. The Actor MAY impose any additional restrictions to the InviteCodes use
  4. If the InviteCode has been deemed valid, an Accept activity is automatically sent for the Follow as would be normal for an Actor not gated by an InviteCode.

If the InviteCode is not valid, a Reject activity SHOULD be sent.

Example Restrictions

This section is non-normative

Activities on InviteCodes

For the purposes of Group moderation by external Actors is it useful to allow modifications to InviteCodes via activities.

When an activity modifying the invites collection of an Actor is received, the Actor MUST ensure that the activity is being performed by an authorised Actor.

The following activities are used to modify the invites collection:

When a Create, Add, Update, or Remove activity is received by an Actor from an unauthorised Actor, the Actor MAY send a Reject(InviteCode), refuse to add it to its invites Collection, and deem the InviteCode invalid for future Follow requests.

InviteCodes MAY be Created without being Added to the invites collection. Such InviteCodes are not discoverable via the collection and therefore can be used as ‘secrets’.

invites Collection

Actors that accept InviteCodes SHOULD include an invites field that resolves to a Collection containing valid InviteCodes for this Actor. If present, the invites Collection MUST be private and only accessible to authorised Actors. The mechanism described by FEP-db0e MAY be used to achieve this.

InviteCode Dereferencing via Webfinger

InviteCodes MAY be dereferenceable via Webfinger.

To prevent InviteCodes colliding with regular Webfinger acct lookups, a new URI scheme invite is defined.

To resolve an InviteCode ABCDE hosted on instance example.com, we can query:

GET https://example.com/.well-known/webfinger?resource=invite:ABCDE@example.com

This will resolve to an InviteCode object which can further be resolved via the attributedTo field to the target Actor.

Authorised Actors

The set of Actors authorised to make changes to an invites collection is up to the specific software controlling the collection.

Some examples include:

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 neighbouring rights to this work.