Federation data and actor keys (phase 1, step 1)
CI / validate-monitoring (push) Successful in 7s
CI / lint (push) Successful in 11s
CI / test (push) Successful in 57s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 5s

- federation_settings (per user; off, followers-only, not discoverable
  by default) and federation_keys (RSA-2048; NULL user = instance
  actor), on the federation migration branch
- Private keys encrypted at rest with Fernet, keyed by HKDF-SHA256 from
  FEDERATION_KEY_SECRET (now required, 32+ chars, never printed)
- Keys are created when a user first enables sharing and never
  regenerated; sharing.shared_user() treats unknown and non-sharing
  users identically
- One flask-smorest Api per app (get_api(app)), so apps with and
  without federation never share an OpenAPI spec
- Test fixtures for a second, federation-enabled app on the same DB

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
mattandClaude Opus 5.5 committed 2026-09-25 20:19:14 +01:00
1 parent 00ad8e9e6d
commit 98c65547f3
12 files changed
+513 -5

No files matched your search

+4
View File
@@ -18,6 +18,10 @@ log = logging.getLogger(__name__)
def init_app(app: Flask) -> None:
# Tables are always part of the schema (migrations run regardless), so the models
# are always registered; "off" means no routes, receivers or tasks.
from scrobbler.federation import models # noqa: F401
config = FederationConfig.from_mapping(app.config)
app.extensions["federation"] = config
if not config.enabled: