Skip to content
  • 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 (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Technical Discussion
  3. Question re: Origin Based Security Model (FEP-fe34)

Question re: Origin Based Security Model (FEP-fe34)

Scheduled Pinned Locked Moved Technical Discussion
activitypubsecurityfe34fep
16 Posts 4 Posters 1 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.
  • nutomic@lemmy.mlN This user is from outside of this forum
    nutomic@lemmy.mlN This user is from outside of this forum
    nutomic@lemmy.ml
    wrote last edited by
    #2

    We also got the same type of vulnerability reports. Good that you bring it up, because I wasnt aware of the FEP.

    To answer your question we can look at it the other way. Imagine we implement a way to federate admin/moderator status and then check it for every incoming mod action. First of all we get problems with older platforms which dont implement this feature yet, it means all their mod actions will be rejected and we end up with spam. Or we add a way to bypass the check, then the whole security feature becomes pointless.

    Even if we assume that all platforms correctly federate the admin/mod status, there would still be problems. Federation is not perfect, sometimes things get lost. Or someone gets appointed as admin and immediately removes some spam. At this point the admin status is not federated yet (if its part of the user profile and only updated every 24h). Then again valid mod actions are rejected and we end up with spam that is not deleted.

    On the other hand, whats exactly is the exploit here? Some platform lets a normal user (no admin/mod rights) send Update or Delete activites for another user on the same instance. That is clearly not our problem, but its a problem of the remote platform which allows such actions. Besides it cannot affect users from other instances so the impact would be very limited.

    Overall, adding such stricter checks would create more problems than it solves.

    1 Reply Last reply
    1
    0
    • R relay@relay.an.exchange shared this topic
    • thisismissem@activitypub.spaceT This user is from outside of this forum
      thisismissem@activitypub.spaceT This user is from outside of this forum
      thisismissem@activitypub.space
      wrote last edited by
      #3

      Well, yeah, that's why I linked what T&S is doing here to fix the moderator use case. At present I don't know of anyone sending cross-actor delete/update actions, so we'd be adding capability with the moderatedBy

      julian@activitypub.spaceJ 1 Reply Last reply
      0
      • thisismissem@activitypub.spaceT thisismissem@activitypub.space

        Well, yeah, that's why I linked what T&S is doing here to fix the moderator use case. At present I don't know of anyone sending cross-actor delete/update actions, so we'd be adding capability with the moderatedBy

        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
        #4

        @thisismissem hmm, I believe Lemmy and Piefed send cross actor Deletes, but they might be Announces by the group actor.

        They (and I) don't use moderatedBy but rather the group actor's attributedTo

        Just want to make sure you're aware of that existing prior art.

        julian@activitypub.spaceJ 1 Reply Last reply
        0
        • julian@activitypub.spaceJ julian@activitypub.space

          @thisismissem hmm, I believe Lemmy and Piefed send cross actor Deletes, but they might be Announces by the group actor.

          They (and I) don't use moderatedBy but rather the group actor's attributedTo

          Just want to make sure you're aware of that existing prior art.

          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
          #5

          @nutomic@lemmy.ml @rimu@piefed.social @bent0_b0x@norden.social — do y'all send Delete activities with the moderator actor?

          (Announce wrapping aside.)

          rimu@piefed.socialR 1 Reply Last reply
          0
          • julian@activitypub.spaceJ julian@activitypub.space

            @nutomic@lemmy.ml @rimu@piefed.social @bent0_b0x@norden.social — do y'all send Delete activities with the moderator actor?

            (Announce wrapping aside.)

            rimu@piefed.socialR This user is from outside of this forum
            rimu@piefed.socialR This user is from outside of this forum
            rimu@piefed.social
            wrote last edited by
            #6

            Yes.

            This is easy in FEP 1b12-land because each community has a list of moderators so receiving instances know who to allow.

            Getting a list of instance admins requires calling the Lemmy API, unfortunately. So PieFed has a cron job that does that once per day for all instances. Admins rarely change.

            julian@activitypub.spaceJ nutomic@lemmy.mlN 2 Replies Last reply
            0
            • rimu@piefed.socialR rimu@piefed.social

              Yes.

              This is easy in FEP 1b12-land because each community has a list of moderators so receiving instances know who to allow.

              Getting a list of instance admins requires calling the Lemmy API, unfortunately. So PieFed has a cron job that does that once per day for all instances. Admins rarely change.

              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
              #7

              > @rimu@piefed.social said:
              >
              > Getting a list of instance admins requires calling the Lemmy API, unfortunately.

              Wait, why don't we write a mini FEP to extend this? attributedTo on the instance/application actor?

              • https://codeberg.org/fediverse/fep/src/branch/main/fep/2677/fep-2677.md
              • extending 1b12
              rimu@piefed.socialR 1 Reply Last reply
              0
              • julian@activitypub.spaceJ julian@activitypub.space

                > @rimu@piefed.social said:
                >
                > Getting a list of instance admins requires calling the Lemmy API, unfortunately.

                Wait, why don't we write a mini FEP to extend this? attributedTo on the instance/application actor?

                • https://codeberg.org/fediverse/fep/src/branch/main/fep/2677/fep-2677.md
                • extending 1b12
                rimu@piefed.socialR This user is from outside of this forum
                rimu@piefed.socialR This user is from outside of this forum
                rimu@piefed.social
                wrote last edited by
                #8

                That sounds fine to me.

                On communities the moderators are just an array of strings which are the activitypub actor IDs of the mods. I think NodeBB has an array of actor objects though?

                Anyway whatever it is, consistency with how the communities do it would be nice.

                julian@activitypub.spaceJ 1 Reply Last reply
                0
                • rimu@piefed.socialR rimu@piefed.social

                  That sounds fine to me.

                  On communities the moderators are just an array of strings which are the activitypub actor IDs of the mods. I think NodeBB has an array of actor objects though?

                  Anyway whatever it is, consistency with how the communities do it would be nice.

                  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
                  #9

                  > @rimu@piefed.social said:
                  >
                  > I think NodeBB has an array of actor objects though

                  Is this causing problems for you? I can send just the IDs instead.

                  rimu@piefed.socialR 1 Reply Last reply
                  0
                  • julian@activitypub.spaceJ julian@activitypub.space

                    > @rimu@piefed.social said:
                    >
                    > I think NodeBB has an array of actor objects though

                    Is this causing problems for you? I can send just the IDs instead.

                    rimu@piefed.socialR This user is from outside of this forum
                    rimu@piefed.socialR This user is from outside of this forum
                    rimu@piefed.social
                    wrote last edited by
                    #10

                    It's fine, I've already adjusted the code at my end. I don't know about Lemmy though.

                    nutomic@lemmy.mlN 1 Reply Last reply
                    0
                    • rimu@piefed.socialR rimu@piefed.social

                      Yes.

                      This is easy in FEP 1b12-land because each community has a list of moderators so receiving instances know who to allow.

                      Getting a list of instance admins requires calling the Lemmy API, unfortunately. So PieFed has a cron job that does that once per day for all instances. Admins rarely change.

                      nutomic@lemmy.mlN This user is from outside of this forum
                      nutomic@lemmy.mlN This user is from outside of this forum
                      nutomic@lemmy.ml
                      wrote last edited by
                      #11

                      Lemmy doesnt even federate admin status in any way, instead we trust that actions which are coming from the same instance as the community or post are valid. So essentially origin-based security model.

                      1 Reply Last reply
                      1
                      0
                      • rimu@piefed.socialR rimu@piefed.social

                        It's fine, I've already adjusted the code at my end. I don't know about Lemmy though.

                        nutomic@lemmy.mlN This user is from outside of this forum
                        nutomic@lemmy.mlN This user is from outside of this forum
                        nutomic@lemmy.ml
                        wrote last edited by
                        #12

                        Looks like this, only IDs: https://github.com/LemmyNet/lemmy/blob/main/crates/apub/apub/assets/lemmy/collections/group_moderators.json

                        julian@activitypub.spaceJ 1 Reply Last reply
                        1
                        0
                        • nutomic@lemmy.mlN nutomic@lemmy.ml

                          Looks like this, only IDs: https://github.com/LemmyNet/lemmy/blob/main/crates/apub/apub/assets/lemmy/collections/group_moderators.json

                          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
                          #13

                          Right, that's the "Group Moderation" section of FEP 1b12, right?

                          It may be a good idea to extend this concept to the instance/application actor as well. There's no urgent need to implement and consume, but it would be fairly simple thing to serve on our respective softwares I think.

                          nutomic@lemmy.mlN 1 Reply Last reply
                          0
                          • julian@activitypub.spaceJ julian@activitypub.space

                            Right, that's the "Group Moderation" section of FEP 1b12, right?

                            It may be a good idea to extend this concept to the instance/application actor as well. There's no urgent need to implement and consume, but it would be fairly simple thing to serve on our respective softwares I think.

                            nutomic@lemmy.mlN This user is from outside of this forum
                            nutomic@lemmy.mlN This user is from outside of this forum
                            nutomic@lemmy.ml
                            wrote last edited by
                            #14

                            Yes exactly that FEP. Federating admin status would make sense for informational purposes, but rejecting mod actions based on that could cause problems as I mentioned in my previous comment.

                            julian@activitypub.spaceJ 1 Reply Last reply
                            2
                            0
                            • nutomic@lemmy.mlN nutomic@lemmy.ml

                              Yes exactly that FEP. Federating admin status would make sense for informational purposes, but rejecting mod actions based on that could cause problems as I mentioned in my previous comment.

                              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
                              #15

                              > @nutomic@lemmy.ml said:
                              >
                              > but rejecting mod actions based on that could cause problems as I mentioned in my previous comment.

                              So to confirm then, you serve the moderator collection but you don't use it to determine whether an actor is able to modify/delete content on that instance, is that right?

                              Curious to know what those problems are.

                              nutomic@lemmy.mlN 1 Reply Last reply
                              0
                              • julian@activitypub.spaceJ julian@activitypub.space

                                > @nutomic@lemmy.ml said:
                                >
                                > but rejecting mod actions based on that could cause problems as I mentioned in my previous comment.

                                So to confirm then, you serve the moderator collection but you don't use it to determine whether an actor is able to modify/delete content on that instance, is that right?

                                Curious to know what those problems are.

                                nutomic@lemmy.mlN This user is from outside of this forum
                                nutomic@lemmy.mlN This user is from outside of this forum
                                nutomic@lemmy.ml
                                wrote last edited by
                                #16

                                We use the moderator collection. But if that fails we check if the mod is from the same instance as the community or the post/comment being removed. If thats true we also allow the action.

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


                                • Login

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