TryGhost / TryGhost/ActivityPub

ActivityPub admin API should resolve site context by ghost_uuid

Open
#1,949 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
237
Forks
35
Avg merge
1d 16h
Merged PRs (30d)
60

Description

The ActivityPub admin UI can break when a Ghost site’s configured URL changes, because ActivityPub currently resolves site context from the request Host header.

Example:

  1. Ghost is initially configured at https://old.example.com
  2. ActivityPub stores site/account state for old.example.com
  3. The Ghost site URL is changed to https://new.example.com
  4. Admin loads from https://new.example.com/ghost
  5. ActivityPub admin API requests are proxied with Host: new.example.com
  6. ActivityPub cannot find the existing site row and returns site/auth lookup errors

Example logs:

No site found for 'new.example.com'
No key found for 'new.example.com'

Host-based lookup makes sense for public federation routes, where the URL is part of the ActivityPub actor/object identity. But for authenticated Ghost Admin API requests, the site identity should be stable across URL changes. sites.ghost_uuid seems like the better canonical identifier for admin-context resolution.

Suggested direction:

  • Resolve authenticated admin ActivityPub API requests by ghost_uuid, not request host.
  • Keep host-based lookup for public federation routes where URL identity matters.
  • Handle Ghost URL/domain changes as an explicit actor/domain migration concern, separate from admin API site lookup.

This should prevent the admin UI from breaking after a site URL change while preserving correct federation behavior.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing authenticated admin ActivityPub API requests and how they resolve site context from the request Host header. Check how sites.ghost_uuid is available for this lookup, while preserving host-based resolution for public federation routes. Done means admin requests continue to find the site after its URL changes without altering public federation identity behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.