Salta al contenuto
Citiverse è uno spazio aperto a tutte le comunità. Se vuoi aprire un gruppo locale o una sezione per la tua organizzazione, puoi contattare gli amministratori: pagina dei contatti.

I’ve been experimenting a bit with #Firefox and the #ActivityPub API, inspired by the work of @evan: https://github.com/social-web-foundation/activitypub-browser-extension

General Discussion
55 13 28
  • @pfefferle @evan Cheers!
    I now get a log-in page, and after logging in, I get a message "OAuth client not found."
    Looks like it's a bit early for me to be testing this, but looking forward to it being finished.

    scritto ultima modifica di
    #41

    @mancavgeek have you still the application password credentials in the advanced fields? if so, please remove these.

    you have to use the `@usernam@domain.tld` handle or the URL of your actor in the field. when you send me a screenshot of how you set up the addon, I can have a look! you can also DM me if you do not want to discuss in public!

  • @mariusor @pfefferle it's also not implied to be required!

    It's a good note, though. I'll add it as an issue for 1.1.

    scritto ultima modifica di
    #42

    @evan I'm reading the explanation on client to server Create activities as one:

    > When a Create activity is posted, the actor of the activity SHOULD be copied onto the object's attributedTo field.

    https://www.w3.org/TR/activitypub/#create-activity-outbox

    PS. I've added a short explanation of my position to the ticket you added. (Even shorter: as a client I want my activities to be propagated verbatim, unless the spec says otherwise)

    @pfefferle

  • @evan I'm reading the explanation on client to server Create activities as one:

    > When a Create activity is posted, the actor of the activity SHOULD be copied onto the object's attributedTo field.

    https://www.w3.org/TR/activitypub/#create-activity-outbox

    PS. I've added a short explanation of my position to the ticket you added. (Even shorter: as a client I want my activities to be propagated verbatim, unless the spec says otherwise)

    @pfefferle

    scritto ultima modifica di
    #43

    @mariusor @evan the problem with adding the `Actor` in C2S (not S2S!!) is, that you always have to proof it against the OAuth Actor to prevent impersonation or you have to completely ignore it and use the OAuth Actor anyways.

  • @mariusor @evan the problem with adding the `Actor` in C2S (not S2S!!) is, that you always have to proof it against the OAuth Actor to prevent impersonation or you have to completely ignore it and use the OAuth Actor anyways.

    scritto ultima modifica di
    #44

    @pfefferle yes, that's what I do.

    Get actor based on the OAuth2 token -> check it against the outbox -> check if it matches the activity actor.

    @evan

  • @pfefferle yes, that's what I do.

    Get actor based on the OAuth2 token -> check it against the outbox -> check if it matches the activity actor.

    @evan

    scritto ultima modifica di
    #45

    @mariusor @evan but then it is totally fine to skip it and auto set it with the OAuth Actor!? This saves a step 😉

    The only reason where it might be necessary would be a persona setup. You have one OAuth Account but want to publish as different persona Actors. But even that case does not make an `Actor` a required field!?

  • @pfefferle yes, that's what I do.

    Get actor based on the OAuth2 token -> check it against the outbox -> check if it matches the activity actor.

    @evan

    scritto ultima modifica di
    #46

    @pfefferle and since that's basically what you also need to do with the server to server activities (extract actor from signature -> check against the inbox -> check it matches activity's actor), that's a bonus that I don't need a separate pass (at this point) for the two flows.

    PS. I also don't find difficult to conceive a client/server where the actor that generated the token or signature can be *different* than the actor of the activity.

    @evan

  • @mariusor @evan but then it is totally fine to skip it and auto set it with the OAuth Actor!? This saves a step 😉

    The only reason where it might be necessary would be a persona setup. You have one OAuth Account but want to publish as different persona Actors. But even that case does not make an `Actor` a required field!?

    scritto ultima modifica di
    #47

    @pfefferle like I said, I can imagine a setup where a token from an actor is authorized to post to an outbox of another actor.

    Personally I don't see this kind of "optimization" being worth it. Explicit is always better than implicit.

    @evan

  • @pfefferle and since that's basically what you also need to do with the server to server activities (extract actor from signature -> check against the inbox -> check it matches activity's actor), that's a bonus that I don't need a separate pass (at this point) for the two flows.

    PS. I also don't find difficult to conceive a client/server where the actor that generated the token or signature can be *different* than the actor of the activity.

    @evan

    scritto ultima modifica di
    #48

    @mariusor @evan That's a different case, though, because in S2S I don't have an authenticated Actor!

    In the end, I'm fine with either approach, but I think @evan is right that we need to make this explicit in the spec to ensure interoperability.

  • @mariusor @evan That's a different case, though, because in S2S I don't have an authenticated Actor!

    In the end, I'm fine with either approach, but I think @evan is right that we need to make this explicit in the spec to ensure interoperability.

    scritto ultima modifica di
    #49

    @mariusor @evan and for Fedifox it was a quick fix, so it didn't really hurt 😉

  • I’ve been experimenting a bit with and the API, inspired by the work of @evan: https://github.com/social-web-foundation/activitypub-browser-extension

    The result is a little Firefox add-on that lets you interact with Fediverse content directly in your browser, without having to copy and paste URLs into search fields:

    scritto ultima modifica di
    #50

    Is it down or is something going wrong when trying it with Bonfire? When signing in after the SSO flow I get redirected to https://CODE1.extensions.allizom.org/?code=CODE2 which doesn't load.

  • @pfefferle yes, that's what I do.

    Get actor based on the OAuth2 token -> check it against the outbox -> check if it matches the activity actor.

    @evan

    scritto ultima modifica di
    #51

    @mariusor @pfefferle that makes sense.

    Requiring a property that can only have one value you can easily derive from other data does not.

  • @mariusor @pfefferle that makes sense.

    Requiring a property that can only have one value you can easily derive from other data does not.

    scritto ultima modifica di
    #52

    @evan sure, but I would be careful about making assumptions about which data is there.

    OAuth2 is mentioned in passing in the specification, and there's no explicit requirement that I remember that there's a direct connection between the OAuth2 token and an actor.

    You can perhaps add to the spec that *if* the actor is missing it should be inferred from the outbox.

    To me, even that's a bit tenuous because it requires further assumptions that the relationship actor <-> outbox collection is bijective. But nowhere does it say that if you have a collection you can find which actor owns it.

    1/2

    @pfefferle

  • @evan sure, but I would be careful about making assumptions about which data is there.

    OAuth2 is mentioned in passing in the specification, and there's no explicit requirement that I remember that there's a direct connection between the OAuth2 token and an actor.

    You can perhaps add to the spec that *if* the actor is missing it should be inferred from the outbox.

    To me, even that's a bit tenuous because it requires further assumptions that the relationship actor <-> outbox collection is bijective. But nowhere does it say that if you have a collection you can find which actor owns it.

    1/2

    @pfefferle

    scritto ultima modifica di
    #53

    Yes, there's heuristics you can apply to find an owner: attributedTo, iterate through actors and look if their outbox matches, etc.

    But from where I'm standing we have three orthogonal pieces of information when receiving a client to server request:

    1. An activity.
    2. An outbox collection.
    3. A valid authorization mechanism.

    You're telling me that they all point to the same actor, but based on my reading of the spec I am not convinced.

    From my perspective as a library implementer, I see no reason why these three need to be the same.

    So, yes, if you want this to be explicit, you should add it to the spec in some way.

    2/2

    @evan
    @pfefferle

  • @evan sure, but I would be careful about making assumptions about which data is there.

    OAuth2 is mentioned in passing in the specification, and there's no explicit requirement that I remember that there's a direct connection between the OAuth2 token and an actor.

    You can perhaps add to the spec that *if* the actor is missing it should be inferred from the outbox.

    To me, even that's a bit tenuous because it requires further assumptions that the relationship actor <-> outbox collection is bijective. But nowhere does it say that if you have a collection you can find which actor owns it.

    1/2

    @pfefferle

    scritto ultima modifica di
    #54

    > But nowhere does it say that if you have a collection you can find which actor owns it.

    I would venture to say that I can think of a few use cases where this is not immediately possible:
    1/ multiple actors have the same outbox
    2/ there is an explicit constraint that makes finding the actor impossible (a non public actor on a remote server maybe).

    These aren't fully reasoned through examples, so there might be other implications I'm missing that invalidates them.

    But it shows that perhaps leaving out exact expectations can leave room for interesting usages. 🤷

    @evan @pfefferle

  • Yes, there's heuristics you can apply to find an owner: attributedTo, iterate through actors and look if their outbox matches, etc.

    But from where I'm standing we have three orthogonal pieces of information when receiving a client to server request:

    1. An activity.
    2. An outbox collection.
    3. A valid authorization mechanism.

    You're telling me that they all point to the same actor, but based on my reading of the spec I am not convinced.

    From my perspective as a library implementer, I see no reason why these three need to be the same.

    So, yes, if you want this to be explicit, you should add it to the spec in some way.

    2/2

    @evan
    @pfefferle

    scritto ultima modifica di
    #55

    @mariusor @pfefferle Your takes are great for tightening the spec, so please keep sharing them!


Citiverse è un progetto che si basa su NodeBB ed è federato! | Categorie federate | Chat | 📱 Installa web app o APK | 🧡 Donazioni | Privacy Policy

Il server utilizzato è quello di Webdock, in Danimarca. Se volete provarlo potete ottenere il 20% di sconto con questo link e noi riceveremo un aiuto sotto forma di credito da usare proprio per mantenere Citiverse.