-
Notifications
You must be signed in to change notification settings - Fork 77
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
Requirement of id in Create activity #224
Comments
this seems to imply that you could maybe put the post id on the "Create" activity, and then inherit it to the post object? Not sure if that's what this is intended for though |
This feels like a question that might belong in the AS2 issue tracker? https://github.com/w3c/activitystreams/issues ¯_(ツ)_/¯ |
Actually it is ActivityPub that extends the requirement for a globally unique identifier from should to must. ActivityStreams2 vocab examples don't even have id's for activities. ActivityPub says:
And then ActivityPub says:
So I guess the options are:
I'm kinda assuming that |
sorry, to clarify: I was suggesting you use the null id. (and on the Note object, not the create—note the "parent context" language in the spec) |
Sorry, misunderstood, corrected. Still, it could be a valid option, maybe? Kinda stuck here, don't want to start implementing before this is cleared since it directly affects the library design and also whether I can directly use ActiviPy or change it to match. @cwebber do you have any opinions as editor about this? |
@jaywink So another option is, maybe, to use fragment identifiers. Here's an example:
This has a unique id, but is not expected to be retrievable as an independent document. This will probably work for federation, but it will be awkward for the client to server protocol, which requires a Location header to point to the activity. Note that in such a scenario you definitely need a signature solution if you're going to be passing the object around, since it won't be possible to retrieve it independently. |
Personally I would say there always needs to be a signature when federating, but well :) I'm not personally so interested in client-to-server. Maybe I'll wait and see how Mastodon will do the federation part, would love to be compatible with them. Or will implement the fragment identifier, let's see. Thanks! |
@jaywink Do you think the fragment identifier route + signatures satisfies this issue for you? |
I .. don't know :) I opened this partly for discussion and hoping to get comments from other implementers. I feel interop is the most important here. What is unclear to me if a non-functional I guess this can be closed since it doesn't really require any actions to spec? |
Let's close it but leave open the possibility of reopening if need be based on feedback during exploration, since it seems like we have an answer (for those using signatures that is!) @jaywink, I'm happy to test interoperability on this one. It seems interesting and worth exploring. |
this is still underspecified and a bit inconsistent across fediverse implementations: https://socialhub.activitypub.rocks/t/problems-posting-to-mastodon-inbox/801/11 > The reason might also be that your IDs aren’t permanent, as in, they contain a #fragment. Posts and their corresponding Create activities are supposed to be resolvable — which means one should be able to send a GET request to the ID URL and get the object back. This can’t be done with an URL that contains a fragment as the fragment is not a part of the HTTP exchange, it’s processed on the client. https://socialhub.activitypub.rocks/t/problems-posting-to-mastodon-inbox/801/23 > I ran into this object id #fragment problem as well. It seems because of some URL normalization, Mastodon will remove the fragment, and drop any additional posts with different fragments (because they become the same url). https://socialhub.activitypub.rocks/t/s2s-create-activity/1647/5 mastodon/mastodon#13879 (open!) w3c/activitypub#224 nothing in the http sig spec, example key ids aren't even URLs there: https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-message-signatures-16
I started implementing ActivityPub in federation yesterday and noticed something I had not (embarrassingly) given too much thought before.
Federated (server to server)
Create
is supposed to have anid
attached to it, as is obviously the object that was created as well. The intro (editorial draft) example for example is as follows:While in some use cases tracking the
Create
separately might make sense, for my social networking server it is a completely unnecessary extra thing. Storing the create separately not only requires the database objects but also mapping an endpoint to show the object, in case someone requests it. My server is multi-protocol, so I want to avoid protocol specific code/objects as much as possible. So I would like to do my implementation without specifying anid
for theCreate
object.Questions:
null
or just left out? This section hints both are valid cases?Note
id be placed as theCreate
id?(as suggested below)Edit: Clarification, I would write the library with the activity
id
but make it optional so the server I am working on doesn't have to create and track them.The text was updated successfully, but these errors were encountered: