-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Refactor ActivityPub handling to prepare for non-Account actors #19212
Merged
Gargron
merged 9 commits into
mastodon:main
from
ClearlyClaire:refactor/non-account-actors
Sep 21, 2022
Merged
Refactor ActivityPub handling to prepare for non-Account actors #19212
Gargron
merged 9 commits into
mastodon:main
from
ClearlyClaire:refactor/non-account-actors
Sep 21, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ClearlyClaire
force-pushed
the
refactor/non-account-actors
branch
3 times, most recently
from
September 21, 2022 13:16
b6b08a1
to
b32a4d7
Compare
…teActorService ActivityPub::FetchRemoteAccountService is kept as a wrapper for when the actor is specifically required to be an Account
…tchRemoteActorService
…through non-Account
ClearlyClaire
force-pushed
the
refactor/non-account-actors
branch
from
September 21, 2022 13:42
5945798
to
77ae6d3
Compare
Gargron
approved these changes
Sep 21, 2022
nametoolong
pushed a commit
to nametoolong/nuage
that referenced
this pull request
Sep 22, 2022
…odon#19212) * Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService ActivityPub::FetchRemoteAccountService is kept as a wrapper for when the actor is specifically required to be an Account * Refactor SignatureVerification to allow non-Account actors * fixup! Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService * Refactor ActivityPub::FetchRemoteKeyService to potentially return non-Account actors * Refactor inbound ActivityPub payload processing to accept non-Account actors * Refactor inbound ActivityPub processing to accept activities relayed through non-Account * Refactor how Account key URIs are built * Refactor Request and drop unused key_id_format parameter * Rename ActivityPub::Dereferencer `signature_account` to `signature_actor`
ClearlyClaire
added a commit
to ClearlyClaire/mastodon
that referenced
this pull request
Sep 24, 2022
Fix regression from mastodon#19212
nametoolong
pushed a commit
to nametoolong/nuage
that referenced
this pull request
Sep 26, 2022
Fix regression from mastodon#19212
kadoshita
pushed a commit
to kadoshita/mastodon
that referenced
this pull request
Nov 19, 2022
…odon#19212) * Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService ActivityPub::FetchRemoteAccountService is kept as a wrapper for when the actor is specifically required to be an Account * Refactor SignatureVerification to allow non-Account actors * fixup! Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService * Refactor ActivityPub::FetchRemoteKeyService to potentially return non-Account actors * Refactor inbound ActivityPub payload processing to accept non-Account actors * Refactor inbound ActivityPub processing to accept activities relayed through non-Account * Refactor how Account key URIs are built * Refactor Request and drop unused key_id_format parameter * Rename ActivityPub::Dereferencer `signature_account` to `signature_actor`
kadoshita
pushed a commit
to kadoshita/mastodon
that referenced
this pull request
Nov 19, 2022
Fix regression from mastodon#19212
ClearlyClaire
added a commit
to ClearlyClaire/mastodon
that referenced
this pull request
Jul 6, 2023
…odon#19212) * Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService ActivityPub::FetchRemoteAccountService is kept as a wrapper for when the actor is specifically required to be an Account * Refactor SignatureVerification to allow non-Account actors * fixup! Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService * Refactor ActivityPub::FetchRemoteKeyService to potentially return non-Account actors * Refactor inbound ActivityPub payload processing to accept non-Account actors * Refactor inbound ActivityPub processing to accept activities relayed through non-Account * Refactor how Account key URIs are built * Refactor Request and drop unused key_id_format parameter * Rename ActivityPub::Dereferencer `signature_account` to `signature_actor`
ClearlyClaire
added a commit
to ClearlyClaire/mastodon
that referenced
this pull request
Jul 6, 2023
Fix regression from mastodon#19212
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Group (#19059) federation will most probably work by representing group actors as something different from
Account
. Therefore, this PR prepares for handling requests to and from ActivityPub actors that would not be represented asAccount
in Mastodon.Currently, the only actors are
Account
, and this PR does not change that. #19059 will likely introduceGroup
that will implement a common interface withAccount
through:uri
inbox_url
keypair
Changes include:
ActivityPub::TagManager#uri_to_actor(uri)
to replace the uses ofActivityPub::TagManager#uri_to_resource(uri, Account)
, with the intent that it will potentially return aGroup
object in the futureActivityPub::FetchRemoteActorService
, with the intent that it will potentially return aGroup
object in the future. KeptActivityPub::FetchRemoteAccountService
as a wrapper that additionally checks the result is anAccount
signed_request_actor
to theSignatureVerification
concern, with the intent that it will potentially return aGroup
object in the future.signed_request_account
is kept as a wrapper that additionally checks the result is anAccount
require_signature!
torequire_account_signature!
in theSignatureVerification
concern. Addedrequire_actor_signature!
for use cases where we don't require the signer to be anAccount
ActivityPub::FetchRemoteKeyService
to potentially return non-Account
actorsActivityPub::LinkedDataSignature#verify_account!
toActivityPub::LinkedDataSignature#verify_actor!
and allowed it to potentially return non-Account
actorsactor_type
parameter toActivityPub::ProcessingWorker
so it can handle non-Account
actors (ActivityPub::ProcessCollectionService
has been changed to explicitly skip processing any non-Account
actor for now)ActivityPub::InboxesController
to accept potentially non-Account
actors