Skip to content

Commit 0ab645e

Browse files
authored
feat(tsa): support timestamp authorities in chart (#1846)
Signed-off-by: Jose I. Paris <[email protected]>
1 parent b650407 commit 0ab645e

File tree

6 files changed

+171
-76
lines changed

6 files changed

+171
-76
lines changed

deployment/chainloop/README.md

Lines changed: 104 additions & 76 deletions
Large diffs are not rendered by default.

deployment/chainloop/templates/controlplane/configmap.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,12 @@ data:
6363
federated_authentication:
6464
{{- toYaml .Values.controlplane.federatedAuthentication | nindent 6 }}
6565
{{- end }}
66+
{{- if .Values.controlplane.timestampAuthorities }}
67+
tsa.yaml: |
68+
timestampAuthorities:
69+
{{- range $index, $tsa := .Values.controlplane.timestampAuthorities }}
70+
- issuer: {{$tsa.issuer}}
71+
url: {{$tsa.url}}
72+
cert_chain_path: /tsa_roots/chain-{{$index}}.pem
73+
{{- end }}
74+
{{- end }}

deployment/chainloop/templates/controlplane/deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ spec:
179179
mountPath: /etc/pki/tls/certs
180180
readOnly: true
181181
{{- end }}
182+
{{- if .Values.controlplane.timestampAuthorities }}
183+
- name: tsa-roots
184+
mountPath: /tsa_roots/
185+
{{- end }}
182186
{{- if .Values.controlplane.extraVolumeMounts }}
183187
{{- include "common.tplvalues.render" (dict "value" .Values.controlplane.extraVolumeMounts "context" $) | nindent 12 }}
184188
{{- end }}
@@ -237,4 +241,9 @@ spec:
237241
{{- end }}
238242
{{- if .Values.controlplane.extraVolumes }}
239243
{{- include "common.tplvalues.render" (dict "value" .Values.controlplane.extraVolumes "context" $) | nindent 8 }}
244+
{{- end }}
245+
{{- if .Values.controlplane.timestampAuthorities }}
246+
- name: tsa-roots
247+
configMap:
248+
name: {{ include "chainloop.controlplane.fullname" $ }}-tsa
240249
{{- end }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{- /*
2+
Copyright Chainloop, Inc. All Rights Reserved.
3+
SPDX-License-Identifier: APACHE-2.0
4+
*/}}
5+
6+
{{- if .Values.controlplane.timestampAuthorities }}
7+
apiVersion: v1
8+
kind: ConfigMap
9+
metadata:
10+
name: {{ include "chainloop.controlplane.fullname" . }}-tsa
11+
namespace: {{ include "common.names.namespace" . | quote }}
12+
labels: {{- include "chainloop.controlplane.labels" . | nindent 4 }}
13+
{{- if .Values.commonAnnotations }}
14+
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
15+
{{- end }}
16+
data:
17+
{{- range $index, $tsa := .Values.controlplane.timestampAuthorities }}
18+
chain-{{$index}}.pem: |
19+
{{$tsa.certChain | nindent 4 }}
20+
{{- end }}
21+
{{- end }}

deployment/chainloop/values.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,31 @@ controlplane:
703703
# endEntityProfileName: ""
704704
# caName: ""
705705

706+
## @section Timestamp authorities
707+
708+
## Configuration for RFC3161 timestamp authorities used for signing
709+
## @extra controlplane.timestampAuthorities[0].issuer whether this TSA should be used for signing (only one at a time)
710+
## @extra controlplane.timestampAuthorities[0].url the TSA service URL
711+
## @extra controlplane.timestampAuthorities[0].certChain PEM encoded certificate chain (from leaf to root) for verification
712+
## -----BEGIN CERTIFICATE-----
713+
## ...
714+
## -----END CERTIFICATE-----
715+
## -----BEGIN CERTIFICATE-----
716+
## ...
717+
## -----END CERTIFICATE-----
718+
# timestampAuthorities:
719+
# - issuer: true
720+
# url: https://freetsa.org/tsr
721+
# certChain: |
722+
# -----BEGIN CERTIFICATE-----
723+
# -----END CERTIFICATE-----
724+
#
725+
# -----BEGIN CERTIFICATE-----
726+
# -----END CERTIFICATE-----
727+
728+
729+
## @section Other settings
730+
706731
## Inject custom CA certificates to the controlplane container
707732
## @param controlplane.customCAs List of custom CA certificates content
708733
customCAs: []

docs/docs/reference/signing.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ And verify it:
4949
```
5050
Also note that `chainloop wf run describe` already detects a verifiable attestation and tries to perform the verification automatically. In these cases, you'll see "Verified: true" in the command output.
5151

52+
### Timestamp service
53+
Chainloop can be configured to send the attestation signature to a timestamp service (TSA) and include the result as part of the attestation bundle. If available, the TSA signature will be used during the verification process.
54+
5255
### Not yet supported
5356

5457
The following methods are work in progress and **not yet supported**.

0 commit comments

Comments
 (0)