Repository navigation
F5 masking, Gate 1 step 1: rules on confirmed findings, masked accounts - #214
Merged
Merged
Conversation
… accounts, live masks fox mask setup|rule|account, /api/masking and the console's Masking page. Rules (partial, hash, fake, empty) only on confirmed findings; Aadhaar never hashed or faked; masks kept in shadow tables by statement triggers; masked accounts in db_masked read masks and ordinary tables and cannot write to marked tables; admins and a branch's owner see real values; the cost is said before a rule is set (design, decision 9).
…on uninstall, test on main A CASE guarding a missing table still fails when planned, so whether bb.mask_rules and bb.pii_findings are there is asked first. Uninstall deletes the state directory's masking-key folder with sudo, as only the server's user may enter it. §11ai runs on main: an account reaches main and its own branches, and is exempt on those.
…n email Unmasking, and an owner's exemption, did nothing: to_regrole parses an identifier, and an email is not one. The role is looked up in pg_roles.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Masking (F5), Gate 1 step 1 (point 4.6, Enterprise; licence feature
masking). Built to the agreed design (docs/FOX_F5_Masking_Design.md) and decisions 2–4. Decision 9 was not answered, so the recommendation stands: the cost is accepted and is said before a rule is set.What it does
fox mask setup --branch b [--yes]previews, then:<state>/mask/default.key: 32 bytes, owner uid 999, mode 0400, in a 0700 folder;/run/bb-mask, restarting the branch only if it must;fox mask rule <[schema.]table.column> [--path $.a] [--rule hash|fake|partial|empty] [--off] [--yes]sets or takes off a rule.fox mask account <email> [--off] --yesmasks or unmasks an account. A masked account, on main and on branches it doesn't own:log_min_error_statement = panic).Admins can't be masked. Admins and a branch's owner always see real values.
Console: a new Masking page, where every change goes through a dialog that shows its cost. API:
/api/masking, admins only, documented in openapi.yaml. Every change is recorded in the security log.Fixed on the way
pg_roles.to_regroleparses an identifier, so it never finds an email.bb.mask_rulesexists. A guarding CASE still fails when the query is planned.fox uninstallnow removes the key folder even though the server's user owns it. If removal fails, it falls back tosudo rm -rf, but only for the state dot-folder.Limits (in the docs)
Tests
All in the fox-test VM, on the final code:
make integration: 792/792. The new §11ai covers:integration-v2: 403/403.integration-ui: 47/47, plus the upgrade test. The new masking.spec.ts covers a rule set after its cost, Aadhaar's choices, and an account masked and unmasked.integration-f5: 57/57;integration-f1: 70/70;integration-f6: 71/71.go vetfor macOS, Linux and Windows.scripts/test_feature_checklist.sh: in step (113 features). The PDFs were re-rendered.