-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delivering to Collections can be ambiguous #486
Comments
I think this issue is particular for the |
There's a very strong difference between addressing a collection (and the expansion of the collection to inboxes used for delivery) and |
In a Groups context, a Group Actor would probably have a |
w/r/t Group protocol i am going to defer to swicg/groups discussion but the general pattern is that if something has an inbox AND if that same thing is an indirect standin for some other expansion, then you will run into the same issue for addressing and delivery. you might be able to do it solely for access control, but that would require an access control mechanism separate from addressing (since addressing triggers delivery). example possible flows:
example impossible flows:
essentially the workaround for Group addressing would be to define that but the Collection has no such workaround, because the only way you could fix this issue is by revising the requirement to expand Collections in |
Activities are delivered to actors, the spec is very clear about it. |
@silverpill The spec is also clear that anything can be an actor. https://www.w3.org/TR/activitypub/#actors An AP Actor is defined as "MUST have Regardless of whether you consider a Collection with an inbox to be an "actor" or not (by whatever definition), the issue remains. Would it help you to consider a Collection as a "resource" instead of an "actor"? It makes no difference -- it remains impossible to address (to/cc/audience/bto/bcc) such a "Collection with an inbox" in any Activity posted to a C2S outbox without also inadvertently triggering delivery for inboxes on any/all items. At present, this also makes it impossible to Follow a Collection, because you can't send the Follow to that Collection without also potentially sending it to thousands of unrelated resources that also have inboxes. Or at the very least, if not sending to thousands of unrelated inboxes, then checking thousands of unrelated resources for inboxes that may or may not be there (and are unintended recipients in either case). Given all this, it is clear that Collections are in some way straddling the line between "resource"/"object" and "view"/"presentation". You can refer to Collections as resources by their id, but they might not be fully real/reified. In particular, the reference to the Collection in the addressing properties is an indirection that MUST be unpacked. This means that Collections are not fully real with respect to addressing: they are both "real" (wrt inbox) and "not real" (wrt iterating over items). |
No, it is not clear. The next big section after 4. Actors is 5. Collections, implying that they are different things. This interpretation is consistent with ActivityStreams 2.0 which defines different core types and doesn't say that anything can be anything. Existing ActivityPub implementations also don't mix core types. The real problem that should be addressed here is a missing definition of an actor in ActivityPub spec. Currently it is too vague and hints at the possibility of nonsensical objects such as collection-actors, activity-actors and link-actors, leading to issues like this one. |
"Objects" gets its own section, which doesn't imply anything about Actors/Activities/Collections not being Objects.
Note that in https://www.w3.org/TR/activitystreams-core/#model there is no "Actor" core type. But as https://www.w3.org/TR/activitypub/#actors notes,
So ActivityPub is clear that actors are just objects that have id, inbox, outbox. We might consider whether it makes conceptual sense for something to carry out an activity or not, but there is not a limit nor a prohibition on any specific type. The only disjoint relation is that an Object cannot also be a Link, or vice versa -- and actors are Objects. But aside from that, you could make anything an actor. Whether it is a good idea to make certain things into actors is a separate concern. Outside of ActivityPub, Ultimately, addressing properties like |
I agree with (afaict) everybody else in this thread that using a Collection as an actor is probably a bad idea. I see the impulse but I don't think it's the right road to go down. |
It might be a bad idea right now, but what's the solution here? My thinking is that either:
I understand that the likely intent of including Collections in the addressing properties was to enable features like addressing the Public collection or addressing specific Unfortunately I don't really know how to proceed thinking about this without clarity on what exactly a Collection is -- the underlying data model, if any. Also, when should we be indirect? When should this indirection apply? Because taking the followers collection example again, we currently have a lot of gaps with semantic closure when it comes to the Collection concept. By claiming a relation between an Object and a Collection, we are never actually relating the Object to the items of that Collection at all! In other words, given the following: {
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://domain.example/~alice/",
"type": "Person",
"followers": {
"id": "https://domain.example/~alice/followers/",
"type": "Collection",
"items": ["https://domain.example/~bob", "https://domain.example/~charlie"]
}
} We actually cannot conclude anything about any possible relations between ~alice and ~bob, or between ~alice and ~charlie. Sure, we can establish application logic to post-process this and determine that If our data model instead looked like this: {
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://domain.example/~alice/",
"type": "Person",
"IsFollowedBy": ["https://domain.example/~bob", "https://domain.example/~charlie"]
} ...then we could make that conclusion. A further complication is that looking solely at a Collection, it is not possible to immediately know what purpose that Collection serves; for example, we don't know that an addressed Collection is specifically a Consequently, this makes handling addressees which happen to be Collections more difficult than it needs to be. And in the intended use case where the Collection is actually an indirection for addressing its items, then this means that any servers involved need to recognize which of the addressed IRIs are indeed Collections. (This may not be public information.) All this makes me wonder if there's a better way... Some unambiguous mechanism such that:
The polymorphism here seems to be the root of the issue. Or rather, the inconsistency of behavior that arises from that polymorphism. |
@trwnh Looks like it was not included by mistake. I opened an issue: w3c/activitystreams#633
In practice, collections usually are views, so I think such re-definition may make sense. |
@silverpill i still think that an AS2 "Actor" and an AP "actor" are not the same thing. regardless, the issue is about outbox delivery to associated inboxes, so a concrete making breaking it down into RDF triples, you basically have certain triples which mean different things than other triples of the same form... which is not a good way to model information:
now compare with using a different property:
in the first example, we don't actually know that but in the second example, we actually do know that |
One thing discussed in triage was making a future update to the spec with these changes:
|
User storiesAt request of Evan in issue triage, to cover user stories... The main user story is "following a conversation". The naive interpretation is that a conversation can be represented by a Collection, but this approach makes it unclear where to send a Follow and have it be handled. The main workaround right now is to instead differentiate between the conversation and its posts; we might do this with a More generally, a Collection is a resource like any other, and like any other resource, it can have an ConclusionsFor conclusions, I think the main takeaway here is that we should consider a Primer and some language in Next Version along the following lines:
I'm not sure to what extent it makes sense to consider new types or new properties in a Next Version, but if there was appetite for that then we could consider those at a later point. |
I can think of two good options:
These options are compatible with existing implementations, and don't require major changes in specs. |
@silverpill "You can send a Follow of any object to its attributedTo" is a major change to the spec. Who's to say that this is supported? We could try to spec out this kind of flow where actors might be responsible for managing updates to their owned objects (how much can the server help with here?), but "You can send a Follow to anything with Consequently, as I detailed in the rest of my previous comment beyond the first sentence, the model I am toying with right now is to represent a conversation not by a Collection but by an Object, and to instead associate a Collection with that Object via some property. I'll not repeat myself on the particulars, but this is all that can be really done because Collection is/remains unique with respect to the outbox delivery algorithm and its discovery of inboxes. The only way to treat a Collection with an inbox is to deliver to both the Collection's inbox and to the Collection's items' inboxes. I've already argued the particulars of this too as well, about 2 comments ago on this issue -- and how the problem was solved in other specs by having different vocab terms for different types of values: agents, groups, and classes are distinct authorization targets in WAC, with
|
This is what FEPs are for. I don't understand what you mean by ambiguity and uncertainty and why would anyone need to travel across multiple levels to get an actor.
https://www.w3.org/TR/activitypub/#follow-activity-outbox To work around this limitation, a different activity type can be used, e.g.
Sounds similar to solution 1, except you want to use Object instead of Actor. |
Reference
The issue
For a Collection that also has an
inbox
,inbox
items
and try to discover anyinbox
for each itemThere is no way to deliver to just the
Collection.inbox
, because the collection expansion during delivery is a MUST. This can cause issues especially when some or all of the Collection's items don't have aninbox
, or even when the items have aninbox
but aren't intended recipients.Examples
For example, say a Collection represents a feed in the same way one might construct an RSS or Atom feed. Delivering to this Collection might trigger additional behaviors, such as adding a post to the collection. For every post added to the collection, the subsequent delivery will have an additional undeliverable target to iterate through. A collection with n posts will cause the server to discover the 1 inbox of the collection itself, and then iterate through n items, which might either lack an inbox, or they might have an inbox which wasn't intended for delivery.
More concretely, consider the article https://csarven.ca/linked-data-notifications and a Collection that contains this Article. Both of these have an
inbox
.I construct an Activity and address it to the Collection:
However, when I POST this activity to an ActivityPub outbox, the ActivityPub server will do two things when only one is desired:
https://inbox.example
(intended)https://linkedresearch.org/inbox/csarven.ca/linked-data-notifications/
(undesirable, as this is notifying the article of an activity that was completely unrelated to it!)Further analysis
This problem applies more generally to anything that by some protocol is expected to expand to something else, while it simultaneously has its own inbox. If a protocol for Group membership, addressing, delivery, distribution, etc. were to be specced out (as https://github.com/swicg/groups aims to do), then it would face the same issue if the Group had both an
inbox
andmembers
and delivering servers were expected to expand anyGroup.members
in the same way that they currently are required to expandCollection.items
.Also, there is a concern that the addressing properties are trying to do too much. In ActivityPub, we consider
to
,cc
,audience
,bto
,bcc
for delivery, but "delivery" means more than just "discover an inbox and POST to it". There are edge cases and special cases that dilute the utility of this mechanism, such as expanding collection items, or skipping the Public pseudo-collection (which is itself bugged, as #404 describes).Something noteworthy about other specs like Web Access Control is that they make an explicit distinction between various forms of targeting, by separating what would have otherwise been a single property into specifically three different things:
agent
, which is a list of individuals by their WebIDagentGroup
, which is a list of groups that expand to member individuals and their WebIDagentClass
, which is a list of vocabulary terms that represent conceptual categories that an agent might matchAgent
is basically the same as what we callPublic
(no identity required)AuthenticatedAgent
is anyone who can be identified (e.g. with a WebID)Resolution
In a primer page, this issue should be described.
In a next version, it might be worth considering a similar split to Web Access Control, because these really are different things, and concerns should be separated.
The text was updated successfully, but these errors were encountered: