1- """Functional tests for Konflux-style attestation verification.
1+ """Functional tests for SLSA provenance attestation verification.
22
33These tests exercise the attestation / provenance upload paths with
4- attestations that carry an RSA signature instead of a Sigstore certificate,
5- mirroring the format produced by Konflux / Calunga builds.
4+ attestations that carry an RSA signature instead of a Sigstore certificate.
65
7- The test signing key is generated at image build time and the matching
6+ A static test keypair is shipped in .ci/assets/keys/ and the matching
87public key is configured as PULP_ATTESTATION_VERIFICATION_KEY so that
98signature verification is fully exercised end-to-end.
109"""
3130
3231
3332def _build_statement (filename , sha256 ):
34- """Build a minimal in-toto statement for a Konflux attestation."""
33+ """Build a minimal in-toto statement for an SLSA attestation."""
3534 return json .dumps (
3635 {
3736 "_type" : "https://in-toto.io/Statement/v0.1" ,
@@ -69,7 +68,7 @@ def _b64(data: bytes) -> str:
6968
7069
7170def _make_attestation (statement_bytes , signature_bytes ):
72- """Return a single PEP-740 Attestation dict (Konflux flavour)."""
71+ """Return a single PEP-740 Attestation dict (SLSA flavour)."""
7372 return {
7473 "version" : 1 ,
7574 "verification_material" : None ,
@@ -128,10 +127,10 @@ def _write(provenance_dict):
128127# ---------------------------------------------------------------------------
129128
130129
131- def test_konflux_provenance_stored (
130+ def test_slsa_provenance_stored (
132131 python_bindings , python_content_factory , monitor_task , test_private_key , _provenance_file
133132):
134- """A Konflux-style provenance is accepted and stored when verify=True."""
133+ """An SLSA provenance is accepted and stored when verify=True."""
135134 content = python_content_factory ()
136135
137136 stmt = _build_statement (content .filename , content .sha256 )
@@ -155,10 +154,10 @@ def test_konflux_provenance_stored(
155154 assert publisher ["kind" ] == "Konflux"
156155
157156
158- def test_konflux_wrong_subject_name_rejected (
157+ def test_slsa_wrong_subject_name_rejected (
159158 python_bindings , python_content_factory , monitor_task , test_private_key , _provenance_file
160159):
161- """Verification rejects a Konflux attestation whose subject name does not match."""
160+ """Verification rejects an SLSA attestation whose subject name does not match."""
162161 content = python_content_factory ()
163162
164163 wrong_name = "wrong-package-0.1.tar.gz"
@@ -177,10 +176,10 @@ def test_konflux_wrong_subject_name_rejected(
177176 assert "subject does not match distribution name" in exc_info .value .task .error ["description" ]
178177
179178
180- def test_konflux_wrong_digest_rejected (
179+ def test_slsa_wrong_digest_rejected (
181180 python_bindings , python_content_factory , monitor_task , test_private_key , _provenance_file
182181):
183- """Verification rejects a Konflux attestation whose digest does not match."""
182+ """Verification rejects an SLSA attestation whose digest does not match."""
184183 content = python_content_factory ()
185184
186185 bad_digest = "0" * 64
@@ -199,10 +198,10 @@ def test_konflux_wrong_digest_rejected(
199198 assert "subject does not match distribution digest" in exc_info .value .task .error ["description" ]
200199
201200
202- def test_konflux_bad_signature_rejected (
201+ def test_slsa_bad_signature_rejected (
203202 python_bindings , python_content_factory , monitor_task , test_private_key , _provenance_file
204203):
205- """An attestation with a valid subject but tampered signature is rejected."""
204+ """An SLSA attestation with a valid subject but tampered signature is rejected."""
206205 content = python_content_factory ()
207206
208207 stmt = _build_statement (content .filename , content .sha256 )
@@ -221,10 +220,10 @@ def test_konflux_bad_signature_rejected(
221220 assert "signature verification failed" in exc_info .value .task .error ["description" ]
222221
223222
224- def test_konflux_attestation_via_content_upload (
223+ def test_slsa_attestation_via_content_upload (
225224 python_bindings , python_content_factory , monitor_task , test_private_key
226225):
227- """Konflux-style attestations can be uploaded alongside a package via the content API."""
226+ """SLSA attestations can be uploaded alongside a package via the content API."""
228227 content = python_content_factory ()
229228
230229 stmt = _build_statement (content .filename , content .sha256 )
0 commit comments