Skip to content
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

Add HTTP signatures to all outgoing ActivityPub GET requests #11284

merged 1 commit into from Jul 11, 2019


Copy link

Gargron commented Jul 10, 2019

This was a lot simpler than I thought it would be. All ActivityPub fetches are using fetch_resource so that's the only place where we need to add a signing account, besides FetchResourceService which works with HTML pages as well.

I'm removing the code for attempting to fetch without signature if fetch with signature fails because if #11269 will be enabled in the long-term it will be a waste of time.

Change default keyId format from acct to uri

@Gargron Gargron added the activitypub label Jul 10, 2019

This comment has been minimized.

Copy link

kaniini commented Jul 10, 2019

Picking a random account to sign the requests with is poor metadata hygeine. It would be desirable to ensure that Account.representative is a special account that represents the instance actor.


This comment has been minimized.

Copy link
Member Author

Gargron commented Jul 10, 2019

Instance actor is in the works, but this will do for now. It's only a random account when the "contact account" is not configured. But in either case it's the same account every time. The only risk/downside to this approach vs dedicated instance actor account is that personal accounts may be suspended on the remote end for personal reasons--or, in the case of reports, the remote admin may misinterpret the actions as personal rather than automated.

@Gargron Gargron force-pushed the feature-sign-all-requests branch 2 times, most recently Jul 10, 2019
@Gargron Gargron force-pushed the feature-sign-all-requests branch to 878cdd6 Jul 10, 2019
ThibG approved these changes Jul 11, 2019
Copy link

ThibG left a comment

Looks ok to me. Even though I agree an instance actor would be way cleaner, for this particular use case it seems like a good interim solution.

@Gargron Gargron merged commit 4e8dcc5 into master Jul 11, 2019
2 checks passed
2 checks passed
build-and-test Workflow: build-and-test
codeclimate All good!
@Gargron Gargron deleted the feature-sign-all-requests branch Jul 21, 2019
hiyuki2578 added a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
katsusuke added a commit to katsusuke/mastodon that referenced this pull request Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.