merge: feat: implement attachLdSignatureForRelays to control signing of Relayed activities (#599) (!579)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/579 Closes #599 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <marie@kaifa.ch>
This commit is contained in:
commit
9de422280f
6 changed files with 36 additions and 6 deletions
|
|
@ -793,6 +793,13 @@ export class ApRendererService {
|
|||
|
||||
@bindThis
|
||||
public async attachLdSignature(activity: any, user: { id: MiUser['id']; host: null; }): Promise<IActivity> {
|
||||
// Linked Data signatures are cryptographic signatures attached to each activity to provide proof of authenticity.
|
||||
// When using authorized fetch, this is often undesired as any signed activity can be forwarded to a blocked instance by relays and other instances.
|
||||
// This setting allows admins to disable LD signatures for increased privacy, at the expense of fewer relayed activities and additional inbound fetch (GET) requests.
|
||||
if (!this.config.attachLdSignatureForRelays) {
|
||||
return activity;
|
||||
}
|
||||
|
||||
const keypair = await this.userKeypairService.getUserKeypair(user.id);
|
||||
|
||||
const jsonLd = this.jsonLdService.use();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue