-
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
Revisit the https://www.w3.org/ns/activitystreams#Public
== as:Public
== Public
equivalence and guidance
#404
Comments
For anyone curious, here's what it would take for the inclusion of
EDIT: Apparently it can be done with JSON-LD 1.1 Section 4.2.3 "Type Coercion" describes this in further detail: https://www.w3.org/TR/json-ld11/#type-coercion Examples 65 and 66 show this in further detail. In order to make use of this, the context document needs to change Example doc:
Expands to:
Compacts to:
|
This issue has been mentioned on SocialHub. There might be relevant details there: https://socialhub.activitypub.rocks/t/fep-7502-limiting-visibility-to-authenticated-actors/3784/2 |
@nightpool — Please edit your #404 (comment) and codefence every instance of any |
One thing I am not entirely clear on wrt
or doing something like
My immediate take is that these relative IRI references should probably be avoided, even though they are valid. But in order to keep the possibility open, one would have to go with the "do nothing, use as:Public" option (and keep the coercion as |
My understanding is that relative URIs / base URI are explicitly disallowed
by either as2 or AP, I seem to remember some language somewhere about it
…On Wed, Dec 27, 2023, 1:21 PM a ***@***.***> wrote:
One thing I am not entirely clear on wrt @type: @vocab is whether it
makes sense to close the door entirely on addressing IRIs relative to the
@base. For example there is the possibility of doing something like
@context: [
activitystreams, {
@base: https://example.com/
}]
to: [users/1, users/2]
or doing something like
GET https://example.com/actor
@context: activitystreams
inbox: inbox # expands to https://example.com/actor/inbox
outbox: outbox # expands to https://example.com/actor/outbox
My immediate take is that these relative IRI references should probably be
avoided, even though they are valid. But in order to keep the possibility
open, one would have to go with the "do nothing, use as:Public" option (and
keep the coercion as @type: @id)
—
Reply to this email directly, view it on GitHub
<#404 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABZCV7BQQ27SGZ6FHFT7TLYLRYLTAVCNFSM6AAAAABA4SP6SGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQGU3DOMRVG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@nightpool — Please edit your new #404 (comment) and delete the quoted email content, which includes a number of |
Hi Ted,
Sorry, but I cannot edit my email message at this time. I'm sure that
whoever has the GitHub username "id" is used to getting these sorts of
mentions at this point and has them configured appropriately.
…On Wed, Dec 27, 2023, 1:32 PM Ted Thibodeau Jr ***@***.***> wrote:
@nightpool <https://github.com/nightpool> — Please edit your new #404
(comment)
<#404 (comment)>
and delete the quoted email content, which includes a number of name,
which cannot be codefenced because GitHub doesn't handle Markdown in
emailed comments. Sorry to keep banging on this drum, but it's the only way
to prevent pinging those uninvolved GitHub users.
—
Reply to this email directly, view it on GitHub
<#404 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABZCV5KZGHHZVXSFNGUJC3YLRZV3AVCNFSM6AAAAABA4SP6SGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQGU3TIMRVHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
2.2 of as2-core says
so that's a SHOULD NOT, not a MUST NOT, but good catch anyway! still worth keeping in mind that type:vocab makes things relative to the vocab mapping and not the base mapping. |
"expected" language is good for non-normative discussion (primer or the like), instead of "should" or "must" that are often read as normative even in non-normative documents (or non-normative sections of normative documents) and even when lowercase |
I think the best steps for us right now are as follows:
|
Speaking of considerations and next versions, a more ideal path forward might be to consider not putting the Public pseudo-collection in the addressing properties at all, but instead defining a new property If we go "all the way" and adopt WAC in some form, it could look something like this at ~minimum: {
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"acl": "https://www.w3.org/ns/auth/acl#",
"accessControl": {
"@id": "acl:accessControl",
"@type": "@id"
},
"aclMode": {
"@id": "acl:mode",
"@type": "@vocab"
},
"agentClass": {
"@id": "acl:agentClass",
"@type": "@vocab"
},
"agent": {
"@id": "acl:agent",
"@type": "@id"
},
"Agent": "http://xmlns.com/foaf/0.1/Agent", // this is technically the same thing as Public, so it could be considered redundant, but presumably the WAC side of things will include this anyway
"AuthenticatedAgent": "acl:AuthenticatedAgent",
"accessTo": {
"@id": "acl:accessTo",
"@type": "@id"
}
}
],
"id": "https://domain.example/some-object",
"type": "Note",
"attributedTo": "https://domain.example/the-author",
"content": "This is Public, as signaled by WAC and the ACL ontology",
"accessControl": [
{
"type": "acl:Authorization",
"agentClass": ["Public", "Agent"], // these mean the same thing
"aclMode": "acl:Read",
"accessTo": "https://domain.example/some-object"
},
{
"type": "acl:Authorization",
"agent": "https://domain.example/the-author",
"aclMode": ["acl:Read", "acl:Write"],
"accessTo": "https://domain.example/some-object"
}
]
} If we go with something more bespoke: {
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"visibilityClass": {
"@id": "as:visibilityClass",
"@type": "@vocab"
}
}
],
"id": "https://domain.example/some-object",
"type": "Note",
"attributedTo": "https://domain.example/the-author",
"content": "This is Public, as signaled by a new property",
"visibilityClass": "Public" // no more as:Public, this actually uses the vocab mapping
} Over time, consumers should be encouraged to support this new property. After some time has passed, producers should be discouraged from addressing There's no seamless way to do this, but that's more because addressing as:Public was a mistake and should not have been used to signal visibility. There is a slight consideration for an exemption, which is to have clients explicitly signal that they are opting into the "deliver to all shared inboxes" behavior that is lightly touched upon in the spec as a MAY. |
We did not find any examples of Uses of full URI in AP:
I've added errata for these examples and note to https://www.w3.org/wiki/ActivityPub_errata/Proposed
|
I might suggest (without the parenthetical) —
|
Motivation
Continuing from #264 and with this JSON-LD playground link, we make the following observations:
as:Public
and never asPublic
;Public
actually does not expand to the full IRI in any circumstance!We further observe, from the JSON-LD spec:
@type
or as a property name, or "elsewhere that a string is interpreted as a vocabulary item". So the"Public": "as:Public"
term definition has no current effect.@type: @id
or@type: @vocab
. The former (ID value) will only process IRIs, i.e. it will only process when a colon is present. The latter (Vocab value) will first try to interpret the string as a term. Thus, we can override the behavior observed in observation 4, provided that we use@type: @vocab
. (See next comment for more exploration.)Relevant quotes
1.4 Terminology:
3.2 IRIs:
4.2.3 Type Coercion:
Pitch
In summary, the logical conclusion is as follows: Pick one of the following.
Make no changes; use
as:Public
Per the 1st and 2nd observations, we make no changes but instead make the following guidance:
Implementations MUST use
as:Public
in order to be consistent with the compacted form; however, they SHOULD treathttps://www.w3.org/ns/activitystreams#Public
andPublic
as equivalent for compatibility with existing applications (and these uses should be phased out or dispreferred)Per the 3rd and 4th observation, the term definition for
Public
=>as:Public
can be removed.Change to
@type: @vocab
; usePublic
Per the 5th observation, we can change the
@type
ofto
,cc
,audience
,bto
,bcc
from@type: @id
to@type: @vocab
. This would result in thePublic
term definition actually taking effect. Hence:Implementations MUST use
Public
in order to be consistent with the compacted form; however, they SHOULD treathttps://www.w3.org/ns/activitystreams#Public
andas:Public
as equivalent for compatibility with existing applications (and these uses should be phased out or dispreferred)Make a normative change; use
https://www.w3.org/ns/activitystreams#Public
This is more of a breaking change, and as explained above, unfavourable. In order to ensure consistency with the compacted form, it requires dropping the
as
term definition / prefix entirely, and rewriting the context document to stop using compact IRIs in all@id
definitions. This would result inhttps://www.w3.org/ns/activitystreams#Public
being the only valid representation. Hence:Implementations MUST use
https://www.w3.org/ns/activitystreams#Public
; however, they SHOULD treatPublic
andas:Public
as equivalent for compatibility with existing applications (and these uses should be phased out or dispreferred)The text was updated successfully, but these errors were encountered: