Skip to content

FEP-ef61 vocabulary terms #830

Description

@dahlia

Background

FEP-ef61 defines vocabulary terms needed for portable ActivityPub objects. Fedify needs these terms in @fedify/vocab before applications can construct and parse portable actor and media objects using generated vocabulary classes.

The main terms needed by FEP-ef61 are:

  • gateways, used on portable actors to list the gateway servers where the latest actor document can be retrieved;
  • digestMultibase, used on links or media attachments to carry the SHA-256 digest of an external resource.

FEP-ef61 also uses the JSON-LD context https://w3id.org/fep/ef61.

Proposed work

Add the FEP-ef61 vocabulary terms to @fedify/vocab.

The work should include:

  • adding the https://w3id.org/fep/ef61 context to the runtime context loader if needed;
  • adding a gateways property for actor types;
  • adding a digestMultibase property for link and media attachment types where it is needed by the spec;
  • choosing generated property names that match Fedify's existing naming conventions;
  • running vocabulary code generation;
  • updating generated snapshots and exports as needed.

The gateways property should represent an ordered list of HTTP(S) gateway base URIs. FEP-ef61 currently says each gateway item must be an HTTP(S) URI with empty path, query, and fragment components.

The digestMultibase property should be represented as a string value for now. Hashlink parsing and digest verification should be handled in a separate issue.

Scope

This issue is only about adding FEP-ef61 vocabulary terms and generated class support.

It does not include:

  • ap:/ap+ef61: URI parsing or canonicalization;
  • gateway dereferencing;
  • gateway endpoint implementation;
  • hashlink parsing or media digest verification;
  • Object Integrity Proof policy for portable objects;
  • FEP-ae97 client-side signing or registration.

Those should be handled in follow-up issues under #288.

Tests

Add vocabulary regression tests covering parse and serialization behavior.

The tests should cover:

  • parsing an actor with a gateways array;
  • serializing an actor with gateways;
  • preserving gateway order;
  • parsing an attachment or link with digestMultibase;
  • serializing digestMultibase;
  • including or loading the FEP-ef61 context as needed;
  • generated class inspection/snapshot updates as required by the vocabulary test suite.

This should be added as a sub-issue of #288.

Metadata

Metadata

Assignees

Labels

Fields

Priority

High

Effort

Medium

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions