Skip to content

Commit 465cd05

Browse files
committed
update with decriptor
On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com> Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
1 parent ae43a39 commit 465cd05

File tree

2 files changed

+57
-9
lines changed

2 files changed

+57
-9
lines changed

content/docs/concepts/signing-and-verification-concept.md

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Software supply chains involve multiple stages: development, build, packaging, d
1515
- **Replaced** — components could be swapped for compromised versions
1616
- **Misattributed** — components could falsely claim to come from a trusted source
1717

18-
Signing addresses these risks by creating a cryptographic proof that:
18+
Signing addresses these risks by creating a cryptographic proof of:
1919

2020
1. **Integrity**: The component has not changed since it was signed
2121
2. **Authenticity**: The signature was created by someone with access to the private key
22-
3. **Non-repudiation**: The signer cannot deny having signed the component
22+
3. **Provenance**: The signer cannot deny having signed the component
2323

2424
## How OCM Signing Works
2525

@@ -65,9 +65,12 @@ Each artifact's digest is calculated using a type-specific normalization algorit
6565

6666
| Artifact Type | Algorithm | Description |
6767
|---------------|-----------|-------------|
68-
| Generic blob | `genericBlobDigest/v1` | Direct hash of blob content |
68+
| OCI artifact | `ociArtifactDigest/v1` | Digest of the OCI manifest (used for container images, Helm charts, and other OCI-native content) |
69+
| Generic blob | `genericBlobDigest/v1` | Direct hash of blob content (used for executables, blueprints, and other non-OCI content) |
6970

70-
This allows OCM to use the most appropriate digest mechanism for each artifact type. For example, OCI artifacts use their manifest digest rather than re-hashing the blob, ensuring consistency with OCI registry behavior.
71+
This allows OCM to use the most appropriate digest mechanism for each artifact type.
72+
OCI artifacts use their manifest digest rather than re-hashing the blob,
73+
improving performance and ensuring consistency with OCI registry behavior. Generic blobs are hashed directly.
7174

7275
#### Recursive Component References
7376

@@ -95,11 +98,56 @@ OCM signs a **digest** of the component descriptor, which includes:
9598
- Source references
9699
- Component references
97100
98-
The signature does **not** cover the raw resource content directlyinstead, it covers the **digests** of those resources as recorded in the component descriptor. This means:
101+
The signature does **not** cover the raw resource content directlyinstead, it covers the **digests** of those resources as recorded in the component descriptor. Crucially, the `access` field (which describes *where* a resource is stored) is **excluded** from the signed digest by the normalization process. This is a key design principle:
99102

100-
- Any change to resource content changes its digest, invalidating the signature
101-
- Signature verification is fast (no need to re-hash large binaries)
102-
- Resources can be stored separately while still being integrity-protected
103+
- **Location-independent integrity** — a component version can be transferred to a different registry (changing all `access` references) without invalidating its signature. The digest remains stable because it depends only on *what* the artifacts contain, not *where* they are stored.
104+
- Any change to resource content changes its digest, invalidating the signature.
105+
- Signature verification is fast (no need to re-hash large binaries).
106+
107+
This separation of content identity from storage location is what enables secure delivery across environments: a producer signs a component version once, and consumers can verify it after any number of transfers — even into air-gapped environments with completely different registries.
108+
109+
The following example shows a signed component descriptor. Notice that each resource has both an `access` field (storage location) and a `digest` field (content hash). Only the `digest` is included in the signature — the `access` can change freely during transfers:
110+
111+
```yaml
112+
component:
113+
name: github.com/acme.org/helloworld
114+
version: 1.0.0
115+
provider: acme.org
116+
resources:
117+
- name: mylocalfile
118+
type: blob
119+
version: 1.0.0
120+
relation: local
121+
access: # NOT included in signature
122+
type: localBlob
123+
localReference: sha256:70a257...
124+
mediaType: text/plain; charset=utf-8
125+
digest: # Included in signature
126+
hashAlgorithm: SHA-256
127+
normalisationAlgorithm: genericBlobDigest/v1
128+
value: 70a2577d7b649574cbbba99a2f2ebdf27904a4abf80c9729923ee67ea8d2d9d8
129+
- name: image
130+
type: ociImage
131+
version: 1.0.0
132+
relation: external
133+
access: # NOT included in signature
134+
type: ociArtifact
135+
imageReference: ghcr.io/stefanprodan/podinfo:6.9.1@sha256:262578cd...
136+
digest: # Included in signature
137+
hashAlgorithm: SHA-256
138+
normalisationAlgorithm: genericBlobDigest/v1
139+
value: 262578cde928d5c9eba3bce079976444f624c13ed0afb741d90d5423877496cb
140+
signatures:
141+
- name: default
142+
digest:
143+
hashAlgorithm: SHA-256
144+
normalisationAlgorithm: jsonNormalisation/v4alpha1
145+
value: 91dd197868907487e62872695db1fa7b397fde300bcbae23e24abc188fb147ad
146+
signature:
147+
algorithm: RSASSA-PSS
148+
mediaType: application/vnd.ocm.signature.rsa.pss
149+
value: 7feb449229c6ffe368144995432befd1505d2d29...
150+
```
103151

104152
### Signature Storage
105153

content/docs/how-to/configure-signing-credentials.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Set up credential configuration so OCM can find your signing keys when signing o
2424
## Steps
2525

2626
{{< steps >}}
27-
2827
{{< step >}}
28+
2929
## Create your .ocmconfig file (optional)
3030

3131
Create `$HOME/.ocmconfig` if it doesn't exist:

0 commit comments

Comments
 (0)