Repository navigation
F5 masking, Gate 1 step 3: unmask, the lookup, the access review, reads audited - #216
Open
SauravYadav12 wants to merge 3 commits into
Open
SauravYadav12 wants to merge 3 commits into
SauravYadav12 wants to merge 3 commits into
Conversation
…ew, reads audited fox mask unmask <email> --branch b gives a masked account real values on one branch, its role's pgaudit.role set to bb_audit_read so its reads of marked tables are logged (closing 3.1). bb_mask.find(table, column, value) finds a person by an exact value, masked, 30 a minute, each call recorded without the value (fox mask lookups). The access review's Sees unmasked column. Two API routes; Unmask and Lookups on the Masking page; the column on the access review page.
…p record and the Gateway
|
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 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.
Masking (F5), Gate 1 step 3: unmask, the lookup, the access review's column, and audited reads (design, section 10). Builds on #214 and #215.
What it does
fox mask unmask <email> --branch b [--off] [--yes]gives a masked account real values on one branch, the same view its owner has. Only a masked account can be given it.pgaudit.role = bb_audit_read. This is a superuser's setting, so the account can't undo it.bb_audit_readholds SELECT on every masked table, so the audit log records this account's reads of marked tables, and only this account's. That finishes 3.1's last item.bb_mask.find(table, column, value): a masked account finds a person by an exact value without unmasking.fox mask lookupslists the record.POST /api/masking/unmaskandGET /api/masking/lookups, documented in openapi.yaml;mask.unmask.Limits (in the docs)
Checked live, then by the suites
On a throwaway PostgreSQL 18, the lookup:
ALTER ROLE … SET pgaudit.roleworks whether or not pgAudit is loaded, and the account can't override it.The suite found that an empty grants file was written as
null; it is now[].Tests
All in the fox-test VM, on the final code:
make integration: 829/829. The new §11ak covers:integration-v2: 403/403.integration-ui: 49/49, plus the upgrade test. The new test masks an account, gives it unmask, checks the access review lists it, then takes it off.integration-f5: 57/57;integration-f1: 70/70;integration-f6: 71/71.go vetfor macOS, Linux and Windows.Steps 4 (the access-path suite) and 5 (masked branches) follow.