Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
We Distribute
  1. Home
  2. General Discussion
  3. Another curious #ActivityPub / #MastodonAPI issue.

Another curious #ActivityPub / #MastodonAPI issue.

Scheduled Pinned Locked Moved General Discussion
activitypubmastodonapi
12 Posts 5 Posters 390 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • edent@mastodon.socialE This user is from outside of this forum
    edent@mastodon.socialE This user is from outside of this forum
    edent@mastodon.social
    wrote on last edited by
    #1

    Another curious #ActivityPub / #MastodonAPI issue.

    A Mastodon server is sending me a DELETE message.

    The delete is because a user has been deleted.

    My server tries to validate the HTTP Signature.

    My server looks up the deleted user's main-key.

    The user has been deleted so the public key 404s.

    My server never acknowledges the delete, so the other server keeps sending me the same request.

    So… How do I validate the signature of a deleted user?

    thomasjwebb@mastodon.socialT edent@mastodon.socialE opinionatedgeek@mastodon.socialO gundersen@mastodon.socialG 5 Replies Last reply
    0
    • edent@mastodon.socialE edent@mastodon.social

      Another curious #ActivityPub / #MastodonAPI issue.

      A Mastodon server is sending me a DELETE message.

      The delete is because a user has been deleted.

      My server tries to validate the HTTP Signature.

      My server looks up the deleted user's main-key.

      The user has been deleted so the public key 404s.

      My server never acknowledges the delete, so the other server keeps sending me the same request.

      So… How do I validate the signature of a deleted user?

      thomasjwebb@mastodon.socialT This user is from outside of this forum
      thomasjwebb@mastodon.socialT This user is from outside of this forum
      thomasjwebb@mastodon.social
      wrote on last edited by
      #2

      @Edent ugh it naively makes sense to delete records but unfortunately you always have to keep them around for some period of time and have a flag. I think every developer (myself included) has made this mistake at some point. I'm not sure if it's an issue with AP or just with whichever server implemented this.

      1 Reply Last reply
      0
      • edent@mastodon.socialE edent@mastodon.social

        Another curious #ActivityPub / #MastodonAPI issue.

        A Mastodon server is sending me a DELETE message.

        The delete is because a user has been deleted.

        My server tries to validate the HTTP Signature.

        My server looks up the deleted user's main-key.

        The user has been deleted so the public key 404s.

        My server never acknowledges the delete, so the other server keeps sending me the same request.

        So… How do I validate the signature of a deleted user?

        edent@mastodon.socialE This user is from outside of this forum
        edent@mastodon.socialE This user is from outside of this forum
        edent@mastodon.social
        wrote on last edited by
        #3

        I guess the answer is "I should have saved the user's public key previously"?

        hirvox@mastodon.onlineH edent@mastodon.socialE 2 Replies Last reply
        0
        • edent@mastodon.socialE edent@mastodon.social

          I guess the answer is "I should have saved the user's public key previously"?

          hirvox@mastodon.onlineH This user is from outside of this forum
          hirvox@mastodon.onlineH This user is from outside of this forum
          hirvox@mastodon.online
          wrote on last edited by
          #4

          @Edent Do you really need to validate a request to delete an user that was already deleted? What's the harm of a spoofed request? An unnecessary database lookup leading to DOS? It's not like you're going to delete it twice.

          edent@mastodon.socialE 1 Reply Last reply
          0
          • hirvox@mastodon.onlineH hirvox@mastodon.online

            @Edent Do you really need to validate a request to delete an user that was already deleted? What's the harm of a spoofed request? An unnecessary database lookup leading to DOS? It's not like you're going to delete it twice.

            edent@mastodon.socialE This user is from outside of this forum
            edent@mastodon.socialE This user is from outside of this forum
            edent@mastodon.social
            wrote on last edited by
            #5

            @hirvox How do I know that they are deleted?
            I *guess* that the account 404ing is evidence, but I'm worried it might be a mistake.

            hirvox@mastodon.onlineH 1 Reply Last reply
            0
            • edent@mastodon.socialE edent@mastodon.social

              I guess the answer is "I should have saved the user's public key previously"?

              edent@mastodon.socialE This user is from outside of this forum
              edent@mastodon.socialE This user is from outside of this forum
              edent@mastodon.social
              wrote on last edited by
              #6

              But perhaps the problem is *me*?

              My script just dies on that error. It never responds.

              I'm going to try sending an HTTP 202 status. If that doesn't work, a 200.

              Let's see if that helps!

              1 Reply Last reply
              0
              • edent@mastodon.socialE edent@mastodon.social

                @hirvox How do I know that they are deleted?
                I *guess* that the account 404ing is evidence, but I'm worried it might be a mistake.

                hirvox@mastodon.onlineH This user is from outside of this forum
                hirvox@mastodon.onlineH This user is from outside of this forum
                hirvox@mastodon.online
                wrote on last edited by
                #7

                @Edent Check the logs in case the original deletion was recent. If the logs might have been deleted.. 🤷

                Some big event-sourced systems keep every single event to be able to go back and check, but that kind of forever storage would be illegal in right-of-erasure jurisdictions.

                edent@mastodon.socialE 1 Reply Last reply
                0
                • edent@mastodon.socialE edent@mastodon.social

                  Another curious #ActivityPub / #MastodonAPI issue.

                  A Mastodon server is sending me a DELETE message.

                  The delete is because a user has been deleted.

                  My server tries to validate the HTTP Signature.

                  My server looks up the deleted user's main-key.

                  The user has been deleted so the public key 404s.

                  My server never acknowledges the delete, so the other server keeps sending me the same request.

                  So… How do I validate the signature of a deleted user?

                  opinionatedgeek@mastodon.socialO This user is from outside of this forum
                  opinionatedgeek@mastodon.socialO This user is from outside of this forum
                  opinionatedgeek@mastodon.social
                  wrote on last edited by
                  #8

                  @Edent Happens to my server all the time too.

                  My approach is to check to see if I have that actor profile stored already.

                  * If I do, I'll have the public key so can check the signature.
                  * If I don't, there's nothing for me to do/delete, so I just return OK.

                  But this is because my implementation stores the actor profile for every message it keeps, and I guess that's not generally true for other servers.

                  1 Reply Last reply
                  0
                  • hirvox@mastodon.onlineH hirvox@mastodon.online

                    @Edent Check the logs in case the original deletion was recent. If the logs might have been deleted.. 🤷

                    Some big event-sourced systems keep every single event to be able to go back and check, but that kind of forever storage would be illegal in right-of-erasure jurisdictions.

                    edent@mastodon.socialE This user is from outside of this forum
                    edent@mastodon.socialE This user is from outside of this forum
                    edent@mastodon.social
                    wrote on last edited by
                    #9

                    @hirvox as far as I can tell, the deletion was some time ago - and I don't keep longs for that long.

                    1 Reply Last reply
                    0
                    • edent@mastodon.socialE edent@mastodon.social

                      Another curious #ActivityPub / #MastodonAPI issue.

                      A Mastodon server is sending me a DELETE message.

                      The delete is because a user has been deleted.

                      My server tries to validate the HTTP Signature.

                      My server looks up the deleted user's main-key.

                      The user has been deleted so the public key 404s.

                      My server never acknowledges the delete, so the other server keeps sending me the same request.

                      So… How do I validate the signature of a deleted user?

                      gundersen@mastodon.socialG This user is from outside of this forum
                      gundersen@mastodon.socialG This user is from outside of this forum
                      gundersen@mastodon.social
                      wrote on last edited by
                      #10

                      @Edent would it hurt to just respond ok? If you don't know the user then you don't can't know the message either. If you were told to delete something you don't have, would you error, or just reply that it has been deleted?

                      edent@mastodon.socialE 1 Reply Last reply
                      0
                      • edent@mastodon.socialE edent@mastodon.social

                        Another curious #ActivityPub / #MastodonAPI issue.

                        A Mastodon server is sending me a DELETE message.

                        The delete is because a user has been deleted.

                        My server tries to validate the HTTP Signature.

                        My server looks up the deleted user's main-key.

                        The user has been deleted so the public key 404s.

                        My server never acknowledges the delete, so the other server keeps sending me the same request.

                        So… How do I validate the signature of a deleted user?

                        edent@mastodon.socialE This user is from outside of this forum
                        edent@mastodon.socialE This user is from outside of this forum
                        edent@mastodon.social
                        wrote on last edited by
                        #11

                        @SDF hi - I think your instance might be misconfigured.
                        You keep sending me delete messages for deleted users.
                        I'm replying with HTTP 200 - but you keep sending the same requests over and over again.
                        Is this something you're able to fix?

                        1 Reply Last reply
                        0
                        • gundersen@mastodon.socialG gundersen@mastodon.social

                          @Edent would it hurt to just respond ok? If you don't know the user then you don't can't know the message either. If you were told to delete something you don't have, would you error, or just reply that it has been deleted?

                          edent@mastodon.socialE This user is from outside of this forum
                          edent@mastodon.socialE This user is from outside of this forum
                          edent@mastodon.social
                          wrote on last edited by
                          #12

                          @gundersen True. I've tried returning OK - but the messages keep coming. Very odd!

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          Powered by NodeBB Contributors
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups