Skip to content

chore(docs): add ADR proposal for signing and verification of component descriptors#599

Closed
matthiasbruns wants to merge 23 commits into
open-component-model:mainfrom
matthiasbruns:docs/signing-verification-handler
Closed

chore(docs): add ADR proposal for signing and verification of component descriptors#599
matthiasbruns wants to merge 23 commits into
open-component-model:mainfrom
matthiasbruns:docs/signing-verification-handler

Conversation

@matthiasbruns

Copy link
Copy Markdown
Contributor

Continuation of #547

What this PR does / why we need it

Enable easy interpretation of component descriptors in normalized form and provide a consistent experience for signing and verifying component descriptors.

Which issue(s) this PR fixes

fix open-component-model/ocm-project#579

jakobmoellerdev and others added 2 commits August 13, 2025 11:48
…criptors

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
Co-authored-by: Matthias Bruns <github@matthiasbruns.com>
Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
Copilot AI review requested due to automatic review settings August 21, 2025 12:53
@matthiasbruns matthiasbruns requested a review from a team as a code owner August 21, 2025 12:53
@github-actions github-actions Bot added component/github-actions Changes on GitHub Actions or within `.github/` directory area/documentation Documentation related size/m Medium labels Aug 21, 2025

This comment was marked as outdated.

On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@jakobmoellerdev jakobmoellerdev changed the title Docs/signing verification handler chore(docs): add ADR proposal for signing and verification of component descriptors Aug 22, 2025
@github-actions github-actions Bot added the kind/chore chore, maintenance, etc. label Aug 22, 2025
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Comment thread docs/adr/0008_signing_verification.md Outdated
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns marked this pull request as ready for review August 27, 2025 10:25
Signed-off-by: Matthias Bruns <git@matthiasbruns.com
On-behalf-of: SAP <matthias.bruns@sap.com>
@matthiasbruns matthiasbruns force-pushed the docs/signing-verification-handler branch from 28624d9 to db594e9 Compare August 27, 2025 10:26
matthiasbruns and others added 2 commits August 27, 2025 12:30
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns

Copy link
Copy Markdown
Contributor Author

fyi: texts are improved by ai 🤖

@matthiasbruns matthiasbruns requested a review from Copilot August 27, 2025 10:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces an ADR (Architecture Decision Record) for the signing and verification of component descriptors in the Open Component Model (OCM). The proposal establishes a two-step flow for digest calculation and signing, with optional OCI Cosign support for enhanced interoperability.

Key changes:

  • Defines a standardized approach to component descriptor signing using JCS canonicalization
  • Introduces separate commands for digest calculation and signing operations
  • Adds comprehensive Cosign integration with OIDC authentication flows

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/adr/0008_signing_verification.md Complete ADR document defining the signing/verification architecture with CLI examples and implementation details
.github/config/wordlist.txt Adds technical terms used in the ADR to the spell-check allowlist

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread docs/adr/0008_signing_verification.md Outdated
Comment thread docs/adr/0008_signing_verification.md Outdated
Comment thread docs/adr/0008_signing_verification.md Outdated
Comment thread docs/adr/0008_signing_verification.md Outdated
Comment thread docs/adr/0008_signing_verification.md Outdated
# Step 2 — Signing (no digest mutation)
# Direct signing via a single --cert (+ optional password).
# Optional OCI Cosign signing for the same canonical payload.
ocm sign cv <ref> \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this flag set is completely against our hard coding of signing plugins. we explicitly do not wanted to introduce hard coded flags for signing implementations on the commandline which is why open-component-model/ocm-project#544 exists. Does this here suggest dropping this again?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applied plugin stuff as far as I understood it

Comment thread docs/adr/0008_signing_verification.md Outdated
Comment thread docs/adr/0008_signing_verification.md Outdated
Comment thread docs/adr/0008_signing_verification.md Outdated
Comment thread docs/adr/0008_signing_verification.md Outdated
### Cosign OIDC token capture (implementation sketch)

```go
func resolveSigstoreIDToken(ctx context.Context, flagToken string) (string, error) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my comment above: is it possible to sign / verify across binary boundary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i can provide a test project for this


---

## Sequence Diagrams

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These flows completely omit (maybe on purpose) signing handlers as plugins for OCM. This means we would have to build a hard go.mod dependency to sigstore, which is (for me) and absolute hard rejection argument because of cosigns difficult dependency chain that we would inherit (see https://github.com/sigstore/cosign/blob/main/go.mod)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread docs/adr/0008_signing_verification.md Outdated
Comment thread docs/adr/0008_signing_verification.md Outdated
Comment thread docs/adr/0008_signing_verification.md Outdated
Comment thread docs/adr/0008_signing_verification.md Outdated
3. Else, if interactive TTY is available, run an **interactive loopback** browser flow to retrieve the token.
4. Else, run the **device flow** to retrieve the token.
- Produce a Cosign signature over the **same canonical bytes**.
- When `--cosign-upload` is present and `<ref>` maps to an OCI subject (`<name>@<digest>`), attach the Cosign signature to the registry using Cosign conventions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate how the signing and verification workflows would compare for:

  • component stored in oci (so, we can upload the signature)
  • component not stored in oci (so, we cannot upload the signature)

Comment thread docs/adr/0008_signing_verification.md Outdated
Comment thread docs/adr/0008_signing_verification.md Outdated
Comment on lines +83 to +84
- Computes the component-version digest from canonical bytes.
- If `--pin` is provided, compares and fails on mismatch.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think currently, the ADR does mention the actual original purpose of --pin which was to avoid an additional roundtrip of downloading resources and descriptors after already having done that in add digests. In general, the relationship between those commands is not really apparent here.

…nce our normalization

On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
…iasbruns/open-component-model into docs/signing-verification-handler
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@jakobmoellerdev

Copy link
Copy Markdown
Member

I think this PR needs to be rewritten for several reasons:

  • It needs to accomodate plugin interfaces (those were removed)
  • It needs to use less AI generated flows and have actually tested proven flow examples
  • It should not use flags hardcoded on the CLI, but defer to the argument interpreter EPIC and use specs as we do everywhere else
  • It should use the existing credential graph and credential plugins for configuration of any credential information

On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
…-model into docs/signing-verification-handler
@jakobmoellerdev

Copy link
Copy Markdown
Member

closing as discussed

jakobmoellerdev added a commit that referenced this pull request Sep 5, 2025
…nt descriptors (#767)

Continuation of
#547
and #599

<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it

Enable easy interpretation of component descriptors in normalized form
and provide a consistent experience for signing and verifying component
descriptors.

#### Which issue(s) this PR fixes
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->

fix open-component-model/ocm-project#579

---------

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
Co-authored-by: Matthias Bruns <github@matthiasbruns.com>
Co-authored-by: Fabian Burth <fabian.burth@sap.com>
Co-authored-by: Gergely Brautigam <gergely.brautigam@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Documentation related component/github-actions Changes on GitHub Actions or within `.github/` directory kind/chore chore, maintenance, etc. size/m Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create ADR for OCM Signing/Verification Handler Plugins

4 participants