httk.workflow.manifests¶
Deterministic signed project manifests.
Attributes¶
Classes¶
Recorded holder of one workspace maintenance lock. |
|
What verifying one manifest against one tree established. |
Functions¶
|
Describe the workspace maintenance lock, or |
|
Remove a stale, or with force any, maintenance lock and report it. |
Fence manager launches while a project snapshot is inspected. |
|
|
Create and atomically publish the signed v2 project manifest. |
|
Return the trust anchors of project plus every explicitly named key. |
|
Report whether a v2 manifest describes root and its signature verifies. |
|
Verify a legacy manifest without modifying its project tree. |
|
Auto-detect a v2 or legacy manifest and verify it against its trust anchors. |
Module Contents¶
- class httk.workflow.manifests.MaintenanceLock[source]¶
Recorded holder of one workspace maintenance lock.
- path: pathlib.Path[source]¶
- property age_seconds: float | None[source]¶
Age of the lock, or
Nonewhen its timestamp is unusable.
- httk.workflow.manifests.read_maintenance_lock(workspace: httk.workflow.workspace.Workspace) MaintenanceLock | None[source]¶
Describe the workspace maintenance lock, or
Nonewhen it is absent.
- httk.workflow.manifests.release_maintenance_lock(workspace: httk.workflow.workspace.Workspace, *, force: bool = False) str[source]¶
Remove a stale, or with force any, maintenance lock and report it.
- httk.workflow.manifests.workspace_maintenance_guard(workspace: httk.workflow.workspace.Workspace) collections.abc.Iterator[None][source]¶
Fence manager launches while a project snapshot is inspected.
- httk.workflow.manifests.create_manifest(project: str | os.PathLike[str] | None = None, *, output: str | os.PathLike[str] | None = None) pathlib.Path[source]¶
Create and atomically publish the signed v2 project manifest.
- class httk.workflow.manifests.ManifestVerification[source]¶
What verifying one manifest against one tree established.
A signature check answers two separate questions, and reporting them as one boolean loses the interesting one. 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 itself.
- manifest: pathlib.Path[source]¶
- httk.workflow.manifests.resolve_trusted_keys(project: str | os.PathLike[str] | None = None, *, trusted_keys: collections.abc.Sequence[str | os.PathLike[str]] | None = None) tuple[str, Ellipsis][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.
- httk.workflow.manifests.verify_v2_manifest(root: pathlib.Path, path: pathlib.Path) bool[source]¶
Report whether a v2 manifest describes root and its signature verifies.
This deliberately says nothing about whose key signed it: the key comes out of the manifest header. Use
verify_manifest()for the trust decision.
- httk.workflow.manifests.verify_legacy_manifest(root: pathlib.Path, path: pathlib.Path) bool[source]¶
Verify a legacy manifest without modifying its project tree.
- httk.workflow.manifests.verify_manifest(project: str | os.PathLike[str] | None = None, *, manifest: str | os.PathLike[str] | None = None, trusted_keys: collections.abc.Sequence[str | os.PathLike[str]] | None = None) ManifestVerification[source]¶
Auto-detect a v2 or legacy manifest and verify it against its trust anchors.
The trust anchor is the key pinned in
project.json— never the key the manifest being verified names in its own header — plus any key passed in trusted_keys, as a recorded value or as the path of a*.pubfile.