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. I think the #ActivityPub client-to-server API is extremely important and underrated.

I think the #ActivityPub client-to-server API is extremely important and underrated.

Scheduled Pinned Locked Moved General Discussion
activitypubfediverse
115 Posts 13 Posters 0 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.
  • mariusor@metalhead.clubM mariusor@metalhead.club

    @steve yes, but something dumb that only fetches a URL and converts the resulting ActivityPub into a valid other type of representation is a valid client in my opinion. That's what I mean, was that unclear?

    @smallcircles @evan

    steve@social.technoetic.comS This user is from outside of this forum
    steve@social.technoetic.comS This user is from outside of this forum
    steve@social.technoetic.com
    wrote last edited by
    #71

    @mariusor @smallcircles @evan I *think* it’s
    clear. I agree it’s a kind of “client”, just not necessarily a C2S client.

    mariusor@metalhead.clubM 1 Reply Last reply
    0
    • smallcircles@social.coopS smallcircles@social.coop

      @evan @steve

      Well, but a part of the specs can certainly be considered a message bus with channels conceptually.

      Channel is the name that AsyncAPI uses, which maps to domain aggregates and actor streams.

      But considering things purely event-based is stretching it, and may be better to discern between commands and events.

      smallcircles@social.coopS This user is from outside of this forum
      smallcircles@social.coopS This user is from outside of this forum
      smallcircles@social.coop
      wrote last edited by
      #72

      @evan @steve

      Btw, wrt fediverse we really live in a multiverse by all the different perspectives people have towards what the network should or should not provide. All having different physics.

      Where ActivityPub is gravity, and fediverse is entropy and chaos, and universes have become inaccessible over time, past stations.

      evan@cosocial.caE 1 Reply Last reply
      0
      • benpate@mastodon.socialB benpate@mastodon.social

        @thisismissem @steve @mariusor @smallcircles @evan

        Just checking my memory.. this concept exists already, yes?

        Link Preview Image
        ActivityPub/Primer/proxyUrl endpoint - W3C Wiki

        favicon

        (www.w3.org)

        Are you just saying that the new API spec should include this? Or am I missing something?

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

        @benpate @thisismissem @steve @mariusor @smallcircles

        Yes, proxyUrl already exists. There's a use case here:

        Link Preview Image
        Remote object access · Issue #10 · swicg/activitypub-api

        "As an ActivityPub client developer, I want a reliable method for accessing objects on remote servers with the user's authorization, so I can read private or followers-only data."

        favicon

        GitHub (github.com)

        The only other way I've seen this use case discussed is with client-side HTTP Signature keys. There's some kind of negotiation between the server and the client, and then the client can make requests to remote servers using HTTP Signature and a key it controls.

        thisismissem@hachyderm.ioT 1 Reply Last reply
        0
        • steve@social.technoetic.comS steve@social.technoetic.com

          @mariusor @smallcircles @evan I *think* it’s
          clear. I agree it’s a kind of “client”, just not necessarily a C2S client.

          mariusor@metalhead.clubM This user is from outside of this forum
          mariusor@metalhead.clubM This user is from outside of this forum
          mariusor@metalhead.club
          wrote last edited by
          #74

          @steve OK, but why?

          I feel like I explained my position relatively clearly, I would like to understand yours, even though I feel some animosity has started to crop up.

          @smallcircles @evan

          steve@social.technoetic.comS 1 Reply Last reply
          0
          • smallcircles@social.coopS smallcircles@social.coop

            @evan @steve

            Well, but a part of the specs can certainly be considered a message bus with channels conceptually.

            Channel is the name that AsyncAPI uses, which maps to domain aggregates and actor streams.

            But considering things purely event-based is stretching it, and may be better to discern between commands and events.

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

            @smallcircles @steve maybe? I guess you could consider the `sharedInbox` to be like that.

            I think that activities sent to the API by a client are kind of like commands, but they can also be events that happened on a different system.

            If I got an achievement in a game, and that was sent as an activity to the API, it's more like an event notification than a command.

            smallcircles@social.coopS 1 Reply Last reply
            0
            • smallcircles@social.coopS smallcircles@social.coop

              @evan @steve

              Btw, wrt fediverse we really live in a multiverse by all the different perspectives people have towards what the network should or should not provide. All having different physics.

              Where ActivityPub is gravity, and fediverse is entropy and chaos, and universes have become inaccessible over time, past stations.

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

              @smallcircles @steve I understand that people make their own metaphors for how AP works.

              1 Reply Last reply
              0
              • steve@social.technoetic.comS steve@social.technoetic.com

                @mariusor @smallcircles @evan I think you read something other than what I wrote. 😀. I’m describing *user-defined* timelines where the heavy lifting is done in a server. That server would be (or could be) *general purpose* and not specific to an activity domain. I definitely wasn’t suggesting a monolithic, tightly-coupled client/server architecture. I want my timeline definitions to be portable and interoperable.

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

                @steve @mariusor @smallcircles so, a client could send some kind of definition for the timeline ("only Create/Image or Create/Video activities from the inbox where the image is tagged 'caturday'") and then the server sorts data into that timeline? That sounds like a neat feature.

                However, I think there might be some definitions that are so common that we could just define them in a spec, like `notifications`.

                1 Reply Last reply
                0
                • mariusor@metalhead.clubM mariusor@metalhead.club

                  @steve OK, but why?

                  I feel like I explained my position relatively clearly, I would like to understand yours, even though I feel some animosity has started to crop up.

                  @smallcircles @evan

                  steve@social.technoetic.comS This user is from outside of this forum
                  steve@social.technoetic.comS This user is from outside of this forum
                  steve@social.technoetic.com
                  wrote last edited by
                  #78

                  @mariusor @smallcircles @evan No animosity here. However, I’m not sure how to explain it more clearly. I’m referring to C2S as described in chapter 6 of the ActivityPub specification (and the conformance profiles in Section 2.1). It sounded to me like you’re using a more general definition of “client”, which is fine, just different in significant ways (if it only dereferences and renders AP data).

                  smallcircles@social.coopS 1 Reply Last reply
                  0
                  • evan@cosocial.caE evan@cosocial.ca

                    @smallcircles @steve maybe? I guess you could consider the `sharedInbox` to be like that.

                    I think that activities sent to the API by a client are kind of like commands, but they can also be events that happened on a different system.

                    If I got an achievement in a game, and that was sent as an activity to the API, it's more like an event notification than a command.

                    smallcircles@social.coopS This user is from outside of this forum
                    smallcircles@social.coopS This user is from outside of this forum
                    smallcircles@social.coop
                    wrote last edited by
                    #79

                    @evan @steve

                    Rather than sharedInbox I was more thinking that by implementing the HTTP API and msg exchanges in a well-prescribed manner, these would effectively model an event bus conceptually. After which you can talk about it as a higher abstraction that exists, and not get lost in the reeds of the impl details anymore.

                    evan@cosocial.caE 1 Reply Last reply
                    0
                    • steve@social.technoetic.comS steve@social.technoetic.com

                      @mariusor @smallcircles @evan No animosity here. However, I’m not sure how to explain it more clearly. I’m referring to C2S as described in chapter 6 of the ActivityPub specification (and the conformance profiles in Section 2.1). It sounded to me like you’re using a more general definition of “client”, which is fine, just different in significant ways (if it only dereferences and renders AP data).

                      smallcircles@social.coopS This user is from outside of this forum
                      smallcircles@social.coopS This user is from outside of this forum
                      smallcircles@social.coop
                      wrote last edited by
                      #80

                      @steve @mariusor @evan

                      He he, language is hard. A case of terminology overload and clashing terms. Domain driven design has the clearly defined bounded context here which is the scope within which terms are valid. Forming a consistency boundary. These context lines are blurred in fediverse talk. 😅

                      evan@cosocial.caE 1 Reply Last reply
                      0
                      • mariusor@metalhead.clubM mariusor@metalhead.club

                        @thisismissem I have just implemented that for the GoActivityPub servers and it's easier than it sounds.

                        The only important step required is to convert the client authorization token (presumably an OAuth2 bearer token) to a valid actor and then further to a valid Private Key with which to sign the remote request. After that the only thing remaining is to pipe verbatim the received response to the client...

                        @steve @smallcircles @evan

                        thisismissem@hachyderm.ioT This user is from outside of this forum
                        thisismissem@hachyderm.ioT This user is from outside of this forum
                        thisismissem@hachyderm.io
                        wrote last edited by
                        #81

                        @mariusor @steve @smallcircles @evan well, your server *knows* it's access token to user mapping, so then you're just doing authorised fetch as that actor from server side

                        mariusor@metalhead.clubM 1 Reply Last reply
                        0
                        • benpate@mastodon.socialB benpate@mastodon.social

                          @thisismissem @steve @mariusor @smallcircles @evan

                          Just checking my memory.. this concept exists already, yes?

                          Link Preview Image
                          ActivityPub/Primer/proxyUrl endpoint - W3C Wiki

                          favicon

                          (www.w3.org)

                          Are you just saying that the new API spec should include this? Or am I missing something?

                          thisismissem@hachyderm.ioT This user is from outside of this forum
                          thisismissem@hachyderm.ioT This user is from outside of this forum
                          thisismissem@hachyderm.io
                          wrote last edited by
                          #82

                          @benpate @steve @mariusor @smallcircles @evan i'm not sure proxyUrl does what I'm thinking of here

                          1 Reply Last reply
                          0
                          • evan@cosocial.caE evan@cosocial.ca

                            @benpate @thisismissem @steve @mariusor @smallcircles

                            Yes, proxyUrl already exists. There's a use case here:

                            Link Preview Image
                            Remote object access · Issue #10 · swicg/activitypub-api

                            "As an ActivityPub client developer, I want a reliable method for accessing objects on remote servers with the user's authorization, so I can read private or followers-only data."

                            favicon

                            GitHub (github.com)

                            The only other way I've seen this use case discussed is with client-side HTTP Signature keys. There's some kind of negotiation between the server and the client, and then the client can make requests to remote servers using HTTP Signature and a key it controls.

                            thisismissem@hachyderm.ioT This user is from outside of this forum
                            thisismissem@hachyderm.ioT This user is from outside of this forum
                            thisismissem@hachyderm.io
                            wrote last edited by
                            #83

                            @evan @benpate @steve @mariusor @smallcircles my understanding of proxyUrl is that it's just fetching a remote object, but without forwarding authorization

                            For many cases you want to forward the request as the authenticated user to the remote server, not doing the request anonymously

                            mariusor@metalhead.clubM 1 Reply Last reply
                            0
                            • thisismissem@hachyderm.ioT thisismissem@hachyderm.io

                              @mariusor @steve @smallcircles @evan well, your server *knows* it's access token to user mapping, so then you're just doing authorised fetch as that actor from server side

                              mariusor@metalhead.clubM This user is from outside of this forum
                              mariusor@metalhead.clubM This user is from outside of this forum
                              mariusor@metalhead.club
                              wrote last edited by
                              #84

                              @thisismissem which is what proxyUrl is supposed to do, right?

                              Did you mean it in a different way?

                              @steve @smallcircles @evan

                              1 Reply Last reply
                              0
                              • thisismissem@hachyderm.ioT thisismissem@hachyderm.io

                                @evan @benpate @steve @mariusor @smallcircles my understanding of proxyUrl is that it's just fetching a remote object, but without forwarding authorization

                                For many cases you want to forward the request as the authenticated user to the remote server, not doing the request anonymously

                                mariusor@metalhead.clubM This user is from outside of this forum
                                mariusor@metalhead.clubM This user is from outside of this forum
                                mariusor@metalhead.club
                                wrote last edited by
                                #85

                                @thisismissem it's not explicitly saying to forward authorization, but to me that's implied from "require authentication":

                                proxyUrl: Endpoint URI so this actor's clients may access remote ActivityStreams objects which require authentication to access

                                Link Preview Image
                                ActivityPub

                                favicon

                                (w3c.github.io)

                                @evan @benpate @steve @smallcircles

                                evan@cosocial.caE 1 Reply Last reply
                                0
                                • smallcircles@social.coopS smallcircles@social.coop

                                  @evan @steve

                                  Rather than sharedInbox I was more thinking that by implementing the HTTP API and msg exchanges in a well-prescribed manner, these would effectively model an event bus conceptually. After which you can talk about it as a higher abstraction that exists, and not get lost in the reeds of the impl details anymore.

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

                                  @smallcircles @steve sure. I am not a fan of the idea that AP is a message-passing system; it's a read-write API.

                                  smallcircles@social.coopS 1 Reply Last reply
                                  0
                                  • evan@cosocial.caE evan@cosocial.ca

                                    @smallcircles @steve sure. I am not a fan of the idea that AP is a message-passing system; it's a read-write API.

                                    smallcircles@social.coopS This user is from outside of this forum
                                    smallcircles@social.coopS This user is from outside of this forum
                                    smallcircles@social.coop
                                    wrote last edited by
                                    #87

                                    @evan @steve

                                    It is both, like in that diagram draft.. or at least could be considered such (the notes apply to Protosocial musings).

                                    Link Preview Image
                                    🫧 socialcoding.. (@smallcircles@social.coop)

                                    Attached: 1 image @julian@activitypub.space @evan@cosocial.ca Btw, some time ago in a matrix discussion I sketched how I'd like to conceptually 'see' the social network. Not Mastodon-compliant per se (though it might be via a Profile or Bridge) but back to "promised land". Where the protocol is expressed in familiar architecture patterns and borrows concepts from message queuing, actor model, event-driven architecture, etc. Then as a "Solution designer" I am a stakeholder that wants to be completely shielded from all that jazz. That should all be encapsulated by the protocol libraries and SDK's that are offered in language variants across the ecosystem. #ActivityPub et al is a black box. I can directly start modeling what should be exchanged on the bus, and I can apply domain driven design here. And if I have a semantic web part of my app I'd use linked data modeling best-practices. I would have power tools like #EventCatalog and methods like #EventModeling. https://www.eventcatalog.dev/features/visualization https://eventmodeling.org/

                                    favicon

                                    social.coop (social.coop)

                                    smallcircles@social.coopS 1 Reply Last reply
                                    0
                                    • mariusor@metalhead.clubM mariusor@metalhead.club

                                      @thisismissem it's not explicitly saying to forward authorization, but to me that's implied from "require authentication":

                                      proxyUrl: Endpoint URI so this actor's clients may access remote ActivityStreams objects which require authentication to access

                                      Link Preview Image
                                      ActivityPub

                                      favicon

                                      (w3c.github.io)

                                      @evan @benpate @steve @smallcircles

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

                                      @mariusor I have implemented it requiring OAuth on one side and using HTTP Signature on the other. I think you need to use the user's authorization for private content or to respect personal blocks. It sucks for caching but ¯\_(ツ)_/¯

                                      @thisismissem @benpate @steve @smallcircles

                                      mariusor@metalhead.clubM benpate@mastodon.socialB thisismissem@hachyderm.ioT 3 Replies Last reply
                                      0
                                      • evan@cosocial.caE evan@cosocial.ca

                                        @mariusor I have implemented it requiring OAuth on one side and using HTTP Signature on the other. I think you need to use the user's authorization for private content or to respect personal blocks. It sucks for caching but ¯\_(ツ)_/¯

                                        @thisismissem @benpate @steve @smallcircles

                                        mariusor@metalhead.clubM This user is from outside of this forum
                                        mariusor@metalhead.clubM This user is from outside of this forum
                                        mariusor@metalhead.club
                                        wrote last edited by
                                        #89

                                        @evan yes, that's how I did it too, only in my case the private key of the actor that is authorized by OAuth2 token is used to generate the signature for the proxy fetch. This makes it that servers that implement object ACLs based on the recipients list (which GoActivityPub servers are) are not serving 403s for fetches.

                                        1 Reply Last reply
                                        0
                                        • evan@cosocial.caE evan@cosocial.ca

                                          @mariusor I have implemented it requiring OAuth on one side and using HTTP Signature on the other. I think you need to use the user's authorization for private content or to respect personal blocks. It sucks for caching but ¯\_(ツ)_/¯

                                          @thisismissem @benpate @steve @smallcircles

                                          benpate@mastodon.socialB This user is from outside of this forum
                                          benpate@mastodon.socialB This user is from outside of this forum
                                          benpate@mastodon.social
                                          wrote last edited by
                                          #90

                                          Yeah, this is how I'd expect it to work (with the possible addition of *also* allowing cookie auth on the client side)

                                          But yeah. Locally authenticated user from my client -> my server, then HTTP signature from my server -> your server

                                          @evan @mariusor @thisismissem @steve @smallcircles

                                          evan@cosocial.caE 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