Repository navigation
Conversation
Plant private and public records, then call every read route as every persona and search each raw response for markers that persona may not see. A positive control checks each persona still receives what it may see. The route registry lists every served route as swept, a write, or exempt with a reason, and a tripwire fails on unlisted or stale routes. A persona tripwire fails when a user or collection role has no persona acting with it. The publication-identifier routes are strict known leaks until #809's policy on publication_identifiers is enabled (#878). Closes #810
Coverage Report for CI Build 46492356966Warning No base build found for commit Coverage: 91.726%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
…issing The core-dependency CI job installs no server extras. Collection failed there because the permissions conftest and the persona tripwire import the canary at module level, and the canary needs cryptography.
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.
Summary
Adds a permission canary for the RLS work (#808). It plants public and private records carrying distinctive markers, calls every read route as every persona below admin, and fails if a response carries a marker that persona may not see. Route and persona tripwires fail closed, so a new route or role can't go unexamined. It runs against today's Python permission layer now and keeps running once RLS is enabled. The canary checks what each persona can reach across the whole API, not how any single route behaves.
make_collection_memberandmapper_clientjoinmake_contributorintests/conftest_optional.py.VISIBILITYincanary.pymaps each kind of planted record to the personas who may see it, and each marker has a kind.Readroute, including the POST searches and lookups, is called as every persona with the raw body searched, so JSON, CSV and NDJSON are checked the same way. An error that only repeats an identifier the caller sent doesn't count as a leak; a 5xx fails.route_registry.pykeys every served route by method and path as aRead, aWriteor anExempt. The tripwire fails on an unlisted route, a listed route that's gone, or an unswept route without a written reason. Writes are listed with what their response can carry but aren't swept yet; sweeping them needs fresh planted data per persona, which the test harness redesign's per-test templates make cheap.ROLE_PERSONASorVISIBILITYnames a persona the sweep doesn't run.Known leaks are
xfail(strict=True): four GET and two POST publication-identifier routes serve a publication cited only by private records, which no Python filter hides. #809's policy onpublication_identifierscloses them once RLS is enabled (#878).Not covered yet: no tripwire ties planted records to the guarded tables in
mavedb.db.rls.RELATIONS. That follows #809.Stacked on #1018; retarget to
release-2026.3.4once it merges.Closes #810
Tests
bin/checkbin/t tests/ -n 6 -m "not network and not slow": 5896 passed, 22 skipped, 6 xfailed.Checklist
release-<year>.<n>.0branch otherwise; never
mainmavedb-uiPR regeneratessrc/schema/openapi.d.ts(not applicable: tests only)