A provider for the Kubernetes Secrets Store CSI Driver that retrieves credentials from One Identity Safeguard for Privileged Passwords and mounts them into pods as files.
Credentials are retrieved over Safeguard's Application-to-Application (A2A) service using the safeguard-go SDK. Authentication is performed with a client certificate; no user password or long-lived bearer token is stored in the cluster.
flowchart LR
pod[Application Pod] -->|volume mount| driver[Secrets Store CSI Driver]
driver -->|gRPC Mount| provider[Safeguard CSI Provider]
provider -->|A2A over mTLS| appliance[(Safeguard Appliance)]
- A pod references a
SecretProviderClassand mounts asecrets-store.csi.k8s.iovolume. - The CSI driver calls this provider's gRPC
Mountendpoint with the class attributes and the node-publish secret (the client certificate and key). - The provider builds an A2A context with the client certificate, enumerates the
accounts the certificate is registered to retrieve, filters them by
appNameandaccountNames, and retrieves each account's credential. - Each credential is written to the pod's mount as a file named after the account, or — in bundle mode — combined into a single JSON file.
| Guide | Description |
|---|---|
| Installation | Install the driver and provider; flags and compatibility. |
| Safeguard A2A setup | Configure the A2A registration and client certificate in Safeguard. |
| Configuration reference | Every SecretProviderClass parameter and the auth model. |
| Usage | Mount secrets, sync to Kubernetes Secrets, retrieve keys/API keys. |
| Troubleshooting | Common errors, logging, rotation behavior. |
| Development | Build, test, container, and release. |
| Changelog | Notable changes. |
The sections below are a quick reference; the guides above go deeper.
| Attribute | Required | Default | Description |
|---|---|---|---|
safeguardHost |
yes | — | Hostname of the Safeguard appliance (e.g. safeguard.example.com). |
appName |
no | (all) | A2A registration application name to filter accounts by. When empty, every account the certificate can retrieve is mounted. |
accountNames |
no | (all) | Comma-separated account names to mount (case-insensitive), applied in addition to appName. Empty mounts every matched account. |
objectType |
no | Password |
Credential type for file-per-account output: Password, PrivateKey, or ApiKey. Applies to all matched accounts. |
outputFormat |
no | file-per-account |
file-per-account writes one file per account; bundle writes a single JSON file keyed by account name carrying every objectTypes value. |
objectTypes |
no | value of objectType |
Comma-separated credential types included per account in bundle mode, e.g. Password,PrivateKey,ApiKey. |
bundleFile |
no | secrets.json |
Bundle file name (plain name, no path separators) when outputFormat: bundle. |
keyFormat |
no | OpenSsh |
SSH private-key format when a PrivateKey is retrieved: OpenSsh, Ssh2, or Putty. Key material is normalized to LF. |
safeguardCaBundle |
no | (system roots) | PEM CA bundle used to verify the appliance certificate. Set this when the appliance uses a privately issued certificate. |
insecureSkipVerify |
no | false |
When true, disables verification of the appliance certificate. Intended for bootstrapping only — do not use in production. |
The client certificate and its private key are supplied through the CSI driver's
nodePublishSecretRef as two keys:
| Key | Description |
|---|---|
clientCertificate |
PEM-encoded client certificate (leaf plus any intermediates). |
clientKey |
PEM-encoded private key for the client certificate. |
Only PEM material is accepted. If your certificate is in PKCS#12 (.pfx/.p12),
convert it first:
openssl pkcs12 -in client.pfx -clcerts -nokeys -out clientCertificate.pem
openssl pkcs12 -in client.pfx -nocerts -nodes -out clientKey.pemBy default (outputFormat: file-per-account) each retrieved account produces one
file in the mount, named after the account:
objectType: Password— the file contains the plaintext password.objectType: PrivateKey— the file contains the SSH private key in the requestedkeyFormat, with LF line endings.objectType: ApiKey— the file contains a JSON array of the account's API key credentials (id,name,description,clientId,clientSecret,clientSecretId).
With outputFormat: bundle the provider instead writes a single JSON file
(bundleFile, default secrets.json) keyed by account name, where each account
carries every credential type listed in objectTypes. This gives higher secret
density (one file, one inotify watch) while still keeping everything in tmpfs and
nothing in etcd. See the
configuration reference for
the JSON shape and an example.
Safeguard returns SSH key material with Windows CRLF line endings; the provider normalizes it to LF in both output modes so Linux workloads can consume the mounted key directly. Passwords are written byte-for-byte.
Create the node-publish secret from your client certificate and key:
kubectl create secret generic safeguard-a2a \
--from-file=clientCertificate=clientCertificate.pem \
--from-file=clientKey=clientKey.pem
kubectl label secret safeguard-a2a secrets-store.csi.k8s.io/used=trueDefine a SecretProviderClass (see examples/):
apiVersion: secrets-store.csi.x-k8s.io/v1
kind: SecretProviderClass
metadata:
name: safeguard
spec:
provider: safeguard
parameters:
safeguardHost: safeguard.example.com
appName: my-application
objectType: Password
# safeguardCaBundle: |
# -----BEGIN CERTIFICATE-----
# ...appliance issuing CA...
# -----END CERTIFICATE-----Mount it into a pod:
volumes:
- name: secrets
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: safeguard
nodePublishSecretRef:
name: safeguard-a2aThe provider runs as a DaemonSet alongside the Secrets Store CSI Driver. Install
with the bundled Helm chart:
helm install safeguard-csi-provider ./charts/safeguard-csi-providerOr apply the raw manifests in deployment/.
The Secrets Store CSI Driver must be installed separately; see its installation guide.
Requires Go 1.25 or newer.
make build # linux/amd64 binary in _output/
make build-windows # windows binary
make unit-test # run unit tests
make container # build the container imageReleased images are published to
ghcr.io/oneidentity/safeguard-csi-provider as a single multi-arch manifest
covering linux/amd64, linux/arm64, and windows/amd64 (nanoserver).
The release version lives in exactly one place: the chart's appVersion
(Chart.yaml). The chart image
tags inherit it, and CI fails a build whose manifests disagree with it
(scripts/check-versions.sh), so nothing has to be hand-synced.
Releases are built and published by the Azure DevOps pipeline
(azure-pipelines.yml). Pushing a vX.Y.Z tag:
- builds the multi-arch image and pushes
ghcr.io/oneidentity/safeguard-csi-provider:X.Y.Z(and moves:latest), - packages the Helm chart (
safeguard-csi-provider-X.Y.Z.tgz) and renders a standalone install manifest (safeguard-csi-provider-X.Y.Z.yaml), both stamped with the tag version so they match the image by construction, and - creates the GitHub Release with those two files attached.
Every other trigger — pull requests, manual runs, and merges to
main/release-* — only builds, lints, and tests; nothing is published to
ghcr.io unless a tag is pushed.
The release version lives only in the chart's appVersion, and a release tag
must match it, so the tagged commit truthfully names the version it ships. You
never hand-edit the version in multiple files — bump it in one step, commit,
then tag that commit:
scripts/check-versions.sh --set-version 0.4.0 # sets appVersion + chart version, aligns the deployment manifests
git commit -am "Release 0.4.0"
git tag v0.4.0 && git push --tagsThe pipeline stamps the image and both release artifacts from the tag, so they
match by construction; the version-consistency check (which every build runs)
fails a vX.Y.Z tag whose version doesn't equal appVersion, and fails any
build whose chart values or deployment/ manifests disagree with it. The
deployment/ manifests are plain YAML that cannot template a
value, so --set-version/--fix keep their literal image tag aligned for you.
Use scripts/check-versions.sh (no arguments) to verify locally exactly what
CI checks.
go build ./...
go test ./...
go vet ./...Unit tests exercise the mount path against a hermetic in-process A2A appliance, so no live Safeguard appliance is required.
Licensed under the Apache License, Version 2.0. See NOTICE.