data-provenance-protocol 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,122 @@
1
+ Metadata-Version: 2.4
2
+ Name: data-provenance-protocol
3
+ Version: 0.1.0
4
+ Summary: Data Provenance Protocol reference CLI (init, add, sign, verify, report)
5
+ License-Expression: GPL-3.0-or-later
6
+ Keywords: provenance,manifest,cryptography,verification
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Programming Language :: Python :: 3.12
9
+ Classifier: Topic :: Security :: Cryptography
10
+ Requires-Python: >=3.12
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: jsonschema>=4.21
14
+ Requires-Dist: python-gnupg>=0.5.3
15
+ Provides-Extra: sigstore
16
+ Requires-Dist: sigstore>=3.0; extra == "sigstore"
17
+ Requires-Dist: cryptography>=42; extra == "sigstore"
18
+ Provides-Extra: dev
19
+ Requires-Dist: pytest>=8.2; extra == "dev"
20
+ Requires-Dist: pytest-cov>=5.0; extra == "dev"
21
+ Requires-Dist: ruff>=0.6; extra == "dev"
22
+ Requires-Dist: mypy>=1.10; extra == "dev"
23
+ Requires-Dist: types-jsonschema>=4.21; extra == "dev"
24
+ Requires-Dist: cryptography>=42; extra == "dev"
25
+ Dynamic: license-file
26
+
27
+ # dpp CLI
28
+
29
+ Reference implementation of the Data Provenance Protocol (DPP).
30
+
31
+ See the specification in `../spec/dpp-specification.org` for the
32
+ protocol, and `../AGENTS.md` / `plans/` in the admin repo for the
33
+ planning.
34
+
35
+ ## Installation (development)
36
+
37
+ ```bash
38
+ python -m venv .venv
39
+ . .venv/bin/activate
40
+ pip install -e ".[dev]"
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ ```bash
46
+ dpp init -o manifest.json
47
+ dpp add model.ifc meta/project.json -o manifest.json
48
+ dpp sign --backend gpg --signed-by "Name <email>" -o manifest.json
49
+ dpp verify manifest.json
50
+ dpp report manifest.json
51
+ ```
52
+
53
+ The CLI runs on Python 3.12. External binaries: `gpg` >= 2.2 for the `gpg`
54
+ backend and `openssl` for the `pkcs7` backend (the Sigstore backend, which
55
+ is experimental, needs the `sigstore` package). The `gpg` version is
56
+ documented here but not checked by the CLI. Signing is non-interactive:
57
+
58
+ - Key without passphrase: works without input.
59
+ - Key with passphrase: set `DPP_GPG_PASSPHRASE`; without that var
60
+ `sign` fails immediately with a clear error (no prompt).
61
+ - `DPP_GNUPGHOME` points to an alternative keyring (tests/CI).
62
+
63
+ Create GPG test keys without passphrase like this:
64
+
65
+ ```bash
66
+ gpg --batch --pinentry-mode loopback --passphrase '' \
67
+ --quick-generate-key 'Name <email>' rsa2048 sign 1y
68
+ ```
69
+
70
+ ## Verifying
71
+
72
+ ```bash
73
+ dpp verify manifest.json # schema, manifest_id, signature, artifacts
74
+ dpp verify rev4.json --recursive --predecessor rev3.json # also follow `supersedes`
75
+ dpp verify collection.json --response NAME=body.bin --server-manifest NAME=server.json
76
+ dpp verify manifest.json --trust-key <key_id> # accept only this signer
77
+ dpp report manifest.json # the same checks as JSON
78
+ ```
79
+
80
+ Exit codes: `0` verified, `1` failed or operational error, `2` usage error,
81
+ `3` incomplete (nothing failed, but a check could not be performed, for
82
+ example when the public key is not in the keyring). A valid signature from a
83
+ signer you have no policy for is reported, not rejected: `--trust-key`
84
+ (gpg and pkcs7 `key_id`) and `--trust-identity` (Sigstore) make it a failure
85
+ for any other signer. Artifact files are opened without following symbolic
86
+ links; a symbolic link anywhere in a path fails the artifact.
87
+
88
+ The signed manifests in `../spec/examples/` verify with the published test
89
+ keys: import `example-key.pub.asc` into a keyring and point `DPP_GNUPGHOME`
90
+ at it (the PKCS#7 example carries its certificate in the signature).
91
+
92
+ ## Sigstore (experimental)
93
+
94
+ The `sigstore` backend is off unless `DPP_EXPERIMENTAL_SIGSTORE=1` is set;
95
+ without it a Sigstore signature is `unverifiable`. It needs the extra
96
+ (`pip install -e ".[sigstore]"`). The OIDC token is read from
97
+ `DPP_SIGSTORE_TOKEN`, `DPP_SIGSTORE_TOKEN_FILE`, `SIGSTORE_IDENTITY_TOKEN` or
98
+ `SIGSTORE_ID_TOKEN`, and passed to the `sigstore` command through the
99
+ environment, not on the command line. The backend runs that command with the
100
+ same interpreter as the CLI.
101
+
102
+ The backend has been run end to end against the public Fulcio and Rekor
103
+ services with a GitHub Actions workflow identity. `../spec/examples/sigstore/`
104
+ holds the signed manifest and its body; its `README.md` gives the identity,
105
+ the Rekor log index and the verification command.
106
+
107
+ ## Reproducible installs
108
+
109
+ `requirements.txt`, `requirements-dev.txt` and `requirements-sigstore.txt` pin
110
+ every dependency with hashes (made with `uv pip compile --generate-hashes`):
111
+
112
+ ```bash
113
+ pip install --require-hashes -r requirements-dev.txt && pip install --no-deps -e .
114
+ ```
115
+
116
+ Regenerate them after changing dependencies in `pyproject.toml`.
117
+
118
+ ## Tests
119
+
120
+ `pytest` runs the suite. One test runs every schema pattern in both Python and
121
+ Node to catch regular-expression differences; set `DPP_REQUIRE_NODE=1` in CI so
122
+ that a missing `node` fails instead of skipping it.
@@ -0,0 +1,21 @@
1
+ data_provenance_protocol-0.1.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
2
+ dpp/__init__.py,sha256=rWhpsMZl3arNIkB_4AYAxkJ75bZwmFn9Yt26cIfaY8c,153
3
+ dpp/__main__.py,sha256=VeDf8jD5MQHvR4iPLgcmlroPI6b7aqyuF3LHkanDaBQ,163
4
+ dpp/canonical.py,sha256=-gVUbxYPh9RoatoUy23ILHFvzJLLA4TKRc9HiIivdmE,4463
5
+ dpp/casefold.py,sha256=R0umzfkHtbhZLXzTeR9zqKNAVp8DlhBZv5uxqL7I90U,1035
6
+ dpp/cli.py,sha256=u1HcvFpmj_krsXrbUmhPu99geqx8EeYP3E8z7OSMTgo,24559
7
+ dpp/manifest.py,sha256=1fW7kK2H_Y3xqVbv67ZJjgG-LQnQstHYGQ8ko3fl5g8,8598
8
+ dpp/data/casefold-15.0.0.json,sha256=qn72Q_ohj-Y2ZGIbzhfRIS8UTFUy4xw-XDpvPlcOCR0,54425
9
+ dpp/schemas/README.md,sha256=HdWzfjXB9xajCXQiOvMPBUKzXgvGXFS-RE1Cp700piE,145
10
+ dpp/schemas/collection-manifest-schema.json,sha256=wnjtB-pjg2ERu5mzCGz9Jyc2mcCfXyPoZQhCfx-DP0I,4607
11
+ dpp/schemas/manifest-schema.json,sha256=sq7xtEYZHNZ3bVpXZ1RCckjMm9GdSQmGNeG33h_gahI,4981
12
+ dpp/signing/__init__.py,sha256=jPVgTS51lpnTWEywCzyMyYQMCw-ORifOrMgFRUE-WpY,1300
13
+ dpp/signing/base.py,sha256=gbpea8aseD83DlLlnn2aG5PEyhK64telFWBo7rA8F30,1389
14
+ dpp/signing/gpg.py,sha256=so6Wv8DDL-0I9VTYoki4_9-XMsYbOzMqsJT2GWY6_X4,3914
15
+ dpp/signing/pkcs7.py,sha256=8I9rcloyG4SI_81zXIn5fXq_0l9gvWCVkqGz3d_CG6c,5267
16
+ dpp/signing/sigstore.py,sha256=8ft62dS2qv2On49SupgfGPGywqNgHaCZBg3MXh-KSLA,8251
17
+ data_provenance_protocol-0.1.0.dist-info/METADATA,sha256=4oDLvMimayf56Bku5oA-OuunfQUArazU-pR-dla1ns8,4734
18
+ data_provenance_protocol-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
19
+ data_provenance_protocol-0.1.0.dist-info/entry_points.txt,sha256=stt2pC7SlDFtlrpgvUEO27vh8SFXouifLC6Fr987gKM,37
20
+ data_provenance_protocol-0.1.0.dist-info/top_level.txt,sha256=XhXoEXK5Vyhr0HVi1ebs74ttPR8gE0XzIg7T4wq8Jz8,4
21
+ data_provenance_protocol-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ dpp = dpp.cli:main