httk.core.project.manifests¶
The deterministic, signed project manifest.
A manifest is a signed record of every file in a project tree at one moment: the same canonical, sorted record list a seal is built from, wrapped in a v2 JSONL.bz2 document with a domain-separated Ed25519 signature over its body. A manifest covers the whole tree minus what each member decides to leave out of its own internals, so payloads stay covered while working scratch does not.
Verification answers the two questions a signature always raises separately — does this manifest still describe this tree (the digests and signature) and was it made by a key this project pins (a trust anchor that never comes from the manifest itself).
Attributes¶
Classes¶
What verifying one manifest against one tree established. |
Functions¶
|
Return the default manifest exclusions plus the project's configured ones. |
|
Create and atomically publish the signed v2 project manifest. |
|
Return the trust anchors of project plus every explicitly named key. |
|
Classify a verified signature against the trust anchors of a project. |
|
Verify a project's v2 manifest against the tree and its trust anchors. |
Module Contents¶
- httk.core.project.manifests.project_exclusions(metadata)[source]¶
Return the default manifest exclusions plus the project’s configured ones.
- httk.core.project.manifests.create_manifest(project=None, *, output=None)[source]¶
Create and atomically publish the signed v2 project manifest.
- Parameters:
project (str | os.PathLike[str] | None) – Locate the project to snapshot, or use discovery when unset.
output (str | os.PathLike[str] | None) – Publish the manifest at this path, or use the project default.
- Returns:
The published manifest path.
- Raises:
ValueError – If the project is invalid or cannot be snapshotted.
- Return type:
- class httk.core.project.manifests.ManifestVerification[source]¶
What verifying one manifest against one tree established.
A signature check answers two separate questions. Does this manifest describe this tree, unaltered? is answered by the digests and the signature. Was it made by somebody this project trusts? is answered only by comparing the signing key with a trust anchor that did not come from the manifest.
- Parameters:
verdict – Classify the verification result.
reason – Explain the classification.
manifest – Identify the verified manifest.
manifest_format – Identify the manifest format used.
public_key – Record the signing key, when readable.
trusted_keys – Record the trust anchors consulted.
- manifest: pathlib.Path[source]¶
- httk.core.project.manifests.resolve_trusted_keys(project=None, *, trusted_keys=None)[source]¶
Return the trust anchors of project plus every explicitly named key.
An entry of trusted_keys is either a recorded key —
ed25519:BASE64or the bare base64 — or the path of a*.pubfile holding one.- Parameters:
project (str | os.PathLike[str] | None) – Locate the project whose pinned keys to include.
trusted_keys (collections.abc.Sequence[str | os.PathLike[str]] | None) – Add explicit recorded keys or public-key files.
- Returns:
Unique canonical trust-anchor values in stable order.
- Raises:
ValueError – If an explicit key cannot be canonicalized.
- Return type:
- httk.core.project.manifests.verdict_for_key(public_key, trusted, *, manifest, manifest_format)[source]¶
Classify a verified signature against the trust anchors of a project.
- Parameters:
public_key (str) – The recorded public key whose signature already verified.
trusted (collections.abc.Sequence[str]) – The project’s trust anchors.
manifest (pathlib.Path) – The manifest the verdict is about.
manifest_format (str) – The manifest format label carried into the verdict.
- Returns:
The trusted or unknown-key verdict for the signer.
- Return type:
- httk.core.project.manifests.verify_manifest(project=None, *, manifest=None, trusted_keys=None)[source]¶
Verify a project’s v2 manifest against the tree and its trust anchors.
The trust anchor is the key pinned in
project.json— never the key the manifest names in its own header — plus any key passed in trusted_keys, as a recorded value or the path of a*.pubfile.- Parameters:
project (str | os.PathLike[str] | None) – Locate the project to discover and verify.
manifest (str | os.PathLike[str] | None) – Select a manifest path instead of the project default.
trusted_keys (collections.abc.Sequence[str | os.PathLike[str]] | None) – Add explicit trust anchors to the project keys.
- Returns:
The detailed verification verdict.
- Raises:
ValueError – If no project or usable manifest exists.
FileNotFoundError – If the selected manifest file is absent.
- Return type: