Salta al contenuto
0
  • Home
  • Piero Bosio
  • Blog
  • Mondo
  • Fediverso
  • News
  • Categorie
  • Old Web Site
  • Recenti
  • Popolare
  • Tag
  • Utenti
  • Home
  • Piero Bosio
  • Blog
  • Mondo
  • Fediverso
  • News
  • Categorie
  • Old Web Site
  • Recenti
  • Popolare
  • Tag
  • Utenti
Skin
  • Chiaro
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Scuro
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Predefinito (Cerulean)
  • Nessuna skin
Collassa

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone
  1. Home
  2. Categorie
  3. Fediverso
  4. 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.

Pianificato Fissato Bloccato Spostato Fediverso
activitypubfediverse
133 Post 13 Autori 1.1k Visualizzazioni
  • Da Vecchi a Nuovi
  • Da Nuovi a Vecchi
  • Più Voti
Rispondi
  • Risposta alla discussione
Effettua l'accesso per rispondere
Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
  • benpate@mastodon.socialundefined benpate@mastodon.social

    @thisismissem @steve @mariusor @smallcircles @evan

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

    https://www.w3.org/wiki/ActivityPub/Primer/proxyUrl_endpoint

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

    thisismissem@hachyderm.ioundefined Questo utente è esterno a questo forum
    thisismissem@hachyderm.ioundefined Questo utente è esterno a questo forum
    thisismissem@hachyderm.io
    scritto su ultima modifica di
    #101

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

    1 Risposta Ultima Risposta
    0
    • evan@cosocial.caundefined evan@cosocial.ca

      @benpate @thisismissem @steve @mariusor @smallcircles

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

      https://github.com/swicg/activitypub-api/issues/10

      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.ioundefined Questo utente è esterno a questo forum
      thisismissem@hachyderm.ioundefined Questo utente è esterno a questo forum
      thisismissem@hachyderm.io
      scritto su ultima modifica di
      #102

      @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.clubundefined 1 Risposta Ultima Risposta
      0
      • thisismissem@hachyderm.ioundefined 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.clubundefined Questo utente è esterno a questo forum
        mariusor@metalhead.clubundefined Questo utente è esterno a questo forum
        mariusor@metalhead.club
        scritto su ultima modifica di
        #103

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

        Did you mean it in a different way?

        @steve @smallcircles @evan

        1 Risposta Ultima Risposta
        0
        • thisismissem@hachyderm.ioundefined 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.clubundefined Questo utente è esterno a questo forum
          mariusor@metalhead.clubundefined Questo utente è esterno a questo forum
          mariusor@metalhead.club
          scritto su ultima modifica di
          #104

          @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

          https://w3c.github.io/activitypub/#proxyUrl

          @evan @benpate @steve @smallcircles

          evan@cosocial.caundefined 1 Risposta Ultima Risposta
          0
          • smallcircles@social.coopundefined 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.caundefined Questo utente è esterno a questo forum
            evan@cosocial.caundefined Questo utente è esterno a questo forum
            evan@cosocial.ca
            scritto su ultima modifica di
            #105

            @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.coopundefined 1 Risposta Ultima Risposta
            0
            • evan@cosocial.caundefined 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.coopundefined Questo utente è esterno a questo forum
              smallcircles@social.coopundefined Questo utente è esterno a questo forum
              smallcircles@social.coop
              scritto su ultima modifica di
              #106

              @evan @steve

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

              https://social.coop/@smallcircles/116099511464629495

              smallcircles@social.coopundefined 1 Risposta Ultima Risposta
              0
              • mariusor@metalhead.clubundefined 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

                https://w3c.github.io/activitypub/#proxyUrl

                @evan @benpate @steve @smallcircles

                evan@cosocial.caundefined Questo utente è esterno a questo forum
                evan@cosocial.caundefined Questo utente è esterno a questo forum
                evan@cosocial.ca
                scritto su ultima modifica di
                #107

                @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.clubundefined benpate@mastodon.socialundefined thisismissem@hachyderm.ioundefined 3 Risposte Ultima Risposta
                0
                • evan@cosocial.caundefined 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.clubundefined Questo utente è esterno a questo forum
                  mariusor@metalhead.clubundefined Questo utente è esterno a questo forum
                  mariusor@metalhead.club
                  scritto su ultima modifica di
                  #108

                  @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 Risposta Ultima Risposta
                  0
                  • evan@cosocial.caundefined 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.socialundefined Questo utente è esterno a questo forum
                    benpate@mastodon.socialundefined Questo utente è esterno a questo forum
                    benpate@mastodon.social
                    scritto su ultima modifica di
                    #109

                    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.caundefined 1 Risposta Ultima Risposta
                    0
                    • benpate@mastodon.socialundefined benpate@mastodon.social

                      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.caundefined Questo utente è esterno a questo forum
                      evan@cosocial.caundefined Questo utente è esterno a questo forum
                      evan@cosocial.ca
                      scritto su ultima modifica di
                      #110

                      @benpate

                      With all the standard warnings around proxies!

                      @mariusor @thisismissem @steve @smallcircles

                      1 Risposta Ultima Risposta
                      0
                      • smallcircles@social.coopundefined smallcircles@social.coop

                        @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.caundefined Questo utente è esterno a questo forum
                        evan@cosocial.caundefined Questo utente è esterno a questo forum
                        evan@cosocial.ca
                        scritto su ultima modifica di
                        #111

                        @smallcircles @steve @mariusor

                        I think in particular the terms "publisher" and "consumer" from AS2 and "client" and "server" from AP don't always map cleanly, especially with HTTP POST requests.

                        When a client delivers an activity to the actor's outbox, the client is the publisher of that activity, and the server is the consumer.

                        Same when a sending server (publisher) delivers an activity to a receiving server (consumer).

                        1 Risposta Ultima Risposta
                        0
                        • evan@cosocial.caundefined 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

                          thisismissem@hachyderm.ioundefined Questo utente è esterno a questo forum
                          thisismissem@hachyderm.ioundefined Questo utente è esterno a questo forum
                          thisismissem@hachyderm.io
                          scritto su ultima modifica di
                          #112

                          @evan @mariusor @benpate @steve @smallcircles yeah, it's the only way to do it.

                          But this infrastructure actually is what enables things like the AT Protocol "proxy through my PDS to the bluesky app view" or "proxy through my PDS to a custom feed generator" functionality.

                          That's how that all works.

                          1 Risposta Ultima Risposta
                          0
                          • smallcircles@social.coopundefined smallcircles@social.coop

                            @evan @steve

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

                            https://social.coop/@smallcircles/116099511464629495

                            smallcircles@social.coopundefined Questo utente è esterno a questo forum
                            smallcircles@social.coopundefined Questo utente è esterno a questo forum
                            smallcircles@social.coop
                            scritto su ultima modifica di
                            #113

                            @evan @steve

                            Another issue: Unclear protocol layers.

                            > I am not a fan of the idea that #ActivityPub is a message-passing system; it's a read-write API.

                            I'm not sure what a "read-write API" is, really. It 's a fuzzy term, whereas message based systems have well-defined architecture patterns and a body of IT knowledge and practice to apply them in robust communication systems. A 'Message API' has a generic, consistent interface.

                            The overarching goal of AS/AP should be empowerment of the Solution developer so they can directly focus on building use cases for their application or business domain. They should not have to think about any of the intrinsics of the protocol, like particular GETs and POSTs used to model protocol capabilities in the HTTP transport layer.

                            Solution design then involves:

                            0. Model the domain
                            1. Data modeling, msg formats + validation
                            2. Define actor msg exchange patterns
                            3. Document design
                            --
                            4. Improve these steps. Add native protocol + tool support over time.

                            evan@cosocial.caundefined 1 Risposta Ultima Risposta
                            0
                            • smallcircles@social.coopundefined smallcircles@social.coop

                              @evan @steve

                              Another issue: Unclear protocol layers.

                              > I am not a fan of the idea that #ActivityPub is a message-passing system; it's a read-write API.

                              I'm not sure what a "read-write API" is, really. It 's a fuzzy term, whereas message based systems have well-defined architecture patterns and a body of IT knowledge and practice to apply them in robust communication systems. A 'Message API' has a generic, consistent interface.

                              The overarching goal of AS/AP should be empowerment of the Solution developer so they can directly focus on building use cases for their application or business domain. They should not have to think about any of the intrinsics of the protocol, like particular GETs and POSTs used to model protocol capabilities in the HTTP transport layer.

                              Solution design then involves:

                              0. Model the domain
                              1. Data modeling, msg formats + validation
                              2. Define actor msg exchange patterns
                              3. Document design
                              --
                              4. Improve these steps. Add native protocol + tool support over time.

                              evan@cosocial.caundefined Questo utente è esterno a questo forum
                              evan@cosocial.caundefined Questo utente è esterno a questo forum
                              evan@cosocial.ca
                              scritto su ultima modifica di
                              #114

                              @smallcircles @steve it's ok if you haven't heard of a REST API. It's an API that uses HTTP for reading and writing data. Wikipedia has a good
                              article about it:

                              https://en.wikipedia.org/wiki/REST

                              evan@cosocial.caundefined 1 Risposta Ultima Risposta
                              0
                              • evan@cosocial.caundefined evan@cosocial.ca

                                @smallcircles @steve it's ok if you haven't heard of a REST API. It's an API that uses HTTP for reading and writing data. Wikipedia has a good
                                article about it:

                                https://en.wikipedia.org/wiki/REST

                                evan@cosocial.caundefined Questo utente è esterno a questo forum
                                evan@cosocial.caundefined Questo utente è esterno a questo forum
                                evan@cosocial.ca
                                scritto su ultima modifica di
                                #115

                                @smallcircles @steve one anti-pattern I dislike seeing in ActivityPub discussions is that only one interaction defined in the ActivityPub spec is valid: an HTTP POST to an actor's `inbox` for server-to-server interactions.

                                We can use HTTP GET to fetch additional data about objects, actors and collections.

                                evan@cosocial.caundefined 1 Risposta Ultima Risposta
                                0
                                • evan@cosocial.caundefined evan@cosocial.ca

                                  @smallcircles @steve one anti-pattern I dislike seeing in ActivityPub discussions is that only one interaction defined in the ActivityPub spec is valid: an HTTP POST to an actor's `inbox` for server-to-server interactions.

                                  We can use HTTP GET to fetch additional data about objects, actors and collections.

                                  evan@cosocial.caundefined Questo utente è esterno a questo forum
                                  evan@cosocial.caundefined Questo utente è esterno a questo forum
                                  evan@cosocial.ca
                                  scritto su ultima modifica di evan@cosocial.ca
                                  #116

                                  @smallcircles @steve So, I disagree that we have to exclusively adopt a message-passing paradigm for ActivityPub.

                                  EDIT: note that it's exclusive.

                                  cwebber@social.coopundefined 1 Risposta Ultima Risposta
                                  0
                                  • evan@cosocial.caundefined evan@cosocial.ca

                                    @smallcircles @steve So, I disagree that we have to exclusively adopt a message-passing paradigm for ActivityPub.

                                    EDIT: note that it's exclusive.

                                    cwebber@social.coopundefined Questo utente è esterno a questo forum
                                    cwebber@social.coopundefined Questo utente è esterno a questo forum
                                    cwebber@social.coop
                                    scritto su ultima modifica di
                                    #117

                                    @evan @smallcircles @steve ActivityPub already is a message passing paradigm

                                    smallcircles@social.coopundefined evan@cosocial.caundefined 2 Risposte Ultima Risposta
                                    0
                                    • cwebber@social.coopundefined cwebber@social.coop

                                      @evan @smallcircles @steve ActivityPub already is a message passing paradigm

                                      smallcircles@social.coopundefined Questo utente è esterno a questo forum
                                      smallcircles@social.coopundefined Questo utente è esterno a questo forum
                                      smallcircles@social.coop
                                      scritto su ultima modifica di
                                      #118

                                      @evan

                                      > it's ok if you haven't heard of a REST API.

                                      Well, you be you. I consider this a 'typical Evan remark' by now, dripping with sarcasm. It is a weird fit for someone who want to lead the #SocialCG efforts, I'd say.

                                      Ah well. What I am talking about is architecture and design, and all the things that allow people to easily form a clear mental picture on how things fit together, wrap their head around the fediverse.

                                      A HTTP interface is a very low-level thing, and clearly but one of the many moving parts that play a role in #ActivityPub based solution development.

                                      Never defining this well, and having the documentation be scattered all across the fediverse in 1,001 random locations doesn't help. Meanwhile the dev talk that is going on for years remains very inefficient due to endless Babylonian speech confusion.

                                      https://social.coop/@smallcircles/116109447243110037

                                      @cwebber @steve

                                      evan@cosocial.caundefined 1 Risposta Ultima Risposta
                                      0
                                      • smallcircles@social.coopundefined smallcircles@social.coop

                                        @evan

                                        > it's ok if you haven't heard of a REST API.

                                        Well, you be you. I consider this a 'typical Evan remark' by now, dripping with sarcasm. It is a weird fit for someone who want to lead the #SocialCG efforts, I'd say.

                                        Ah well. What I am talking about is architecture and design, and all the things that allow people to easily form a clear mental picture on how things fit together, wrap their head around the fediverse.

                                        A HTTP interface is a very low-level thing, and clearly but one of the many moving parts that play a role in #ActivityPub based solution development.

                                        Never defining this well, and having the documentation be scattered all across the fediverse in 1,001 random locations doesn't help. Meanwhile the dev talk that is going on for years remains very inefficient due to endless Babylonian speech confusion.

                                        https://social.coop/@smallcircles/116109447243110037

                                        @cwebber @steve

                                        evan@cosocial.caundefined Questo utente è esterno a questo forum
                                        evan@cosocial.caundefined Questo utente è esterno a questo forum
                                        evan@cosocial.ca
                                        scritto su ultima modifica di
                                        #119

                                        @smallcircles @cwebber @steve hey, Arnold.

                                        I don't think argument from ignorance is a good way to have a discussion.

                                        I chose to take you at your word that you didn't know what a "read-write API" is, and that you couldn't figure it out from context clues, so I dropped a link to Wikipedia.

                                        What would you have done, if you were me?

                                        smallcircles@social.coopundefined 1 Risposta Ultima Risposta
                                        0
                                        • cwebber@social.coopundefined cwebber@social.coop

                                          @evan @smallcircles @steve ActivityPub already is a message passing paradigm

                                          evan@cosocial.caundefined Questo utente è esterno a questo forum
                                          evan@cosocial.caundefined Questo utente è esterno a questo forum
                                          evan@cosocial.ca
                                          scritto su ultima modifica di evan@cosocial.ca
                                          #120

                                          @cwebber @smallcircles @steve thanks for that important clarification.

                                          It does use message-passing, but not exclusively. I'll update my reply.

                                          smallcircles@social.coopundefined 1 Risposta Ultima Risposta
                                          0

                                          Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.

                                          Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.

                                          Con il tuo contributo, questo post potrebbe essere ancora migliore 💗

                                          Registrati Accedi
                                          Rispondi
                                          • Risposta alla discussione
                                          Effettua l'accesso per rispondere
                                          • Da Vecchi a Nuovi
                                          • Da Nuovi a Vecchi
                                          • Più Voti


                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 5
                                          • 6
                                          • 7
                                          Feed RSS
                                          I think the #ActivityPub client-to-server API is extremely important and underrated.
                                          @pierobosio@soc.bosio.info
                                          V4.10.1 Contributors
                                          • Accedi

                                          • Accedi o registrati per effettuare la ricerca.
                                          • Primo post
                                            Ultimo post