Skip to content
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • 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
Brand Logo

fedi wiki

  1. Home
  2. Technical Discussion
  3. Okay, so

Okay, so

Scheduled Pinned Locked Moved Technical Discussion
mastodonactivitypub
7 Posts 5 Posters 20 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.
  • mooooooo@qaf.menM This user is from outside of this forum
    mooooooo@qaf.menM This user is from outside of this forum
    mooooooo@qaf.men
    wrote last edited by
    #1

    Okay, so

    https://docs.joinmastodon.org/spec/security/

    According to resources linked in the #Mastodon docs, it seems that signature validation gets the entire #ActivityPub Actor (thus the `#main-key` which the server is supposed to ignore) and then within the Actor it gets the `publicKey` property.

    Soooo back to the `#main-key` nomenclature, I guess

    mooooooo@qaf.menM julian@activitypub.spaceJ 2 Replies Last reply
    0
    • mooooooo@qaf.menM mooooooo@qaf.men

      Okay, so

      https://docs.joinmastodon.org/spec/security/

      According to resources linked in the #Mastodon docs, it seems that signature validation gets the entire #ActivityPub Actor (thus the `#main-key` which the server is supposed to ignore) and then within the Actor it gets the `publicKey` property.

      Soooo back to the `#main-key` nomenclature, I guess

      mooooooo@qaf.menM This user is from outside of this forum
      mooooooo@qaf.menM This user is from outside of this forum
      mooooooo@qaf.men
      wrote last edited by
      #2

      Implementing your own Fedi server is shit, don't do it, I can't believe I ruined the last 4 days of my life with this

      D 1 Reply Last reply
      0
      • mooooooo@qaf.menM mooooooo@qaf.men

        Okay, so

        https://docs.joinmastodon.org/spec/security/

        According to resources linked in the #Mastodon docs, it seems that signature validation gets the entire #ActivityPub Actor (thus the `#main-key` which the server is supposed to ignore) and then within the Actor it gets the `publicKey` property.

        Soooo back to the `#main-key` nomenclature, I guess

        julian@activitypub.spaceJ This user is from outside of this forum
        julian@activitypub.spaceJ This user is from outside of this forum
        julian@activitypub.space
        wrote last edited by
        #3

        @mooooooo@qaf.men sort of! Mastodon does it that way, where if you request the keyId as identified in the HTTP signature, it returns the entire user object.

        That's what we call a "Mastodon-ism". It's not strictly right, but it is what it is. AP implementations should properly handle it if you return just the publicKey portion alone.

        For example, @evan's tags.pub does this correctly. @test@tags.pub will return the full actor object, but if you query the publicKeyPem, you get this: https://tags.pub/user/test/publickey

        1 Reply Last reply
        0
        • trwnh@mastodon.socialT This user is from outside of this forum
          trwnh@mastodon.socialT This user is from outside of this forum
          trwnh@mastodon.social
          wrote last edited by
          #4

          @julian @mooooooo

          > a "Mastodon-ism". It's not strictly right

          actually it's not wrong, especially when/because the key is a fragment of the returned document.

          you're supposed to get the document and then *find the graph node that matches the input id*.

          i suspect some implementations don't recognize that they need to do this, and they just assume that the key is *always* at $.publicKey.publicKeyPem or at $.publicKeyPem. that's incorrect.

          evan@cosocial.caE 1 Reply Last reply
          0
          • trwnh@mastodon.socialT trwnh@mastodon.social

            @julian @mooooooo

            > a "Mastodon-ism". It's not strictly right

            actually it's not wrong, especially when/because the key is a fragment of the returned document.

            you're supposed to get the document and then *find the graph node that matches the input id*.

            i suspect some implementations don't recognize that they need to do this, and they just assume that the key is *always* at $.publicKey.publicKeyPem or at $.publicKeyPem. that's incorrect.

            evan@cosocial.caE This user is from outside of this forum
            evan@cosocial.caE This user is from outside of this forum
            evan@cosocial.ca
            wrote last edited by
            #5

            @trwnh @julian @mooooooo it's also crappy for caching. Using a standalone document for the key lets you set a far-future expiry header, `Cache-Control: max-age=315360000`. So, clients never need to refetch. If you want to rotate the key, you give a new ID with a new URL.

            1 Reply Last reply
            0
            • mooooooo@qaf.menM mooooooo@qaf.men

              Implementing your own Fedi server is shit, don't do it, I can't believe I ruined the last 4 days of my life with this

              D This user is from outside of this forum
              D This user is from outside of this forum
              dusoft@activitypub.space
              wrote last edited by
              #6

              @mooooooo@qaf.men You can try checking my code:
              https://github.com/nekromoff/mastodon-bots

              1 Reply Last reply
              0
              • mooooooo@qaf.menM This user is from outside of this forum
                mooooooo@qaf.menM This user is from outside of this forum
                mooooooo@qaf.men
                wrote last edited by
                #7

                @dusoft Thank you

                1 Reply Last reply
                0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                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