Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/holger

.nornir/checksum-deploy-design.md

Checksum-verify-on-deploy (X-Checksum-*)

The write-path integrity gate: when a client uploads an artifact and advertises its digest, Holger recomputes that digest over the bytes it actually received and rejects a mismatch before any backend sees the write. Holger's pitch is "the bytes are what you think they are"; this makes it true at the front door, not just at rest.

Why

Holger already guarantees integrity at rest (blake3 per-chunk verify on read, sha256 in the Cargo index, OCI digest verify) and on pull-through (upstream bytes are checked against the upstream's advertised sha256 before caching). The one hole was on deploy: a corrupted or truncated PUT — a flaky airgap USB copy, a half-written CI upload, a MITM on a mis-configured plaintext hop — was accepted as-is. Artifactory closes this with checksum-deploy: the client sends X-Checksum-Sha256 and the server verifies. Holger now does the same.

Contract

Where it lives

server/lib/src/exposed/http.rs:

Reuses the crate's existing sha2 + hex deps (already present for pull-through cache verification) — no new dependency.

Scope / non-goals

Tests

Eight unit tests in exposed::http::tests (checksum_*): absent header, empty header, sha256 match, uppercase-hex match, sha256 mismatch, garbage/short digest, sha512 match+mismatch, both-digests match. Pure-function coverage, no network — runs in the default cargo test -p holger-server-lib pass (the tests-in-code convention, matching the sibling rbac_* tests in the same module).