Scaffolding: Federation gateway setup#299
Merged
klpoland merged 22 commits intoJul 18, 2026
Merged
Conversation
Collaborator
Author
|
Added some dedicated API endpoints, serializers, and signals for federation and configuration that defaults to disabling federation sync. |
klpoland
force-pushed
the
feature-kpoland-federation-gateway-scaffolding
branch
2 times, most recently
from
June 25, 2026 19:02
9f94dfd to
83d51d0
Compare
klpoland
marked this pull request as ready for review
June 25, 2026 19:03
klpoland
force-pushed
the
feature-kpoland-federation-gateway-scaffolding
branch
from
June 25, 2026 19:53
83d51d0 to
4bbcbed
Compare
lucaspar
requested changes
Jun 25, 2026
lucaspar
requested changes
Jul 1, 2026
lucaspar
reviewed
Jul 1, 2026
…gic and local indexing before notify
Collaborator
Author
|
Refactor:
Hardening:
Logic Updates:
|
…(TODO: implement on federation app side), federation init/checks refactor, federation queryset reusability
…ween gateway and federation
…, make sure serializers have fields to pre-filter fed searches on gateway
lucaspar
reviewed
Jul 10, 2026
lucaspar
approved these changes
Jul 17, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 16c53ff. Configure here.
This file contains hidden or 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
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.

Note
High Risk
Touches API authentication scoping, new internal export surface with network ACLs, and irreversible publish rules on datasets—mistakes could block sync, leak export data, or lock dataset lifecycle incorrectly.
Overview
Adds gateway-side federation scaffolding so a local sync service can pull export payloads, with shared secrets and compose wiring at the repo root.
Export API and pipeline: New
/api/.../federation/export/*routes (datasets/captures list + detail) gated byFEDERATION_ENABLED, operational health (sync health, Redis,FederationSyncAPI key), and CIDR allowlists for internal callers. Public final datasets and linked captures are serialized for export, written tofed-*OpenSearch indices on change, and announced on a configurable Redis channel;post_savesignals schedule reindex after commit.Auth: Introduces
KeySources.FederationSync, mint viaget-federation-sync-api-key(DRF token fromfederation-shared.env),init_federation_sync_tokeninprepare_gatewaywhen federation is on, and globalDisallowFederationSyncKeyso sync keys cannot use normal asset APIs.APIKeyAuthenticationnow returnsNonewithout a header (multi-auth friendly) and attaches theUserAPIKeyasrequest.auth.Data rules: Datasets gain
federation_exportable()queryset helpers and validation that final status and public visibility cannot be reverted; detach-from-datasets only clears draft/private links (published links preserved), with federation reindex on dataset disconnect.Tooling:
generate-secrets.shwrites rootfederation-shared.env; local compose loads it; extensive federation tests and Pydantic contract checks againstsds_federation.Reviewed by Cursor Bugbot for commit 16c53ff. Bugbot is set up for automated code reviews on this repo. Configure here.