Skip to content

Commit 3470124

Browse files
committed
fix: always inject OIDC_IDENTITY/OIDC_ISSUER env vars for verification tasks
The verify_artifact and verify_image functions unconditionally reference OIDC_IDENTITY and OIDC_ISSUER, but these env vars were only injected when rhtas.oidc.enabled was true. In SPIRE mode this caused an "unbound variable" crash due to set -u. Move identity/issuer vars outside the OIDC conditional since verification always needs them regardless of the signing method.
1 parent 1c9528b commit 3470124

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

charts/supply-chain/templates/_helpers.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ Sigstore environment variables used in Pipeline Tasks
9393
value: $(params.ca-file)
9494
- name: COSIGN_YES
9595
value: "true"
96-
{{- if eq .Values.rhtas.oidc.enabled true }}
9796
- name: OIDC_IDENTITY
9897
value: $(params.oidc-identity)
9998
- name: OIDC_ISSUER
@@ -106,6 +105,7 @@ Sigstore environment variables used in Pipeline Tasks
106105
value: $(params.oidc-issuer)
107106
- name: SIGSTORE_OIDC_ISSUER
108107
value: $(params.oidc-issuer)
108+
{{- if eq .Values.rhtas.oidc.enabled true }}
109109
- name: OIDC_CLIENT_ID
110110
value: $(params.rhtas-oidc-client-id)
111111
- name: COSIGN_OIDC_CLIENT_ID
@@ -135,11 +135,11 @@ Sigstore params used in Pipeline Tasks
135135
value: $(params.tuf-url)
136136
- name: cli-server-url
137137
value: $(params.cli-server-url)
138-
{{- if eq .Values.rhtas.oidc.enabled true }}
139138
- name: oidc-identity
140139
value: $(params.oidc-identity)
141140
- name: oidc-issuer
142141
value: $(params.oidc-issuer)
142+
{{- if eq .Values.rhtas.oidc.enabled true }}
143143
- name: rhtas-oidc-client-id
144144
value: $(params.rhtas-oidc-client-id)
145145
{{- end }}
@@ -164,13 +164,13 @@ Sigstore params descriptions used in Pipeline Tasks
164164
- description: Cosign CLI server URL
165165
name: cli-server-url
166166
type: string
167-
{{- if eq .Values.rhtas.oidc.enabled true }}
168167
- description: OIDC identity in signatures
169168
name: oidc-identity
170169
type: string
171170
- description: OIDC issuer in signatures
172171
name: oidc-issuer
173172
type: string
173+
{{- if eq .Values.rhtas.oidc.enabled true }}
174174
- description: RHTAS OIDC client ID
175175
name: rhtas-oidc-client-id
176176
type: string

0 commit comments

Comments
 (0)