This issue has been created
There is 1 update.
 
 
ActivityPub Application / cid:jira-generated-image-avatar-95c3a688-6965-4c79-8012-14e48323d1ca XAP-114 Open

Mastodon rejects the activities sent by XWiki: the HTTP signature keyId is not the id of the actor public key

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-000a6f4f-bcfd-46c0-80d9-f4e981d788ae Manuel Leduc created this issue on 24/Sep/26 12:25
 
Summary: Mastodon rejects the activities sent by XWiki: the HTTP signature keyId is not the id of the actor public key
Issue Type: cid:jira-generated-image-avatar-95c3a688-6965-4c79-8012-14e48323d1ca Bug
Affects Versions: 1.1
Assignee: Unassigned
Created: 24/Sep/26 12:25
Priority: cid:jira-generated-image-static-major-ecc966d9-73e2-4cf4-bdf6-d39b6aa73b69 Major
Reporter: Manuel Leduc
Description:

Problem

Activities sent by XWiki (e.g. a Follow, or a Create carrying a message) are rejected by Mastodon with a 401, so following a Mastodon account or messaging it from XWiki silently fails:

Error when performing [POST] on [https://mastodon.example/users/alice/inbox]:
200 status code expected, got [401] instead with body:
[{"error":"Public key not found for key https://xwiki.example/activitypub/Person/xwiki%253AXWiki.bob"}]

Cause

The actor advertises its public key under the id <actor id>#main-key, but the HTTP signature of the outgoing requests uses the bare actor id as keyId. Mastodon looks the key up by the exact keyId, finds no key with that id and rejects the request.

Fix

Sign with the id of the public key advertised by the actor, falling back to <actor id>#main-key when the actor has no public key id.

Reproduced with Mastodon 4.6.3.

 
 

1 update

 
cid:jira-generated-image-avatar-000a6f4f-bcfd-46c0-80d9-f4e981d788ae Changes by Manuel Leduc on 24/Sep/26 12:25
 
Assignee: Manuel Leduc