You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: enable Vault JWT auth without Spire for KMS signing
When signers.kms.auth.oidc.path and signers.kms.auth.oidc.role are set
in the Chains ConfigMap without Spire, the controller now reads the
Kubernetes service account token from the pod filesystem and uses it for
Vault JWT auth login. Previously, the OIDC token field was only populated
by Spire, causing the code to fall through to VAULT_TOKEN lookup and fail
with "read .vault-token file: no such file or directory".
Signed-off-by: Shubham Bhardwaj <shubbhar@redhat.com>
| `signers.kms.auth.token-path` | Path to store KMS server Auth token (e.g. `/etc/kms-secrets`) | |
178
178
| `signers.kms.auth.oidc.path` | Path used for OIDC authentication (e.g. `jwt` for Vault) | |
179
179
| `signers.kms.auth.oidc.role` | Role used for OIDC authentication | |
180
+
| `signers.kms.auth.oidc.token-path`| Path to a file containing the JWT token for OIDC authentication. If not set, defaults to the Kubernetes service account token at `/var/run/secrets/kubernetes.io/serviceaccount/token`. | | `/var/run/secrets/kubernetes.io/serviceaccount/token` |
180
181
| `signers.kms.auth.spire.sock` | URI of the Spire socket used for KMS token (e.g. `unix:///tmp/spire-agent/public/api.sock`) | |
181
182
| `signers.kms.auth.spire.audience` | Audience for requesting a SVID from Spire | |
Copy file name to clipboardExpand all lines: pkg/chains/signing/kms/kms.go
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,8 @@ import (
38
38
"github.com/tektoncd/chains/pkg/chains/signing"
39
39
)
40
40
41
+
constdefaultOIDCTokenPath="/var/run/secrets/kubernetes.io/serviceaccount/token"//nolint:gosec // Not a credential, this is the path to read the K8s SA token file from
42
+
41
43
// Signer exposes methods to sign payloads using a KMS
0 commit comments