Repository navigation
Add the integrity migration helper, roles and guide - #81
Open
WiktorB2004 wants to merge 11 commits into
Open
WiktorB2004 wants to merge 11 commits into
WiktorB2004 wants to merge 11 commits into
Conversation
audit_trail.integrity lists its public names in __all__ and loads them on first use, so writers import neither the verifier nor asyncio. The Ed25519 reference is audit_trail.integrity.ed25519, which needs the integrity extra. PartitionManager gains verify, averify, acknowledge and aacknowledge, which pass the trail's system_severity.
The application inserts every column except id and xid, after a REVOKE of its table-wide INSERT. The scrub-only role gets UPDATE of the erased columns only. New sealer and verifier roles. A role test upgrades a 0.3 install and tries what each role may and may not do.
A guide covering the tiers, the upgrade, the sealer, verify, retention, checkpoints and restores; the threat table and accepted risks in Limitations; salts in backups in the privacy guide; the role matrix.
This branch has not been deployed
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
Closes #73. This completes #68. It builds on #80 (checkpoints, signing and forks) and should be merged after it.
The tamper-evidence feature becomes public:
audit_trail.integritylists its public API in__all__:Integrity,verify/averify,acknowledge/aacknowledge, the report types and enums,Signer/SignatureVerifier,Checkpoint,export_checkpoint,ReplicationError,declare_forkand the sealer's result types. Names load on first use, so a writer imports neither the verifier norsqlalchemy.ext.asyncio.Integrityis also exported fromaudit_trail.audit_trail.integrity.ed25519, importable only with theintegrityextra.audit.maintenance.verify()/averify()/acknowledge()/aacknowledge()pass the trail'ssystem_severity, so an erasure whose receipt was retired is reported correctly without extra arguments.examples/roles.sql:INSERTand gets a columnINSERTwithoutidandxid;UPDATE(breaking, noted in the CHANGELOG);SELECTon the identity sequences (read by every seal after a fork with an id window) andpg_monitor(forexport_checkpoint(require_replicated=True)).FIRST n/ANY n, the short wait for a reconnecting standby, and theNO_SYNC_STANDBY/NOT_REPLICATED/CHECK_FAILEDreasons ofReplicationError), restores and forks (which checkpoints a signed fork explains, and theFORKED_UNSIGNEDnote), theALTERstall;Test plan
uv run pytestpasses locally, including the PostgreSQL tests intests/dbAUDIT_TEST_PG_IMAGE=postgres:14) as well as the default imageruff check,ruff format --checkandmypypassmkdocs build --strictpasses)CHANGELOG.mdUnreleasedbullet if callers should notice