Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

`keyId` is a problem.

General Discussion
8 4 26
  • keyId is a problem.

    Generally speaking, most Actors have a `keyId' that looks something like:

    https://enigmatick.social/user/jdt#main-key
    

    When an inbox POST arrives from an unknown user, we can chop off the bit including #main-key and we can pull the remaining URL as the Actor's ID.

    But some implementations decided they should use /main-key instead. That indicates that the keyId format is unreliable and not well-specified. So I switched to deferring this header check for unknown Actors deeper into my ingestion pipeline so that I could retrieve the actor string from the object being sent. That works pretty well.

    But GET requests. Like followers_synchronization. Dammit. There's no object to refer to. So we're back to parsing the keyId and hoping for meaning.

    Out of 124,007 Actors in my database, 587 do not comply with the #main-key convention.

    enigmatick=> select count(*) from actors where as_public_key->>'id' NOT LIKE '%#main-key';
    count
    -------
    587
    (1 row)
    

    For full coverage, I need to accommodate /main-key and #key as well

    #ActivityPub

  • keyId is a problem.

    Generally speaking, most Actors have a `keyId' that looks something like:

    https://enigmatick.social/user/jdt#main-key
    

    When an inbox POST arrives from an unknown user, we can chop off the bit including #main-key and we can pull the remaining URL as the Actor's ID.

    But some implementations decided they should use /main-key instead. That indicates that the keyId format is unreliable and not well-specified. So I switched to deferring this header check for unknown Actors deeper into my ingestion pipeline so that I could retrieve the actor string from the object being sent. That works pretty well.

    But GET requests. Like followers_synchronization. Dammit. There's no object to refer to. So we're back to parsing the keyId and hoping for meaning.

    Out of 124,007 Actors in my database, 587 do not comply with the #main-key convention.

    enigmatick=> select count(*) from actors where as_public_key->>'id' NOT LIKE '%#main-key';
    count
    -------
    587
    (1 row)
    

    For full coverage, I need to accommodate /main-key and #key as well

    #ActivityPub

    @jdt You're supposed to fetch the keyId first, then fetch its owner (or controller).
    But in practice its either /main-key (GoToSocial) or fragment ID, so it is indeed possible to save a HTTP request.

  • keyId is a problem.

    Generally speaking, most Actors have a `keyId' that looks something like:

    https://enigmatick.social/user/jdt#main-key
    

    When an inbox POST arrives from an unknown user, we can chop off the bit including #main-key and we can pull the remaining URL as the Actor's ID.

    But some implementations decided they should use /main-key instead. That indicates that the keyId format is unreliable and not well-specified. So I switched to deferring this header check for unknown Actors deeper into my ingestion pipeline so that I could retrieve the actor string from the object being sent. That works pretty well.

    But GET requests. Like followers_synchronization. Dammit. There's no object to refer to. So we're back to parsing the keyId and hoping for meaning.

    Out of 124,007 Actors in my database, 587 do not comply with the #main-key convention.

    enigmatick=> select count(*) from actors where as_public_key->>'id' NOT LIKE '%#main-key';
    count
    -------
    587
    (1 row)
    

    For full coverage, I need to accommodate /main-key and #key as well

    #ActivityPub

    @jdt the fragment in a JSON-LD document IRI has a semantic meaning that goes back to RDF: https://www.w3.org/TR/rdf11-concepts/#section-fragID

    > a secondary resource that is usually a part of, view of, defined in, or described in the primary resource, and the precise semantics depend on the set of representations that might result from a retrieval action on the primary resource.

  • @jdt You're supposed to fetch the keyId first, then fetch its owner (or controller).
    But in practice its either /main-key (GoToSocial) or fragment ID, so it is indeed possible to save a HTTP request.

    @silverpill@mitra.social That makes sense. I guess I was getting a little bit spun around by the idea that the keyId is not the Actor id and thinking too hard about it.

  • @jdt the fragment in a JSON-LD document IRI has a semantic meaning that goes back to RDF: https://www.w3.org/TR/rdf11-concepts/#section-fragID

    > a secondary resource that is usually a part of, view of, defined in, or described in the primary resource, and the precise semantics depend on the set of representations that might result from a retrieval action on the primary resource.

    @mariusor@metalhead.club That's great context; thanks!

  • @jdt the way I interpret it for JSON-LD documents is that the fragment is the actual name of the property inside the document that the IRI refers to. So in the case of a public key would be https://example.com/jdoe#publicKey (instead of jdoe#main)

    I haven't seen anything in the documentation to give a more explicit, or different, mechanism.

  • @jdt the way I interpret it for JSON-LD documents is that the fragment is the actual name of the property inside the document that the IRI refers to. So in the case of a public key would be https://example.com/jdoe#publicKey (instead of jdoe#main)

    I haven't seen anything in the documentation to give a more explicit, or different, mechanism.

    @mariusor @jdt For keys, the algorithm to resolve the key's actor/owner is what @silverpill described (fragmented or otherwise). To dereference RDF fragments in general, you must retrieve the primary resource and search for a subject with the full IRI as the id (including fragment). The fragment does not generally reference a property (RDF predicate) in the primary resource, but it could in specific cases.

  • @mariusor @jdt For keys, the algorithm to resolve the key's actor/owner is what @silverpill described (fragmented or otherwise). To dereference RDF fragments in general, you must retrieve the primary resource and search for a subject with the full IRI as the id (including fragment). The fragment does not generally reference a property (RDF predicate) in the primary resource, but it could in specific cases.

    @eyeinthesky@mastodon.social Thanks. In your description, does "primary resource" refer to https://enigmatick.social/user/jdt#main-key or https://enigmatick.social/user/jdt?

    That matters since the latter is not known as accurate until the resolution is complete.

    Practically speaking, it's clear that I can retrieve the Actor resource using the fragment ID (https://enigmatick.social/user/jdt#main-key) and then retrieve the owner field from the publicKey field of that object to arrive at the Actor ID. Although since the leap to look in the publicKey field doesn't seem like it's specified by LD-JSON, I suppose just pulling the id from the returned Actor object directly might be as valid.


Gli ultimi otto messaggi ricevuti dalla Federazione
  • @macgirvin that's interesting, I hadn't thought of using punycode. Like @edent@mastodon.social my exposure to it was strictly limited to domains (and even then only to counter domain spoofing)

    read more

  • @edent@mastodon.social -- It's also used for the username component of email addresses iirc; as these are originally also specified as 7-bit US-ASCII. So I convert local usernames with idn. Just something I did out of habit really. You can use UTF-8 if you want, so I'm only saying that punycode seems to federate better based on my experience. We tested this with a bunch of fediverse software at the time and it just worked. We'll accept either.

    read more

  • @macgirvin
    I thought Punycode was only for domain names. Are you saying you also use it for the user part?

    read more

  • @edent@mastodon.social -- I've just tested and that account also works fine with Hubzilla. I will mention that your implementation in this case uses url-encoded usernames while ours uses punycode. They should be able to interact just fine, but the fact that there are multiple ways to arrive at a solution could cause a bit of confusion for implementers.

    You'll need to use punycode if you wish to federate with the diaspora protocol or email or any other projects or protocols which restrict the character set for usernames. So it might end up being a more flexible solution in the long run and should work fine with every other fediverse project today. ASCII-restricted software will just use the xn-- name; and all their links and buttons should work fine.

    Url-encoding should also work, but perhaps not so universally and easily as punycode; as witnessed by the number of issues documented in this thread.

    read more

  • @apps look @julian isn't this sorta what you were just talking about with hashtag combining schemes

    read more

  • @jandi
    Yes, that would really help. I will set the priority in the Weblate project for the part used to understand tags inside messages. Thank you for your continuous support on projects :)

    read more

  • @edent@mastodon.social -- Just looked again... this was first introduced as a hidden feature in redmatrix around 2013-2014, and so may also be available currently in Hubzilla (behind the "system.unicode_usernames" feature toggle). There were some major changes in 2019 that to my knowledge weren't ever backported. I think these only applied to local usernames and not remote usernames, but the functionality in hubzilla still might need to be verified.

    read more

  • The map combines community reports from the and shelters and veterinaries from loaded in real time as you zoom in.
    PawFed is built to be a community project, not a one person effort. There will be many ways to contribute beyond posting reports.
    If you find the project useful, don't hesitate to share it. Thank you. (3/3)

    read more
Post suggeriti
  • 0 Votes
    37 Posts
    108 Views
    > Sorry to be so blunt, but I absolutely cannot abide bullying, of any kind, for any reason. Once Stanton revealed his identity and stood behind his work both @rimu@piefed.social and I apologized and offered our help. That's all we're asking for, and it's not a lot to expect someone to stand behind their product. Generative AI brings out the laziest behaviour in some people. They don't even read responses they just paste it in to the LLM and copy-paste the output. The mismatch in work is not something I abide by. Some coward last month had their OpenClaw agent with a god complex let loose on another OSS project and when the bot got rebuffed, it wrote a hit piece on the maintainer. The bot owner was (by their own admission) hands off on the whole matter. So, no, I am not at all going to be patient and accepting when a supposedly fully-formed piece of software is launched with zero prior reputation, no attribution, and shows telltale signs of AI usage. It trips all kinds of flags, and I will be wary of it. > Mastodon HOA Respectfully, this comes nowhere near the shit I've seen from that group.
  • 0 Votes
    1 Posts
    10 Views
    "Fedify 2.0.0 está aqui!Esta é a maior atualização da história do Fedify. Destaques:**Arquitetura modular** – O pacote monolítico `@fedify/fedify` foi dividido em pacotes independentes e focados: `@fedify/vocab`, `@fedify/vocab-runtime`, `@fedify/vocab-tools`, `@fedify/webfinger` e outros. Pacotes menores, imports mais limpos e a possibilidade de estender o ActivityPub com tipos de vocabulário personalizados.**Painel de depuração em tempo real** – O novo pacote `@fedify/debugger` oferece um dashboard ao vivo em `/__debug__/` que mostra todo o tráfego de federação: traces, detalhes das atividades, verificação de assinaturas e logs correlacionados. Basta envolver seu objeto `Federation` e pronto.**Suporte a relay do ActivityPub** – Suporte nativo a relays via `@fedify/relay` e o comando CLI `fedify relay`. Compatível com os protocolos Mastodon-style e LitePub-style (FEP-ae0c).**Entrega ordenada de mensagens** – A nova opção `orderingKey` resolve o problema do "post zumbi", quando um `Delete` chega antes do seu `Create`. Atividades com a mesma chave são entregues garantidamente na ordem FIFO.**Tratamento de falhas permanentes** – `setOutboxPermanentFailureHandler()` permite reagir quando uma inbox remota retorna 404 ou 410, possibilitando limpar seguidores inacessíveis em vez de tentar reenviar indefinidamente.Outras novidades incluem negociação de conteúdo no nível do middleware, `@fedify/lint` para regras compartilhadas de linting, `@fedify/create` para scaffolding rápido de projetos, arquivos de configuração para a CLI, suporte nativo à CLI em Node.js/Bun e diversos fixes de bugs.Esta versão conta com contribuições significativas de participantes do OSSCA da Coreia. Agradecemos imensamente a todos envolvidos!Trata-se de uma release major com breaking changes. Consulte o guia de migração antes de atualizar.Notas completas da release: https://github.com/fedify-dev/fedify/discussions/580#Fedify #ActivityPub #fediverso #fedidev #TypeScript"@fediverse @tecnologia @academicos @internet (pode seguir para acompanhar os assuntos ou marcar para amplificar a postagem até no #lemmy tb)@fedify https://hollo.social/@fedify/019c8521-92ef-7d5f-be4d-c50eae575742
  • 0 Votes
    1 Posts
    9 Views
    Your Home Feed is the inbox of an ActivityPub actor — in particular YOUR ActivityPub actor.There could be an actor for each hash-tag, too.You could even do Del.icio.us like things — and have actors for intersections of hash-tags, too.These hash-tag actors' inboxes would need to be readable by anyone....This could be a more ActivityPub like API alternative to Mastodon's "GET /API/v1/tags/{name}" API.#ActivityPub #FediDev #FediDevs #Fediverse #HashTag #HashTags
  • 0 Votes
    1 Posts
    11 Views
    I've just updated my #Snac instance, to version 2.85 👍 🎉You don't know Snac? But you should: https://codeberg.org/grunfink/snac2A simple, minimalistic and well documented #ActivityPub instance server written in C, no database needed, totally JavaScript-free, no cookies either, not much bullshit.Do you see this post? It comes from a Snac server.The Fediverse is larger than you assume 😉#snac2 #fediverse #frugalfediverse