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 (Nessuna skin)
  • 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. Technical Discussion
  4. [@julian@fietkau.social](https://activitypub.space/user/julian%40fietkau.social) the only way I c...

[@julian@fietkau.social](https://activitypub.space/user/julian%40fietkau.social) the only way I c...

Pianificato Fissato Bloccato Spostato Technical Discussion
activitypubwebfinger
27 Post 6 Autori 22 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.
  • julian@activitypub.space
    julian@activitypub.space
    julian@activitypub.space
    scritto su ultima modifica di julian@activitypub.space
    #1

    Can WebFinger resolve subject to a different domain?

    My immediate assumption is yes, it can, because someone may use a specific domain merely as a gateway, and point to a different domain for resolution.

    e.g. https://activitypub.directory/.well-known/webfinger?resource=acct:julian@activitypub.space (note the different TLD)

    Resolving to:

    {"subject":"acct:julian@activitypub.space","aliases":["https://activitypub.space/uid/1","https://activitypub.space/user/julian"],"links": ...

    However, this is a potential security issue because said directory could then poison the resulting data, especially if cached by a user of that webfinger directory.

    Am I wrong about that? In the meantime I've updated NodeBB's code to strictly enforce webfinger lookups so if a response subject has a different hostname, then the webfinger query result is considered invalid.

    1 Risposta Ultima Risposta
    0
    • wronglang@bayes.club
      wronglang@bayes.club
      wronglang@bayes.club
      scritto su ultima modifica di
      #2

      @julian just out of curiosity is it related to this funny looking thing?

      https://wrong.webfinger-canary.fietkau.software/canary

      julian@activitypub.space 1 Risposta Ultima Risposta
      0
      • wronglang@bayes.club wronglang@bayes.club

        @julian just out of curiosity is it related to this funny looking thing?

        https://wrong.webfinger-canary.fietkau.software/canary

        julian@activitypub.space
        julian@activitypub.space
        julian@activitypub.space
        scritto su ultima modifica di
        #3

        @wronglang@bayes.club actually, no! That's a different Julian: @julian@fietkau.social <img class="not-responsive emoji" src="https://activitypub.space/assets/plugins/nodebb-plugin-emoji/emoji/android/1f606.png?v=c7cc56fe415" title=":laughing:" />

        But it seems we have thought about the same problem.

        1 Risposta Ultima Risposta
        0
        • julian@activitypub.space
          julian@activitypub.space
          julian@activitypub.space
          scritto su ultima modifica di
          #4

          ... but it is great that you posted it! You've shared a common use-case for a webfinger resolution to a different domain... what @julian@fietkau.social calls the split-domain.

          So in that case, a blanket rejection of a different domain isn't the right approach.

          1 Risposta Ultima Risposta
          0
          • julian@fietkau.social
            julian@fietkau.social
            julian@fietkau.social
            scritto su ultima modifica di
            #5

            @julian@activitypub.space @wronglang Only kind of – I've never considered the implications of a server resolving a WebFinger query for a user on a different origin. At a glance I'm not sure if it solves more problems than it introduces.

            What we do have is WebFinger results linking to ActivityPub actors on a different domain. Fun for things like static site redirects: https://www.hanselman.com/blog/use-your-own-user-domain-for-mastodon-discoverability-with-the-webfinger-protocol-without-hosting-a-server And it enables split-domain setups if the ActivityPub domain delegates its WebFinger lookups back to the WebFinger server.

            julian@activitypub.space 1 Risposta Ultima Risposta
            0
            • julian@fietkau.social julian@fietkau.social

              @julian@activitypub.space @wronglang Only kind of – I've never considered the implications of a server resolving a WebFinger query for a user on a different origin. At a glance I'm not sure if it solves more problems than it introduces.

              What we do have is WebFinger results linking to ActivityPub actors on a different domain. Fun for things like static site redirects: https://www.hanselman.com/blog/use-your-own-user-domain-for-mastodon-discoverability-with-the-webfinger-protocol-without-hosting-a-server And it enables split-domain setups if the ActivityPub domain delegates its WebFinger lookups back to the WebFinger server.

              julian@activitypub.space
              julian@activitypub.space
              julian@activitypub.space
              scritto su ultima modifica di julian@activitypub.space
              #6

              @julian@fietkau.social the only way I can think of it conceivably working is if Webfinger(domain A) » Account (domain B) » name: user@domainA

              So, a two-way back-reference.

              1 Risposta Ultima Risposta
              0
              • evan@cosocial.ca
                evan@cosocial.ca
                evan@cosocial.ca
                scritto su ultima modifica di
                #7

                @julian so, here's what RFC 7033 says:

                "The host to which a WebFinger query is issued is significant. If the query target contains a "host" portion (Section 3.2.2 of RFC 3986), then the host to which the WebFinger query is issued SHOULD be the same as the "host" portion of the query target, unless the client receives instructions through some out-of-band mechanism to send the query to another host. "

                evan@cosocial.ca julian@activitypub.space 2 Risposte Ultima Risposta
                0
                • evan@cosocial.ca evan@cosocial.ca

                  @julian so, here's what RFC 7033 says:

                  "The host to which a WebFinger query is issued is significant. If the query target contains a "host" portion (Section 3.2.2 of RFC 3986), then the host to which the WebFinger query is issued SHOULD be the same as the "host" portion of the query target, unless the client receives instructions through some out-of-band mechanism to send the query to another host. "

                  evan@cosocial.ca
                  evan@cosocial.ca
                  evan@cosocial.ca
                  scritto su ultima modifica di
                  #8

                  @julian

                  " If the query target does not contain a "host" portion, then the client chooses a host to which it directs the query using additional information it has."

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

                    @julian

                    " If the query target does not contain a "host" portion, then the client chooses a host to which it directs the query using additional information it has."

                    evan@cosocial.ca
                    evan@cosocial.ca
                    evan@cosocial.ca
                    scritto su ultima modifica di
                    #9

                    @julian so, I read that as "You should use the hostname from the webfinger unless you don't want to or it's not there." Your directory idea sounds fine. I could see using it as a high-performance cache, for example.

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

                      @julian so, here's what RFC 7033 says:

                      "The host to which a WebFinger query is issued is significant. If the query target contains a "host" portion (Section 3.2.2 of RFC 3986), then the host to which the WebFinger query is issued SHOULD be the same as the "host" portion of the query target, unless the client receives instructions through some out-of-band mechanism to send the query to another host. "

                      julian@activitypub.space
                      julian@activitypub.space
                      julian@activitypub.space
                      scritto su ultima modifica di
                      #10

                      @evan@cosocial.ca boy, that second half does a bit of heavy lifting doesn't it <img class="not-responsive emoji" src="https://activitypub.space/assets/plugins/nodebb-plugin-emoji/emoji/android/1f63c.png?v=c7cc56fe415" title=":smirk_cat:" />

                      1 Risposta Ultima Risposta
                      0
                      • julian@fietkau.social
                        julian@fietkau.social
                        julian@fietkau.social
                        scritto su ultima modifica di
                        #11

                        @julian@activitypub.space Current split-domain setups (Mastodon, GTS etc) do the two-way verification like this: the domain A WebFinger result has a rel="self" ActivityPub link pointing to the actor on domain B, the domain B WebFinger query for user@domainB returns a result with subject: user@domainA. The actor document doesn't need to do anything special.

                        That said, FEP-2c59 has seen some uptake since I wrote @canary. I should update the text some time to reference it.

                        julian@activitypub.space 1 Risposta Ultima Risposta
                        0
                        • evan@cosocial.ca
                          evan@cosocial.ca
                          evan@cosocial.ca
                          scritto su ultima modifica di
                          #12

                          @julian srsly

                          1 Risposta Ultima Risposta
                          0
                          • benpate@mastodon.social
                            benpate@mastodon.social
                            benpate@mastodon.social
                            scritto su ultima modifica di
                            #13

                            @julian

                            I believe there was a questionably named “WebFist” protocol that allowed cross-server WebFinger.

                            https://indieweb.org/Webfist

                            julian@activitypub.space 1 Risposta Ultima Risposta
                            0
                            • benpate@mastodon.social benpate@mastodon.social

                              @julian

                              I believe there was a questionably named “WebFist” protocol that allowed cross-server WebFinger.

                              https://indieweb.org/Webfist

                              julian@activitypub.space
                              julian@activitypub.space
                              julian@activitypub.space
                              scritto su ultima modifica di
                              #14

                              @benpate@mastodon.social ROFL oh dear

                              1 Risposta Ultima Risposta
                              0
                              • julian@fietkau.social julian@fietkau.social

                                @julian@activitypub.space Current split-domain setups (Mastodon, GTS etc) do the two-way verification like this: the domain A WebFinger result has a rel="self" ActivityPub link pointing to the actor on domain B, the domain B WebFinger query for user@domainB returns a result with subject: user@domainA. The actor document doesn't need to do anything special.

                                That said, FEP-2c59 has seen some uptake since I wrote @canary. I should update the text some time to reference it.

                                julian@activitypub.space
                                julian@activitypub.space
                                julian@activitypub.space
                                scritto su ultima modifica di
                                #15

                                @julian@fietkau.social thanks for summarizing the split domain dance for me.

                                Assuming this is how your canary is set up?

                                1 Risposta Ultima Risposta
                                0
                                • julian@fietkau.social
                                  julian@fietkau.social
                                  julian@fietkau.social
                                  scritto su ultima modifica di
                                  #16

                                  @julian@activitypub.space Yep! Compare

                                  https://correct.webfinger-canary.fietkau.software/.well-known/webfinger?resource=acct:canary@correct.webfinger-canary.fietkau.software

                                  and

                                  https://wrong.webfinger-canary.fietkau.software/.well-known/webfinger?resource=acct:canary@wrong.webfinger-canary.fietkau.software

                                  Note the self link and the subject. In a split-domain setup, the WebFinger results for both hostnames are identical, which is why server software often simply issues an HTTP redirect for ease of implementation.

                                  For clarity, I didn't invent this, Mastodon came up with it (and respects it for profile views). I noticed while setting up earlier versions of @DailyRucks that Misskey does not. And so @canary was born. 😉

                                  julian@fietkau.social 1 Risposta Ultima Risposta
                                  0
                                  • julian@fietkau.social julian@fietkau.social

                                    @julian@activitypub.space Yep! Compare

                                    https://correct.webfinger-canary.fietkau.software/.well-known/webfinger?resource=acct:canary@correct.webfinger-canary.fietkau.software

                                    and

                                    https://wrong.webfinger-canary.fietkau.software/.well-known/webfinger?resource=acct:canary@wrong.webfinger-canary.fietkau.software

                                    Note the self link and the subject. In a split-domain setup, the WebFinger results for both hostnames are identical, which is why server software often simply issues an HTTP redirect for ease of implementation.

                                    For clarity, I didn't invent this, Mastodon came up with it (and respects it for profile views). I noticed while setting up earlier versions of @DailyRucks that Misskey does not. And so @canary was born. 😉

                                    julian@fietkau.social
                                    julian@fietkau.social
                                    julian@fietkau.social
                                    scritto su ultima modifica di
                                    #17

                                    @julian@activitypub.space Here's Mastodon's server admin documentation for the feature: https://docs.joinmastodon.org/admin/config/#web_domain And here's GoToSocial's: https://docs.gotosocial.org/en/latest/advanced/host-account-domain/

                                    Notably, everyone so far other than Takahē treats this as a server-level configuration, when it would work perfectly fine as a per-account setting. I've had a FediForum demo titled “None of you have any idea how close we already are to custom handle domains in profile settings” drafted in my head for years, I just can't find the time to put it together.

                                    julian@activitypub.space 1 Risposta Ultima Risposta
                                    0
                                    • julian@fietkau.social julian@fietkau.social

                                      @julian@activitypub.space Here's Mastodon's server admin documentation for the feature: https://docs.joinmastodon.org/admin/config/#web_domain And here's GoToSocial's: https://docs.gotosocial.org/en/latest/advanced/host-account-domain/

                                      Notably, everyone so far other than Takahē treats this as a server-level configuration, when it would work perfectly fine as a per-account setting. I've had a FediForum demo titled “None of you have any idea how close we already are to custom handle domains in profile settings” drafted in my head for years, I just can't find the time to put it together.

                                      julian@activitypub.space
                                      julian@activitypub.space
                                      julian@activitypub.space
                                      scritto su ultima modifica di
                                      #18

                                      > @julian@fietkau.social said:
                                      >
                                      > Notably, everyone so far other than Takahē treats this as a server-level configuration, when it would work perfectly fine as a per-account setting.

                                      oooooooooh, now you have my attention.

                                      1 Risposta Ultima Risposta
                                      0
                                      • julian@fietkau.social
                                        julian@fietkau.social
                                        julian@fietkau.social
                                        scritto su ultima modifica di
                                        #19

                                        @julian@activitypub.space Here's what Takahē has to say on the subject: https://docs.jointakahe.org/en/latest/domains/

                                        Even they don't go all the way, they “only” let server admins add a selection of WebFinger domains for users to choose from.

                                        So what if we put a “handle domain” field into people's account settings, let them enter whatever they want, and on submission we test whether that domain's WebFinger query for the username in question returns a valid result pointing back to our local actor?

                                        I honestly think this would work.

                                        julian@activitypub.space 1 Risposta Ultima Risposta
                                        0
                                        • julian@fietkau.social
                                          julian@fietkau.social
                                          julian@fietkau.social
                                          scritto su ultima modifica di
                                          #20

                                          @mkljczk The service domain thing has the advantage that the chosen domain works even with servers that don't respect split-domain setups, but I don't know if I would bother with it just for that advantage. Why does the other way need host-meta?

                                          Would be incredibly cool to see per-account WebFinger-based custom handle domains in a major platform!

                                          @julian@activitypub.space

                                          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
                                          Feed RSS
                                          [@julian@fietkau.social](https://activitypub.space/user/julian%40fietkau.social) the only way I c...
                                          @pierobosio@soc.bosio.info
                                          NodeBB Contributors
                                          • Accedi

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