Expand description
__gunnar_secrets__ — per-repository secret material, on the same
one-RecordBatch-per-push log as crate::refs.
Deploy keys, webhook tokens and signing keys change with the same shape a ref
does: rarely, transactionally, and with a history worth keeping. So they use
the same mechanism (crate::pushlog) rather than a second one — the reason
this is a native package format and not two bolt-ons stapled together.
§What znippy is and is not responsible for
ciphertext is already encrypted by the caller. znippy never sees
plaintext, holds no key, and performs no encryption: it stores an opaque blob
and records what it is called and when it arrived. Anything else would put
key management inside an archiver.
Two consequences follow, and both are enforced here:
- ciphertext is high-entropy, so it is never compressed — the same law
that keeps znippy off
.packfiles.znippy_common::SkipPolicyis asked for the whole batch viasecret_skip_policy. - a secret that is stored unencrypted by mistake is a leak that no later fix
undoes, so
SecretUpdate::newrefuses empty ciphertext outright rather than writing a row that looks like a stored secret.
Structs§
- Secret
State - The state of one secret after replaying the log.
- Secret
Update - One secret update inside a push.
- Secrets
Log - The secrets log of one repository.
Functions§
- build_
push_ batch - fold
- Replay pushes into the current secret set. Last writer wins by
push_seq; a null ciphertext revokes. - read_
secrets - Read the sealed
__gunnar_secrets__section out of an archive. - secret_
skip_ policy - Secret material is ciphertext: it never compresses, so it never goes to the codec. One policy for the whole batch — the free, exact answer.
- secrets_
schema