diff --git a/README.md b/README.md index 88aa7e6..7427f02 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,9 @@ In order to use this chart, you will need to: | kbs.secretResources[1].name | string | `"passphrase"` | | | kbs.snp.enabled | bool | `false` | | | kbs.snp.vcekSecrets | list | `[]` | | +| kbs.spire.enabled | bool | `false` | | +| kbs.spire.adminSocketPath | string | `"/run/spire/sockets/admin.sock"` | | +| kbs.spire.socketHostPath | string | `"/run/spire/admin/admin.sock"` | | | kbs.tdx.collateralFileName | string | `"platform_collaterals.json"` | | | kbs.tdx.collateralMountPath | string | `"/opt/confidential-containers/attestation-service/tdx"` | | | kbs.tdx.collateralService | string | `"file:///opt/confidential-containers/attestation-service/tdx/platform_collaterals.json"` | | diff --git a/templates/kbs-config-map.yaml b/templates/kbs-config-map.yaml index 935a464..7aaeb02 100644 --- a/templates/kbs-config-map.yaml +++ b/templates/kbs-config-map.yaml @@ -70,3 +70,10 @@ data: [storage_backend.backends.local_json] dir_path = "/opt/confidential-containers/storage/local_json" + + {{- if .Values.kbs.spire.enabled }} + + [[plugins]] + name = "spire" + admin_socket_path = "{{ .Values.kbs.spire.adminSocketPath }}" + {{- end }} diff --git a/templates/kbs.yaml b/templates/kbs.yaml index 4c19c8c..f4de2a2 100644 --- a/templates/kbs.yaml +++ b/templates/kbs.yaml @@ -59,3 +59,16 @@ spec: mountPath: "/opt/confidential-containers/attestation-service/kds-store/vcek/{{ .hwid }}" {{- end }} {{- end }} + + # SPIRE Delegated Identity plugin: mount the agent admin socket + {{- if .Values.kbs.spire.enabled }} + extraVolumes: + - name: spire-admin-socket + hostPath: + path: {{ .Values.kbs.spire.socketHostPath }} + type: Socket + extraVolumeMounts: + - name: spire-admin-socket + mountPath: {{ dir .Values.kbs.spire.adminSocketPath }} + readOnly: true + {{- end }} diff --git a/values.yaml b/values.yaml index 5a406da..4754ed3 100644 --- a/values.yaml +++ b/values.yaml @@ -86,6 +86,19 @@ kbs: # - hwid: "abc123def456..." # secretName: "snp-vcek-abc123def456" + # SPIRE Delegated Identity plugin configuration + # Requires a KBS image built with the spire-plugin cargo feature + # (upstream trustee v0.23.0+, or a custom build via custom catalog source). + # When enabled, serves kbs+spire:// resource URIs (X.509 SVIDs fetched + # from the cluster's SPIRE agent) and mounts the agent's admin socket + # into the KBS pod. + spire: + enabled: false + # Path of the SPIRE agent admin socket as seen inside the KBS pod + adminSocketPath: "/run/spire/sockets/admin.sock" + # hostPath on the node where the SPIRE agent exposes its admin socket + socketHostPath: "/run/spire/admin/admin.sock" + # Private registry CA certificate injection # Enable to inject private registry CA cert into imperative namespace for # initdata generation. Requires registryCaCert in Vault.