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

Adjusting #Enigmatick's previously built functions to align with the #ActivityPub #E2EE draft.

General Discussion
8 3 0
  • Adjusting #Enigmatick's previously built functions to align with the #ActivityPub #E2EE draft.

    KeyPackage collection on the Actor object

    Request

    > curl -H "Accept: application/activity+json" https://enigmatick.social/user/jdt | jq '.keyPackages'
    

    Response

    "https://enigmatick.social/user/jdt/keys"
    

    Retrieve the KeyPackage Collection

    These are populated by the client (the browser using the wasm module loaded in the Svelte SPA). I had a different mechanism in place for managing this (using the instrument field on Activities) but am updating it to use the Add flow for the Collection as specified by the draft.

    Request

    > curl -H "Accept: application/activity+json" https://enigmatick.social/user/jdt/keys | jq
    

    Response

    {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Collection",
      "id": "https://enigmatick.social/user/jdt/keys",
      "totalItems": 39,
      "next": "https://enigmatick.social/user/jdt/keys?mkp=true"
    }
    

    Follow the next link to retrieve a KeyPackage

    This will mark the KeyPackage as distributed and would typically link it to the Actor that signed the request (that's temporarily disabled for testing).

    Request

    > curl -H "Accept: application/activity+json" https://enigmatick.social/user/jdt/keys?mkp=true | jq
    

    Response

    {
      "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://purl.archive.org/socialweb/mls"
      ],
      "type": "Collection",
      "totalItems": 1,
      "items": [
        {
          "type": "KeyPackage",
          "id": "https://enigmatick.social/key-package/cfde7b54-8d08-41e9-8eb5-d997a12e9347",
          "attributedTo": "https://enigmatick.social/user/jdt",
          "to": [
            "https://www.w3.org/ns/activitystreams#Public"
          ],
          "mediaType": "message/mls",
          "encoding": "base64",
          "content": "AAEAASCOWe7uxA8tPeI01nDP8ka2irEhgfkK2qM81/o+tEKPEiCz2h2Vv6VVuGSx/C0WINQCuazZm4rQAymxd1JdHGVvaSDurWzIE3z5eXUFz5coFGv9db7DxZDx0arb/gyRuidCAgABImh0dHBzOi8vZW5pZ21hdGljay5zb2NpYWwvdXNlci9qZHQCAAEIAAEAAgADAE0KAAEAAgADAAQABQwAAQACAAMABAAFAAcCAAEBAAAAAGeDNwsAAAAAZ/IDGwBAQJUffd/8/Efgt0ITBeMWfJYcb7S8E5U7yyUINiIUfqmsGwcvTyam6C+9F+k64NBEs0rXjGMjPA6AgiZ2oR4/1wwAQECliseeQfQb0zgq755ZiiujRqLkEWt8WOTJSsBXHK6hey6bNs4wet782NL8k92h1BNuPZDzxHaHXdXe1wgBO6QJ"
        }
      ]
    }
    
  • Adjusting #Enigmatick's previously built functions to align with the #ActivityPub #E2EE draft.

    KeyPackage collection on the Actor object

    Request

    > curl -H "Accept: application/activity+json" https://enigmatick.social/user/jdt | jq '.keyPackages'
    

    Response

    "https://enigmatick.social/user/jdt/keys"
    

    Retrieve the KeyPackage Collection

    These are populated by the client (the browser using the wasm module loaded in the Svelte SPA). I had a different mechanism in place for managing this (using the instrument field on Activities) but am updating it to use the Add flow for the Collection as specified by the draft.

    Request

    > curl -H "Accept: application/activity+json" https://enigmatick.social/user/jdt/keys | jq
    

    Response

    {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Collection",
      "id": "https://enigmatick.social/user/jdt/keys",
      "totalItems": 39,
      "next": "https://enigmatick.social/user/jdt/keys?mkp=true"
    }
    

    Follow the next link to retrieve a KeyPackage

    This will mark the KeyPackage as distributed and would typically link it to the Actor that signed the request (that's temporarily disabled for testing).

    Request

    > curl -H "Accept: application/activity+json" https://enigmatick.social/user/jdt/keys?mkp=true | jq
    

    Response

    {
      "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://purl.archive.org/socialweb/mls"
      ],
      "type": "Collection",
      "totalItems": 1,
      "items": [
        {
          "type": "KeyPackage",
          "id": "https://enigmatick.social/key-package/cfde7b54-8d08-41e9-8eb5-d997a12e9347",
          "attributedTo": "https://enigmatick.social/user/jdt",
          "to": [
            "https://www.w3.org/ns/activitystreams#Public"
          ],
          "mediaType": "message/mls",
          "encoding": "base64",
          "content": "AAEAASCOWe7uxA8tPeI01nDP8ka2irEhgfkK2qM81/o+tEKPEiCz2h2Vv6VVuGSx/C0WINQCuazZm4rQAymxd1JdHGVvaSDurWzIE3z5eXUFz5coFGv9db7DxZDx0arb/gyRuidCAgABImh0dHBzOi8vZW5pZ21hdGljay5zb2NpYWwvdXNlci9qZHQCAAEIAAEAAgADAE0KAAEAAgADAAQABQwAAQACAAMABAAFAAcCAAEBAAAAAGeDNwsAAAAAZ/IDGwBAQJUffd/8/Efgt0ITBeMWfJYcb7S8E5U7yyUINiIUfqmsGwcvTyam6C+9F+k64NBEs0rXjGMjPA6AgiZ2oR4/1wwAQECliseeQfQb0zgq755ZiiujRqLkEWt8WOTJSsBXHK6hey6bNs4wet782NL8k92h1BNuPZDzxHaHXdXe1wgBO6QJ"
        }
      ]
    }
    

    If the private keys are stored on the instance, how is this any better than what we have now?

  • If the private keys are stored on the instance, how is this any better than what we have now?

    @rimu@piefed.social What makes you think it's a private key? (It's not.)

    Here's some information with examples of how the keys are used and exchanged.

  • If the private keys are stored on the instance, how is this any better than what we have now?

    @rimu@piefed.social And no, the instance admin cannot decrypt the communications. The KeyPackage is a public key used to start an encrypted message exchange. But it cannot be used to decrypt any of the messages.

  • @rimu@piefed.social And no, the instance admin cannot decrypt the communications. The KeyPackage is a public key used to start an encrypted message exchange. But it cannot be used to decrypt any of the messages.

    Ah I see, thanks 👍

  • Ah I see, thanks 👍

    @rimu@piefed.social No problem!

  • Adjusting #Enigmatick's previously built functions to align with the #ActivityPub #E2EE draft.

    KeyPackage collection on the Actor object

    Request

    > curl -H "Accept: application/activity+json" https://enigmatick.social/user/jdt | jq '.keyPackages'
    

    Response

    "https://enigmatick.social/user/jdt/keys"
    

    Retrieve the KeyPackage Collection

    These are populated by the client (the browser using the wasm module loaded in the Svelte SPA). I had a different mechanism in place for managing this (using the instrument field on Activities) but am updating it to use the Add flow for the Collection as specified by the draft.

    Request

    > curl -H "Accept: application/activity+json" https://enigmatick.social/user/jdt/keys | jq
    

    Response

    {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Collection",
      "id": "https://enigmatick.social/user/jdt/keys",
      "totalItems": 39,
      "next": "https://enigmatick.social/user/jdt/keys?mkp=true"
    }
    

    Follow the next link to retrieve a KeyPackage

    This will mark the KeyPackage as distributed and would typically link it to the Actor that signed the request (that's temporarily disabled for testing).

    Request

    > curl -H "Accept: application/activity+json" https://enigmatick.social/user/jdt/keys?mkp=true | jq
    

    Response

    {
      "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://purl.archive.org/socialweb/mls"
      ],
      "type": "Collection",
      "totalItems": 1,
      "items": [
        {
          "type": "KeyPackage",
          "id": "https://enigmatick.social/key-package/cfde7b54-8d08-41e9-8eb5-d997a12e9347",
          "attributedTo": "https://enigmatick.social/user/jdt",
          "to": [
            "https://www.w3.org/ns/activitystreams#Public"
          ],
          "mediaType": "message/mls",
          "encoding": "base64",
          "content": "AAEAASCOWe7uxA8tPeI01nDP8ka2irEhgfkK2qM81/o+tEKPEiCz2h2Vv6VVuGSx/C0WINQCuazZm4rQAymxd1JdHGVvaSDurWzIE3z5eXUFz5coFGv9db7DxZDx0arb/gyRuidCAgABImh0dHBzOi8vZW5pZ21hdGljay5zb2NpYWwvdXNlci9qZHQCAAEIAAEAAgADAE0KAAEAAgADAAQABQwAAQACAAMABAAFAAcCAAEBAAAAAGeDNwsAAAAAZ/IDGwBAQJUffd/8/Efgt0ITBeMWfJYcb7S8E5U7yyUINiIUfqmsGwcvTyam6C+9F+k64NBEs0rXjGMjPA6AgiZ2oR4/1wwAQECliseeQfQb0zgq755ZiiujRqLkEWt8WOTJSsBXHK6hey6bNs4wet782NL8k92h1BNuPZDzxHaHXdXe1wgBO6QJ"
        }
      ]
    }
    

    @jdt

    >ActivityPub E2EE draft.

    Do you see any merit in that document?

    Looks like boilerplate to me.

  • @jdt

    >ActivityPub E2EE draft.

    Do you see any merit in that document?

    Looks like boilerplate to me.

    @silverpill@mitra.social it seems like a fair starting point to establish some common formats. There's clearly a lot of work still to be done.

    There are some choices that seem questionable to me; the document seems to imply that KeyPackages as an attribute of the Actor objects can be retrieved without much control. I think that's problematic. They're only usable one time and they could easily be exhausted if distribution isn't controlled (they have to be replenished by the client and the client has to maintain all active packages in its key store).

    I gate access behind a verified signature and record who is given which package at the server to establish some limits.


Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti
  • 0 Votes
    1 Posts
    8 Views
    I think I have identified a fairly significant flaw in how the #Fediverse currently operates. Hear me out.The Fediverse currently consists of all sorts of different systems - #Mastodon, #Friendica , #Pixelfed , #PeerTube, #BookWyrm , and so forth. And while they are all connected via the #ActivityPub protocol, they all have different functionalities and different ways of presenting themselves. Which is as it should be, because Diversity Is Our Strength(TM).However, it is here that the ActivityPub-based interactivity hits its limits - for usually, you can either experience the relevant system as it was intended, or you can interact with it, but not both - _unless_ you have an account on the same system (though not necessarily on the same instance).Let's say that you are a Mastodon user who looks at another person's BookWyrm page. You scroll through their books, posts, and comments. Then you see some comment you want to comment on yourself, but can you do so?Not directly. You need to figure out the URL of their comment, and then copy and paste that comment into the search bar of your Mastodon instance. Then it will show up in the same format as a Mastodon post, and you can interact with it - boost it, like it, comment on it.Sure, it works, but it's a whole lot of tedious effort.Or you can search for the user account in Mastodon and scroll through all their posts and comments as if they were a Mastodon user - and thus, you will miss out on all the unique user interface features of BookWyrm.So what is missing?Well, Mastodon already has an "Open original page" feature when looking at someone's post. What we need is an "Open original page AND AUTHENTICATE" feature. This way, the target instance (whatever software they are using) could acknowledge the viewer as an external user who could nevertheless fully interact with the local user interface, including the ability to boost, like, and make comments.This is something that should be theoretically possible to implement, right? #FediHelp
  • 0 Votes
    22 Posts
    37 Views
    @AdamStuartSmith yes! But it will only show up if the post you added it to has likes or shares. That said, it will not work on the frontage, only on singular posts.
  • 0 Votes
    27 Posts
    189 Views
    @silverpill oh, I see. I must have missed the context for the discussion, sorry. :) @technical-discussion @julian @grishka
  • Hey the #Fediverse

    General Discussion fediverse activitypub rss
    1
    0 Votes
    1 Posts
    14 Views
    Hey the #Fediverse!Today, I have released the version 0.1.0 of my new project, f2ap, an application that adds a compatibility layer for #ActivityPub to your website thanks to your #RSS/#Atom feed!You can see a running example at @blog! 🤩 Currently, only the support for Mastodon is guaranteed, but there are a lot of other platforms out there. If you are on another social platform, please help me document the platforms support! 🙏 https://github.com/Deuchnord/f2ap/wiki/Social-platforms-compatibility