Skip to content

Feature request: Create keypair per user for signing federated requests #16717

Closed
@techknowlogick

Description

@techknowlogick

As a first step towards federation this issue, a small part of federation to be implemented would be to create an RSA keypair per user. Although signing http requests is not required by ActivityPub or ActivityStreams, many implementations verify/expect one.

What a PR would include:

  1. Code to generate RSA key pair
  2. add key pair fields to user struct (allow nullable, as in future we may store remote/federated users in same table, and we of course wouldn't have access to the private part of their keypair)
  3. On user create, add code for generation of keypair so that it is created/saved to DB when a user is created.
  4. migration to add key pair to each user (think about more this due to rand pool exhaustion possibility, perhaps on demand generation is better)
  5. While the user key pair would be stored in the DB, an "instance actor" key could also be generated and stored on disk (similarly to how the jwt key pair is stored).

I have most of a PR ready, and will have it done by the next videoconference, but the first step is creating an issue for the PR to link to.

Related: #14186 (comment)
cc: @pilou- (as agent of Loic)

Metadata

Metadata

Labels

topic/federationtype/proposalThe new feature has not been accepted yet but needs to be discussed first.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions