Skip to content
  • Hjem
  • Seneste
  • Etiketter
  • Populære
  • Verden
  • Bruger
  • Grupper
Temaer
  • 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
Kollaps
FARVEL BIG TECH
  1. Forside
  2. Ikke-kategoriseret
  3. @julian diving into the hard problems of building for the Fediverse at #Fedicon, starting with hilariously talking about how those hard problems look like to average users 😅

@julian diving into the hard problems of building for the Fediverse at #Fedicon, starting with hilariously talking about how those hard problems look like to average users 😅

Planlagt Fastgjort Låst Flyttet Ikke-kategoriseret
fedicon
98 Indlæg 13 Posters 0 Visninger
  • Ældste til nyeste
  • Nyeste til ældste
  • Most Votes
Svar
  • Svar som emne
Login for at svare
Denne tråd er blevet slettet. Kun brugere med emne behandlings privilegier kan se den.
  • thisismissem@hachyderm.ioT thisismissem@hachyderm.io

    @julian @naturzukunft FEP/d8c2 is poorly designed and the comments on socialhub show this. It's not how OAuth is meant to work.

    We should be using Authorization Server Metadata + Rich Authorization Requests for any OAuth implementation for an ActivityPub API.

    Scopes would ultimately be pretty minimal, e.g., profile, offline_access (both OIDC), and maybe like manage:keys for updating signing keys; the rest should probably be RARs.

    For discovery, if the Actor object advertises an authentication method of OAuth or OIDC, the look for the authorization server URL, discover all OAuth specifics from there.

    For clients, you could do dynamic client registration, but it has drawbacks, so I'd recommend Client ID Metadata Documents.

    julian@community.nodebb.orgJ This user is from outside of this forum
    julian@community.nodebb.orgJ This user is from outside of this forum
    julian@community.nodebb.org
    wrote sidst redigeret af julian@community.nodebb.org
    #35

    thisismissem@hachyderm.io said:
    > Authorization Server Metadata + Rich Authorization Requests

    Is this detailed out somewhere? I’m not familiar with those concepts currently.

    1 Reply Last reply
    0
    • 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 sidst redigeret af
      #36

      @julian those are both RFCs, both are linked or referenced in the d8c2 thread on social hub

      1 Reply Last reply
      0
      • 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 sidst redigeret af
        #37

        @julian @naturzukunft @thisismissem i don't think there's any assumption that way.

        The one thing that the OAuth FEP assumes is that there's a way for the authorization server to validate the client ID and redirect URI by fetching the client ID.

        I have not looked closely enough at keycloak to see if there's a way to build a plugin or to have configurable executable code to do that.

        This seems like someone who really wants to use that configuration could take a few minutes to confirm.

        thisismissem@hachyderm.ioT evan@cosocial.caE naturzukunft@mastodon.socialN 3 Replies Last reply
        0
        • fentiger@mastodon.socialF fentiger@mastodon.social

          @julian @benpate @evan I think FEP-3b86 only really allows for actions that the home server already knows how to carry out; the advantage of FEP-d8c2 is that it allows clients to add functionality of their own; see eg Evan's checkin app, which can post geo-tagged activities even via a server which doesn't natively support them.

          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 sidst redigeret af
          #38

          @FenTiger @julian @benpate ding ding ding ding ding

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

            @julian @naturzukunft FEP/d8c2 is poorly designed and the comments on socialhub show this. It's not how OAuth is meant to work.

            We should be using Authorization Server Metadata + Rich Authorization Requests for any OAuth implementation for an ActivityPub API.

            Scopes would ultimately be pretty minimal, e.g., profile, offline_access (both OIDC), and maybe like manage:keys for updating signing keys; the rest should probably be RARs.

            For discovery, if the Actor object advertises an authentication method of OAuth or OIDC, the look for the authorization server URL, discover all OAuth specifics from there.

            For clients, you could do dynamic client registration, but it has drawbacks, so I'd recommend Client ID Metadata Documents.

            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 sidst redigeret af
            #39

            @thisismissem @julian @naturzukunft it does what's necessary to enable the authorization code flow.

            I think there's plenty of room for two tracks -- developers who want the complexity of discovery and registration can go your route, when you write it up.

            Developers who just want to get the job done can use the simple and functional AP-centric mechanism in the OAuth FEP.

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

              @julian @naturzukunft @thisismissem i don't think there's any assumption that way.

              The one thing that the OAuth FEP assumes is that there's a way for the authorization server to validate the client ID and redirect URI by fetching the client ID.

              I have not looked closely enough at keycloak to see if there's a way to build a plugin or to have configurable executable code to do that.

              This seems like someone who really wants to use that configuration could take a few minutes to confirm.

              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 sidst redigeret af
              #40

              @evan @julian @naturzukunft can keycloak parse a non-standard document to discover client metadata? No.

              There were very specific reasons why myself and @aaronpk chose to make Client ID Metadata Documents the way we did: because we reused existing parts of the OAuth specification ecosystem.

              Your proposal discards all that prior art in favour of making everything an AP actor.

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

                @evan @julian @naturzukunft can keycloak parse a non-standard document to discover client metadata? No.

                There were very specific reasons why myself and @aaronpk chose to make Client ID Metadata Documents the way we did: because we reused existing parts of the OAuth specification ecosystem.

                Your proposal discards all that prior art in favour of making everything an AP actor.

                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 sidst redigeret af
                #41

                @evan @julian @naturzukunft @aaronpk can keycloak support Client ID Metadata Documents? Currently not to my knowledge, but it's a lot easier to support because it's effectively the same process as dynamic client registration because the document payload is the same.

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

                  @thisismissem @julian @naturzukunft it does what's necessary to enable the authorization code flow.

                  I think there's plenty of room for two tracks -- developers who want the complexity of discovery and registration can go your route, when you write it up.

                  Developers who just want to get the job done can use the simple and functional AP-centric mechanism in the OAuth FEP.

                  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 sidst redigeret af
                  #42

                  @evan @julian @naturzukunft OAuth isn't AP-centric, and never will be, that's probably your first error. Most OAuth clients will never need to be AP Actors.

                  Discovery isn't "complex", it's literally a HTTP request to a well known endpoint for a JSON document.

                  You can't do OAuth whilst ignoring all the OAuth standards.

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

                    @julian @naturzukunft @thisismissem i don't think there's any assumption that way.

                    The one thing that the OAuth FEP assumes is that there's a way for the authorization server to validate the client ID and redirect URI by fetching the client ID.

                    I have not looked closely enough at keycloak to see if there's a way to build a plugin or to have configurable executable code to do that.

                    This seems like someone who really wants to use that configuration could take a few minutes to confirm.

                    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 sidst redigeret af
                    #43

                    @julian @naturzukunft @thisismissem

                    A cursory search shows that it's possible to implement a new ClientLookupProvider with KeyCloak extension SPIs. It sounds like a fun project to do; I don't get a lot of chance to write Java code.

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

                      @julian @naturzukunft @thisismissem i don't think there's any assumption that way.

                      The one thing that the OAuth FEP assumes is that there's a way for the authorization server to validate the client ID and redirect URI by fetching the client ID.

                      I have not looked closely enough at keycloak to see if there's a way to build a plugin or to have configurable executable code to do that.

                      This seems like someone who really wants to use that configuration could take a few minutes to confirm.

                      naturzukunft@mastodon.socialN This user is from outside of this forum
                      naturzukunft@mastodon.socialN This user is from outside of this forum
                      naturzukunft@mastodon.social
                      wrote sidst redigeret af
                      #44

                      @evan @julian @thisismissem
                      "I have not looked closely enough at keycloak to see if there's a way to build a plugin or to have configurable executable code to do that."

                      I don't plan to adapt a standard OAuth2 server to support ActivityPub. I think that if that's necessary, something is fundamentally wrong.

                      evan@cosocial.caE 1 Reply Last reply
                      0
                      • naturzukunft@mastodon.socialN This user is from outside of this forum
                        naturzukunft@mastodon.socialN This user is from outside of this forum
                        naturzukunft@mastodon.social
                        wrote sidst redigeret af
                        #45

                        @julian @thisismissem https://socialhub.activitypub.rocks/t/fep-d8c2-oauth-2-0-profile-for-the-activitypub-api/3575/2?u=naturzukunft

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

                          @evan @julian @naturzukunft OAuth isn't AP-centric, and never will be, that's probably your first error. Most OAuth clients will never need to be AP Actors.

                          Discovery isn't "complex", it's literally a HTTP request to a well known endpoint for a JSON document.

                          You can't do OAuth whilst ignoring all the OAuth standards.

                          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 sidst redigeret af
                          #46

                          @thisismissem @julian @naturzukunft the point of discovery is to find the important endpoints and parameters for the flows. Many implementers who are concentrating on a single API skip discovery because the resource provider has already defined the specific flow. Alternatively, many API providers allow client registration out of band. It is absolutely 100% OK to do OAuth without using features like discovery and dynamic client registration.

                          benpate@mastodon.socialB 1 Reply Last reply
                          0
                          • naturzukunft@mastodon.socialN naturzukunft@mastodon.social

                            @evan @julian @thisismissem
                            "I have not looked closely enough at keycloak to see if there's a way to build a plugin or to have configurable executable code to do that."

                            I don't plan to adapt a standard OAuth2 server to support ActivityPub. I think that if that's necessary, something is fundamentally wrong.

                            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 sidst redigeret af
                            #47

                            @naturzukunft @julian @thisismissem that's fine; you should do whatever it is you want.

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

                              @naturzukunft @julian @thisismissem that's fine; you should do whatever it is you want.

                              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 sidst redigeret af
                              #48

                              @naturzukunft @julian @thisismissem oh, are you going to use Keycloak's built in user database, or are you going to use an adapter to fetch user data from your own database?

                              evan@cosocial.caE naturzukunft@mastodon.socialN 3 Replies Last reply
                              0
                              • evan@cosocial.caE evan@cosocial.ca

                                @naturzukunft @julian @thisismissem oh, are you going to use Keycloak's built in user database, or are you going to use an adapter to fetch user data from your own database?

                                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 sidst redigeret af
                                #49

                                @naturzukunft @julian @thisismissem oh, it looks like Authentik has ways to do client metadata lookup with a Webhook. Nice!

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

                                  @naturzukunft @julian @thisismissem oh, are you going to use Keycloak's built in user database, or are you going to use an adapter to fetch user data from your own database?

                                  naturzukunft@mastodon.socialN This user is from outside of this forum
                                  naturzukunft@mastodon.socialN This user is from outside of this forum
                                  naturzukunft@mastodon.social
                                  wrote sidst redigeret af
                                  #50

                                  @evan @julian @thisismissem which user data to do what ?

                                  evan@cosocial.caE 1 Reply Last reply
                                  0
                                  • naturzukunft@mastodon.socialN naturzukunft@mastodon.social

                                    @evan @julian @thisismissem which user data to do what ?

                                    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 sidst redigeret af
                                    #51

                                    @naturzukunft @julian @thisismissem oh, sorry. By default, KeyCloak stores all the user data (name, avatar, description, so on) in its own internal PostgreSQL database, and you get an API to ask about and manage users.

                                    The alternative is to add a custom UserStorageProvider class to access your own user storage and map your data to KeyCloak's schema. Applications that already have a user database often do this.

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

                                      @naturzukunft @julian @thisismissem oh, sorry. By default, KeyCloak stores all the user data (name, avatar, description, so on) in its own internal PostgreSQL database, and you get an API to ask about and manage users.

                                      The alternative is to add a custom UserStorageProvider class to access your own user storage and map your data to KeyCloak's schema. Applications that already have a user database often do this.

                                      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 sidst redigeret af
                                      #52

                                      @evan @naturzukunft @julian in the wild it's very uncommon to replace Keycloak's user database with something else; most commonly user migrations are performed, having been involved in several such projects.

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

                                        @naturzukunft @julian @thisismissem oh, are you going to use Keycloak's built in user database, or are you going to use an adapter to fetch user data from your own database?

                                        naturzukunft@mastodon.socialN This user is from outside of this forum
                                        naturzukunft@mastodon.socialN This user is from outside of this forum
                                        naturzukunft@mastodon.social
                                        wrote sidst redigeret af
                                        #53

                                        @evan @julian @thisismissem There is a mapping in the resource server between PreferredUsername and an actor. This is a hack; I had to extend it because Mastodon uses the username as a unique identifier. Without Mastodon support, it would be a mapping between IssuerUserId and Actor. The data for the mapping comes from the JWT token.

                                        But that's beside the point.

                                        evan@cosocial.caE thisismissem@hachyderm.ioT 2 Replies Last reply
                                        0
                                        • thisismissem@hachyderm.ioT thisismissem@hachyderm.io

                                          @evan @naturzukunft @julian in the wild it's very uncommon to replace Keycloak's user database with something else; most commonly user migrations are performed, having been involved in several such projects.

                                          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 sidst redigeret af
                                          #54

                                          @thisismissem @julian great, so that's what
                                          @naturzukunft can do.

                                          1 Reply Last reply
                                          0
                                          Svar
                                          • Svar som emne
                                          Login for at svare
                                          • Ældste til nyeste
                                          • Nyeste til ældste
                                          • Most Votes


                                          • Log ind

                                          • Har du ikke en konto? Tilmeld

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          Graciously hosted by data.coop
                                          • First post
                                            Last post
                                          0
                                          • Hjem
                                          • Seneste
                                          • Etiketter
                                          • Populære
                                          • Verden
                                          • Bruger
                                          • Grupper