Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it work with Mattermost #2

Open
srosset81 opened this issue Jul 12, 2022 · 1 comment
Open

Make it work with Mattermost #2

srosset81 opened this issue Jul 12, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@srosset81
Copy link
Contributor

Currently the Accept activity returned by Mattermost is rejected with a 401 error.

@srosset81 srosset81 added the enhancement New feature or request label Jul 12, 2022
@srosset81
Copy link
Contributor Author

srosset81 commented Jul 12, 2022

Digest verification fails

Headers:

{
  host: 'passerelles.colibris-outilslibres.org',
  'user-agent': 'http.rb/5.0.4 (Mastodon/3.5.3; +https://framapiaf.org/)',
  'content-length': '2163',
  'accept-encoding': 'gzip',
  'content-type': 'application/activity+json',
  date: 'Tue, 12 Jul 2022 15:47:26 GMT',
  digest: 'SHA-256=gzNmJMzfSiUmGHjmJHE7yMOv2W60+5TtenNy/YKH9pk=',
  signature: 'keyId="https://framapiaf.org/users/srosset#main-key",algorithm="rsa-sha256",headers="(request-target) host date digest content-type",signature="V642qEgrFO9KLaXypXibod99eyX/Z5kwniBPgltGN5J2eTxEdZwnruK8BKpL8kVP0U5W0rsebfmdPXrrGEpSj+jU19Vm7Nb5/+kdijY5DM9MoXwrPNhOV9rBRCeOoxw/9WU/BL9tshLR3ZM1ZMWDALBvo5JY7WtgQc36hVw0AcJQQWrCGMCzFNeduZ/wk2Ttci6/XxwdNS6WKKRrkZvfM4feHeI46l2cfaZravNTx17F/PbArMQTlzjbFQWrKU/7H/QMCyv538tAtz0v/GTsToh9/V39d+XP7j44gN2o/OUtnTUKv9OYDFSBmbOPajOFkL4BN3W7yMhTgGhgCquuVg=="',
  'x-forwarded-for': '88.99.213.22',
  'x-forwarded-host': 'passerelles.colibris-outilslibres.org',
  'x-forwarded-port': '443',
  'x-forwarded-proto': 'https',
  'x-forwarded-server': '61e93ac4d2ee',
  'x-real-ip': '88.99.213.22'
}

Body JSON.stringified:

{"@context":["https://www.w3.org/ns/activitystreams",{"ostatus":"http://ostatus.org#","atomUri":"ostatus:atomUri","inReplyToAtomUri":"ostatus:inReplyToAtomUri","conversation":"ostatus:conversation","sensitive":"as:sensitive","toot":"http://joinmastodon.org/ns#","votersCount":"toot:votersCount"}],"id":"https://framapiaf.org/users/srosset/statuses/108635148588001394/activity","type":"Create","actor":"https://framapiaf.org/users/srosset","published":"2022-07-12T15:46:57Z","to":["https://www.w3.org/ns/activitystreams#Public"],"cc":["https://framapiaf.org/users/srosset/followers"],"object":{"id":"https://framapiaf.org/users/srosset/statuses/108635148588001394","type":"Note","summary":null,"inReplyTo":null,"published":"2022-07-12T15:46:57Z","url":"https://framapiaf.org/@srosset/108635148588001394","attributedTo":"https://framapiaf.org/users/srosset","to":["https://www.w3.org/ns/activitystreams#Public"],"cc":["https://framapiaf.org/users/srosset/followers"],"sensitive":false,"atomUri":"https://framapiaf.org/users/srosset/statuses/108635148588001394","inReplyToAtomUri":null,"conversation":"tag:framapiaf.org,2022-07-12:objectId=60297439:objectType=Conversation","content":"<p>Test encore</p>","contentMap":{"fr":"<p>Test encore</p>"},"attachment":[],"tag":[],"replies":{"id":"https://framapiaf.org/users/srosset/statuses/108635148588001394/replies","type":"Collection","first":{"type":"CollectionPage","next":"https://framapiaf.org/users/srosset/statuses/108635148588001394/replies?only_other_accounts=true&page=true","partOf":"https://framapiaf.org/users/srosset/statuses/108635148588001394/replies","items":[]}}},"signature":{"type":"RsaSignature2017","creator":"https://framapiaf.org/users/srosset#main-key","created":"2022-07-12T15:47:08Z","signatureValue":"jDoKmqhuMwtfjhktrfmDzcmPiTSnC2+o6CpZNsTJyMJAoj7iTWPWfWYFv3+hht0WHEwPmGhfh6JlmQc+pClMrFfPOp17RrAvnBT6t1pdfsbmQXD9DzTmA+gtVpV1Jaf/m82IkL0cfWmYXuUgAOv2eFxu2yzw8VS33oMEzSwLDpPCvuu+PAMlT/UdXjNf5OwEDbRfdxe+YXFqgbvEx5AGQVGkkFUY/lOVp9tEvYM1BtpLJawmb56TCNFbtXJ+L/t+Okgd5oud51hpmw6W8Hg3/n8iCaA+USYMFikUy9HxW2MG+AtM8WXiar84MWIZ7ZuaCwQDM8+KAW3RlkuJevtkAQ=="}}

The signature in the body is strange. But even if I remove it, it is still not working. Maybe instead of doing a JSON.stringify, I should get the body itself from the API ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant