Repository navigation
Post 0.1.0 - #4
Merged
Merged
Conversation
Only SHADOWGATE_* keys are read from .env; unknown SHADOWGATE_* keys are still rejected, and shadowgate server reports them and exits 2 instead of raising a traceback.
- server/db.py: Transaction is the shared re-entrant lock and the unit of work. Nested calls join it; the outermost exit commits; any error (or a swallowed nested error) rolls everything back. - Queue, run engine and store no longer commit mid-operation. - /jobs, /agent/poll and /agent/result run as one transaction each, so a failed audit write or engine error leaves no stranded job and a retried result is recorded and advances the run (fixes the engine gap). - Enrollment writes its audit entry before committing (fixes F2). - AuditLog defers appends made inside a transaction and writes them just before the commit; they are dropped on rollback. - tests/test_transactions.py: 9 failure-injection tests, all failing on the previous code.
- After every write, <log>.head records the entry count and last hash; verify() detects removed or rewritten newest entries, a missing anchor, and reports where the chain breaks. - If the log changed behind the server's back, the next write keeps the old anchor as evidence and appends an audit_anchor_mismatch entry. - Head hash, count and size are cached per file; appends no longer re-read the log. - GET /audit?verify=true adds a verification object. - 13 audit tests; 12 fail on the previous code.
- shadowgate tls init: private CA and server certificate (EC P-256) for the given hostnames plus localhost/127.0.0.1; keys created mode 600; never overwrites. - shadowgate server --tls-cert/--tls-key (or SHADOWGATE_TLS_*): serves HTTPS; checks the files load together and the key is owner-only. A non-loopback bind without TLS is refused unless --allow-plaintext. - agent enroll --ca-file pins the CA in the 0600 credential file; plain HTTP to non-loopback hosts is refused; the agent stops (exit 2) when the server certificate fails verification. - tests/test_tls.py: 13 tests including an HTTPS end-to-end run with wrong-CA rejection.
- CI installs from the lock file and runs examples/demo.sh. - examples/demo.sh: HTTPS server, three agents, a runbook run, audit verification and a tamper check, in a temporary directory. - README: CI, release, license and Python badges; demo section. - Tracker §14 records N1, T11, T12, T14, CI and demo.
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.
No description provided.