Repository navigation
Conversation
docs/signing.md says the x509 signer accepts ed25519 or ecdsa keys, but x509Signer only loaded ECDSA keys and rejected ed25519 with an "unsupported private key type" error. Load ed25519 keys with signature.LoadED25519SignerVerifier and enable the skipped TestSigner_SignED25519. The unsupported key type test now uses an RSA key. Assisted-by: Claude Signed-off-by: YuMin Kim <yuminkim.dev@gmail.com>
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2133 +/- ##
==========================================
- Coverage 80.26% 80.24% -0.03%
==========================================
Files 59 59
Lines 3395 3396 +1
==========================================
Hits 2725 2725
- Misses 668 669 +1
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@yuminn-k Thanks for addressing the mismatch between the documented Ed25519 support and the x509 signer. The changes in this PR require more interoperability proof than unit testing. Hence, Could you add or share end-to-end evidence that the signatures produced by Chains interoperate with Rekor and Cosign? Further section gives a overview of the different paths followed in chains and includes a box at the end of each path what needs to be verified as The key selects the signer; the payload path determines what bytes are signed. This PR loads Ed25519 with flowchart TD
A["ConfigMap selects x509 signer<br/>artifacts.oci.signer: x509<br/>artifacts.taskrun.signer: x509<br/>artifacts.pipelinerun.signer: x509"]
B["Kubernetes Secret supplies key<br/>signing-secrets / x509.pem"]
A --> C["Chains loads signer for key type"]
B --> C
C --> D["This PR: Ed25519 key selects pure Ed25519 signer"]
D --> E{Payload format from ConfigMap}
E -->|OCI image| F["SimpleSigning<br/>artifacts.oci.format: simplesigning"]
E -->|TaskRun| G["in-toto or SLSA<br/>artifacts.taskrun.format"]
E -->|PipelineRun| H["in-toto or SLSA<br/>artifacts.pipelinerun.format"]
F --> I["Sign SimpleSigning payload bytes"]
G --> J["Wrap provenance as DSSE<br/>then sign the DSSE PAE"]
H --> J
I --> K["One transparency setting<br/>transparency.enabled"]
J --> K
K -->|false| L["No Rekor upload"]
K -->|true| M["Upload eligible signatures"]
K -->|manual| N["Upload only annotated TaskRuns/PipelineRuns<br/>chains.tekton.dev/transparency-upload: true"]
M --> O{Chains routes by payload format}
N --> O
O -->|SimpleSigning| P["cosign.TLogUpload<br/>Rekor hashedrekord"]
O -->|in-toto or SLSA| Q["cosign.TLogUploadDSSEEnvelope<br/>Rekor DSSE entry"]
P --> R["Please demonstrate: Rekor accepts the entry<br/>and supported Cosign verifies image and log proof"]
Q --> S["Please demonstrate: supported Cosign verifies<br/>attestation and log proof"]
I --> T["Store signed result"]
J --> T
T --> U{Storage backend selected in ConfigMap}
U -->|OCI storage enabled| V{storage.oci.encoding-format}
U -->|Other backend, e.g. tekton| W["Store in that backend<br/>storage choice does not change signing mode"]
V -->|dsse default| X["Tag-based OCI layout<br/>.sig and .att"]
V -->|sigstore-bundle| Y["OCI 1.1 Referrers API<br/>with registry fallback when needed"]
X --> Z["Please demonstrate: supported Cosign verifies stored result"]
Y --> Z
The following ConfigMap settings identify the paths to exercise:
The private key itself is supplied in the Kubernetes Secret Could you add or share tests demonstrating these results?
These are requested passing checks. A direct Cosign has an open, unreleased PR Cosign PR #5074 exploring whether Ed25519 needs to be handled differently for attestations and image signatures. Since it is not part of a released version, please verify this Chains change directly with the Cosign and Rekor versions Chains supports. Document the findings/caveats. Also Finally, Ed25519 is not post-quantum and is not approved for CNSA/NSS use. The NSA guidance is scoped to those environments, not a blanket prohibition for all Chains users. A brief documentation caveat would help operators choose according to their policy. cc: @tektoncd/chains-collaborators |
anithapriyanatarajan
left a comment
There was a problem hiding this comment.
Please add the interoperability evidences as requried.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Changes
docs/signing.mdsays the x509 signer accepts a key of typeed25519orecdsa, butx509Signeronly accepted*ecdsa.PrivateKeyand returnedunsupported private key type ed25519.PrivateKeyfor an ed25519 PKCS8 key.x509Signernow switches on the parsed key type: ECDSA keys load as before,ed25519.PrivateKeyloads throughsignature.LoadED25519SignerVerifier, anything else still returnsunsupported private key type.TestSigner_SignED25519is enabled (thet.Skipis removed). Before the change it failed withunsupported private key type ed25519.PrivateKey, only ECDSA keys are supported; after it passes.TestNewSignerUnsupportedX509KeyTypeused an ed25519 key as its example of an unsupported key. It now uses a generated RSA PKCS8 key.Fixes #1189
Scope and risks
AI disclosure
This change was written with Claude (Claude Code). The commit carries an
Assisted-by: Claudetrailer.Submitter Checklist
functionality, content, code)
Release Notes