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

[Feature suggestion] Support Delete Actor payload #38

Closed
umonaca opened this issue Jul 18, 2020 · 3 comments
Closed

[Feature suggestion] Support Delete Actor payload #38

umonaca opened this issue Jul 18, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@umonaca
Copy link

umonaca commented Jul 18, 2020

On Mastodon when a user delete their account, or when a developer execute tootctl self-destruct, the server sends out a Delete Actor activity. Currently it's unsupported by the relay, returning 400.

@yukimochi yukimochi added the bug Something isn't working label Jul 27, 2020
@umonaca
Copy link
Author

umonaca commented Jul 28, 2020

The following is a Delete Actor request intercepted with ngrok on a local development machine. It is sent from localhost:3000 to 6e7c3bdc9e25.ngrok.io (which is the same machine but port forwarded to Activity-Relay running at port 8080)

POST /inbox HTTP/1.1

User-Agent: http.rb/4.4.1 (Mastodon/3.2.0rc1; +http://localhost:3000/)

Host: 6e7c3bdc9e25.ngrok.io

Date: Tue, 28 Jul 2020 04:52:30 GMT

Accept-Encoding: gzip

Digest: SHA-256=4ZBxPxe36w+eVZjrytHt1w1Y4bCxVmFDfZt0/UUmum0=

Content-Type: application/activity+json

Signature: keyId="http://localhost:3000/users/admin#main-key",algorithm="rsa-sha256",headers="(request-target) host date digest content-type",signature="5QV/TtofOGXzQk278kiocm7fuq99Zc7ZPY+M/zk/cengf1hAE/jCRJoYk5xmjQAneKCML0jVKQRRQiY/3paLE1KXd7tkeY5T/uBw9gSAAGW1QuxrXDqerQCVeqHpyDbQw2B3TEFRIuwoI+8gYZlf/cMxZYjDGmcmEVNCAx/ICD8zFmxypUJfFv5ILaauMnzw0atxirRczFw/DCb3FUUvFDiNKK13QPoQ/LorRioMpaLXdM6R0Ru0HUsTSvDUcIY4uQi0IVQ3LtRbNMR4aXJ72Kl33zrK6KAZalWD/7XiHxONgCdcXOqabqBD1JEFehZoi/y0uX0ndATPJSYAJce7Eg=="

Content-Length: 751

X-Forwarded-Proto: https

X-Forwarded-For: 67.241.7.98



{"@context":"https://www.w3.org/ns/activitystreams","id":"http://localhost:3000/users/admin#delete","type":"Delete","actor":"http://localhost:3000/users/admin","to":["https://www.w3.org/ns/activitystreams#Public"],"object":"http://localhost:3000/users/admin","signature":{"type":"RsaSignature2017","creator":"http://localhost:3000/users/admin#main-key","created":"2020-07-28T04:52:29Z","signatureValue":"Kmj02PAcA/KbicmRLCj/NRiBO22fcfiIT6ZeOu74c6378bOGSdEaw2hZTckJ3Z0Dau9VWMVC4ZjEAnhGTWaHv3TBHRuyZuYeG3R5YfOe/2a67YaOWlGiGZhSj/kEgGtrHt16Nr2uTAD+eTA7t9tS1uixrhbilGbYXYVIAJsyGslQDTwzWUCr2kD2rb+7tat/hjQIzKM5cc3Go0tugbKKV6YEoI/wvPoj9SEHc/KfCJZLpY/s32a0LTWo6xc6dTxIzKi/ncrpbSzlkkLGzF57Zh4eRGXNdQu0K2Y7C3OFdksbN4tUgAGhxvVGkiTnLe9RFoJo81JBm5mmm1w2ku0pDw=="}}

@umonaca
Copy link
Author

umonaca commented Jul 28, 2020

Note: tootctl self-destruct does not destroy local data, it only mark local accounts as "suspended", which can be easily reverted by an SQL or rails console command. Just set the suspended_at to nil in the accounts table.

@yukimochi
Copy link
Owner

yukimochi commented Jul 28, 2020

I confirmed why self-destruct is not relay successfully.

Reason

The user sent Delete Activity has been gone.
Relay has no user's publickey information so it need confirm per activity (of course has a little cache mechanism).
But user has gone, relay can't retrieve publickey, so it can't confirm the authenticity of object.

Result

This is specification.

Mastodon's self-destruct presuppose receiver has the way to confirm the authenticity of object by only oneself.
Relay's priority is prevent spread spams, so I can't solve this problem.

Note

If the actor's information is reachable from relay, Delete Actor is supported current implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants