From 47e15f7a465976c2cd3fea3caf9199c2ebbb9527 Mon Sep 17 00:00:00 2001 From: Brad Seiler Date: Mon, 9 Nov 2026 15:19:34 -0800 Subject: [PATCH] test(relay): classify operator invite mint restrictions Bind the operator invite route to its signed router regression: clear owners and admins mint, while a restricted admin and unauthorized actors are refused. Co-authored-by: Honor Signed-off-by: Brad Seiler --- TESTING.md | 4 ++++ .../tests/fixtures/community-ban-regressions.tsv | 1 + .../tests/fixtures/community-ban-route-inventory.tsv | 1 + 3 files changed, 6 insertions(+) diff --git a/TESTING.md b/TESTING.md index 6aed9335be..de0f25499d 100644 --- a/TESTING.md +++ b/TESTING.md @@ -90,6 +90,10 @@ verified owners and v1/v2 lifecycle behavior; see for the authoritative contract. Relay-operator APIs, deployment-admin APIs, NIP-FI commands, the localhost Git hook, and the gated mesh test endpoint use separate auth planes; each exemption is recorded in its route row. +Operator-mediated invite minting is restriction-enforced: the operator attests +the actor, and the relay checks that actor's community role and restrictions. +Its PostgreSQL route regression mints for clear owners and admins, then rejects +a banned admin and actors without authority. Secret-authenticated workflow webhooks recheck the saved workflow owner's community ban through the workflow engine. Their PostgreSQL regression covers owner bans, tenant scope and failed lookups. No sibling coverage remains pending. diff --git a/crates/buzz-test-client/tests/fixtures/community-ban-regressions.tsv b/crates/buzz-test-client/tests/fixtures/community-ban-regressions.tsv index 5385e8ade7..0b4149f9d1 100644 --- a/crates/buzz-test-client/tests/fixtures/community-ban-regressions.tsv +++ b/crates/buzz-test-client/tests/fixtures/community-ban-regressions.tsv @@ -1,4 +1,5 @@ id file test lane property +operator_invite_mint crates/buzz-relay/src/api/operator/postgres_tests/invite_postgres_tests.rs operator_mints_invites_only_for_relay_owners_and_admins postgres-ci operator_attests_actor_relay_checks_role_and_restriction_with_owner_admin_controls http_membership crates/buzz-relay/src/handlers/ingest.rs relay_membership_step_refuses_banned_member_on_http postgres-ci ban_and_unbanned_http_gate root_admission crates/buzz-relay/src/handlers/auth.rs fi_ban_denial_emits_terminal_authorization_denied postgres-ci root_nip42_ban_denial root_admission_race crates/buzz-relay/src/handlers/auth.rs ban_committed_during_auth_refuses_admission postgres-ci admission_ban_race_and_other_community_control diff --git a/crates/buzz-test-client/tests/fixtures/community-ban-route-inventory.tsv b/crates/buzz-test-client/tests/fixtures/community-ban-route-inventory.tsv index 96ab35509b..cc1266330f 100644 --- a/crates/buzz-test-client/tests/fixtures/community-ban-route-inventory.tsv +++ b/crates/buzz-test-client/tests/fixtures/community-ban-route-inventory.tsv @@ -16,6 +16,7 @@ workflow_approvals relay GET /workflows/{workflow_id}/runs/{run_id}/approvals co operator_list_communities relay GET /operator/communities operator_control not_applicable not_applicable:relay_operator_control classified - operator_provision_community relay POST /operator/communities operator_control not_applicable not_applicable:relay_operator_control classified - operator_list_joined_communities relay GET /operator/communities/joined operator_control not_applicable not_applicable:relay_operator_control classified - +operator_mint_community_invite relay POST /operator/communities/invites operator_control conditional enforce pg:operator_mints_invites_only_for_relay_owners_and_admins owner operator_register_listener_keys relay POST /operator/listener/pubkeys operator_control not_applicable not_applicable:relay_operator_control classified - operator_remove_listener_keys relay DELETE /operator/listener/pubkeys operator_control not_applicable not_applicable:relay_operator_control classified - operator_archive_community relay POST /operator/communities/archive operator_control not_applicable not_applicable:relay_operator_control classified -