Skip to content

Load persistent witness seeds from protected files - #30

Open
nirmalhk7 wants to merge 2 commits into
NTARI-RAND:mainfrom
nirmalhk7:nirmal/cloudy-witness-seed-file
Open

nirmalhk7 wants to merge 2 commits into
NTARI-RAND:mainfrom
nirmalhk7:nirmal/cloudy-witness-seed-file

Conversation

@nirmalhk7

@nirmalhk7 nirmalhk7 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Adds witnessd -seed-file so operators can retain their witness identity without putting private seed bytes in process arguments or shell history. The file holds a 32-byte Ed25519 seed encoded as 64 hex digits. Invalid input fails startup without generating a replacement identity or printing seed contents.

Linux and macOS require an effective-user-owned regular file with owner-only permissions. Checks and bounded reads use the same descriptor; final-component symlinks are refused. macOS also rejects extended ACLs through its native descriptor API and requires a cgo-enabled build. Other platforms and macOS builds without cgo refuse unchecked file loading. Existing -seed usage remains compatible with a deprecation warning, conflicting nonempty options are rejected, and no-option demo mode remains explicitly ephemeral.

Updates witness startup, operator documentation, and conformance notes. This persists key identity only: rollback memory remains ephemeral, and the change does not establish federation or a central registry. The protocol module and its dependency-leaf contract are unchanged.

Validation: startup regressions were observed failing before implementation, including a readable macOS ACL fixture, then passed. Stable public identity across restarts, malformed/oversized and insecure files, symlinks, secret-free diagnostics, and compatibility/demo behavior are covered. The full race-enabled Go suite, formatting, vet, build, Linux/Windows cross-builds, and macOS build without cgo passed. Current Janus document and invariant-ID binding checks passed; delegated gaps remain reported as such. Full Qlty scans introduced no new smells or check findings against the comparable uncapped baseline; existing findings remain.

Follows the Janus architecture and preserves the existing witness stand-in limitations.

Signed-off-by: Nirmal Khedkar <nirmalhk7@gmail.com>
Signed-off-by: Nirmal Khedkar <nirmalhk7@gmail.com>
@nirmalhk7
nirmalhk7 marked this pull request as ready for review November 11, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant