DirectorySecurity Advisories
Sign In
Directory
spiffe-helper-fips logoFIPS

spiffe-helper-fips

Last changed

Create your Free Account

Be the first to hear about exciting product updates, critical vulnerability alerts, compare alternative images, and more.

Sign Up
Tags
Overview
Provenance
Specifications
SBOM
Vulnerabilities
Advisories

Chainguard Container for spiffe-helper-fips

A secure, minimal container image for the SPIFFE Helper utility that automates X.509 SVID certificate rotation for services that can't natively fetch X.509-SVIDs.

Chainguard Containers are regularly-updated, secure-by-default container images.

Download this Container Image

For those with access, this container image is available on cgr.dev:

docker pull cgr.dev/ORGANIZATION/spiffe-helper-fips:latest

Be sure to replace the ORGANIZATION placeholder with the name used for your organization's private repository within the Chainguard Registry.

Compatibility Notes

This image is based on the upstream SPIFFE Helper utility, which automates X.509 SVID certificate rotation for services that can't natively fetch X.509-SVIDs. The image is built on Wolfi, providing regular security updates and a minimal attack surface. Additionally, Chainguard's SPIFFE Helper Fips image maintains compatibility with standard SPIFFE workload API socket locations, and is fully compatible with existing spiffe-helper configuration files.

FIPS Support

The spiffe-helper-fips Chainguard Image ships with a validated redistribution of the OpenSSL's FIPS provider module. For more on FIPS support in Chainguard Images, consult the guide on FIPS-enabled Chainguard Images on Chainguard Academy

Getting Started

The spiffe-helper-fips is designed to automate X.509-SVID certificate rotation for services. This guide demonstrates how to use the Chainguard SPIFFE-helper fips image with MySQL and SPIRE for secure TLS certificate management.

Start by cloning the Repository:

git clone https://github.com/spiffe/helm-charts-hardened.git
cd helm-charts-hardened/examples/mysql-using-spire

Then install SPIRE and its CRDs:

helm upgrade --install -n spire-server spire-crds spire-crds \
  --repo https://spiffe.github.io/helm-charts-hardened/ \
  --create-namespace --version 0.3.0

helm upgrade --install -n spire-server spire spire \
  --repo https://spiffe.github.io/helm-charts-hardened/ \
  --version 0.17.1 -f spire-values.yaml

Next, deploy the MySQL client:

kubectl apply -f mysqlclient-configmap.yaml
kubectl apply -f mysqlclient-statefulset.yaml

Wait for the client to be ready

kubectl wait pod mysqlclient-0 --for=condition=ready --timeout=60s

Retrieve the client's certificate x500UniqueIdentifier identifier:

# Run, and get the x500UniqueIdentifier value:
kubectl exec -it mysqlclient-0 -c main -- bash -c 'openssl x509 -in /certs/tls.crt -noout -text | grep Subject:'

Additionally, update the x500UniqueIdentifier in custom-mysql-values.yaml and replace the default ghcr.io/spiffe/spiffe-helper image with the Chainguard FIPS image:

cat > custom-mysql-values.yaml <<EOF
initdbScripts:
  usertls.sql: |
    CREATE USER 'mysqlclient'@'%' REQUIRE SUBJECT '/C=US/O=SPIRE/CN=mysqlclient.default.svc.cluster.local/x500UniqueIdentifier=a753b06724b81d4a2f14f615d40550ed';
    GRANT ALL PRIVILEGES ON *.* TO 'mysqlclient'@'%' WITH GRANT OPTION;

primary:
  extraFlags: "--ssl-ca=/certs/ca.pem --ssl-cert=/certs/tls.crt --ssl-key=/certs/tls.key --require-secure-transport=ON"

  initContainers: |
    - name: setup-helper-volume-p1
      image: busybox:1.36.1-uclibc
      imagePullPolicy: IfNotPresent
      command:
      - sh
      - -c
      - 'cp -a /bin/busybox /helper'
      securityContext: {{- omit .Values.primary.containerSecurityContext "enabled" | toYaml | nindent 8 }}
      volumeMounts:
      - name: spiffe-helper
        mountPath: /helper
    - name: setup-helper-volume-p2
      image: cgr.dev/chainguard/spiffe-helper-fips:latest
      imagePullPolicy: IfNotPresent
      command:
      - /helper/busybox
      - sh
      - -c
      - '/helper/busybox cp -a /spiffe-helper /helper && /helper/busybox rm -f /helper/busybox'
      securityContext: {{- omit .Values.primary.containerSecurityContext "enabled" | toYaml | nindent 8 }}
      volumeMounts:
      - name: spiffe-helper
        mountPath: /helper
    - name: init-tls
      image: cgr.dev/chainguard/spiffe-helper-fips:latest
      imagePullPolicy: Always
      command:
      - /spiffe-helper
      - -config
      - /etc/spiffe-helper.conf
      - -daemon-mode=false
      securityContext: {{- omit .Values.primary.containerSecurityContext "enabled" | toYaml | nindent 8 }}
      volumeMounts:
      - name: spiffe-workload-api
        mountPath: /spiffe-workload-api
        readOnly: true
      - name: spiffe-helper-configmap
        mountPath: /etc/spiffe-helper.conf
        subPath: spiffe-helper.conf
        readOnly: true
      - name: certdir
        mountPath: /certs

  sidecars: |
    - name: refresh-tls
      image: {{  include "mysql.image" . }}
      imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
      command:
      - /helper/spiffe-helper
      - -config
      - /etc/spiffe-helper.conf
      env:
      - name: MYSQL_PWD
        valueFrom:
          secretKeyRef:
            name: {{ template "mysql.secretName" . }}
            key: mysql-root-password
      securityContext: {{- omit .Values.primary.containerSecurityContext "enabled" | toYaml | nindent 8 }}
      volumeMounts:
      - name: spiffe-workload-api
        mountPath: /spiffe-workload-api
        readOnly: true
      - name: spiffe-helper-configmap
        mountPath: /etc/spiffe-helper.conf
        subPath: spiffe-helper.conf
        readOnly: true
      - name: certdir
        mountPath: /certs
      - name: spiffe-helper
        mountPath: /helper
      - name: mysql-sockdir
        mountPath: /opt/bitnami/mysql/tmp

  extraVolumeMounts:
  - name: certdir
    mountPath: /certs
  - name: mysql-sockdir
    mountPath: /opt/bitnami/mysql/tmp

  extraVolumes: |
    - name: certdir
      emptyDir: {}
    - name: spiffe-helper
      emptyDir: {}
    - name: mysql-sockdir
      emptyDir: {}
    - name: spiffe-helper-configmap
      configMap:
        name: {{ include "mysql.primary.fullname" . }}-spiffe-helper
    - name: spiffe-workload-api
      csi:
        driver: "csi.spiffe.io"
        readOnly: true
EOF

Following that, deploy MySQL with the above configuration:

helm upgrade --install mysql mysql \
  --version 9.15.0 \
  --repo https://charts.bitnami.com/bitnami \
  -f custom-mysql-values.yaml

Wait for MySQL to be ready

kubectl wait pod mysql-0 --for=condition=ready --timeout=60s

Now that it's running, you can test the connection:

kubectl exec -it mysqlclient-0 -- bash -c \
  'mysql -u mysqlclient --protocol tcp \
   --ssl-key /certs/tls.key \
   --ssl-cert /certs/tls.crt \
   --ssl-ca /certs/ca.pem \
   -h mysql.default.svc.cluster.local'

If everything is working as expected, the mysql> prompt will appear in your terminal:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 23
Server version: 8.0.35 Source distribution

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Documentation and Resources:

What are Chainguard Containers?

Chainguard Containers are minimal container images that are secure by default.

In many cases, the Chainguard Containers tagged as :latest contain only an open-source application and its runtime dependencies. These minimal container images typically do not contain a shell or package manager. Chainguard Containers are built with Wolfi, our Linux undistro designed to produce container images that meet the requirements of a more secure software supply chain.

The main features of Chainguard Containers include:

For cases where you need container images with shells and package managers to build or debug, most Chainguard Containers come paired with a -dev variant.

Although the -dev container image variants have similar security features as their more minimal versions, they feature additional software that is typically not necessary in production environments. We recommend using multi-stage builds to leverage the -dev variants, copying application artifacts into a final minimal container that offers a reduced attack surface that won’t allow package installations or logins.

Learn More

To better understand how to work with Chainguard Containers, please visit Chainguard Academy and Chainguard Courses.

In addition to Containers, Chainguard offers VMs and Libraries. Contact Chainguard to access additional products.

Trademarks

This software listing is packaged by Chainguard. The trademarks set forth in this offering are owned by their respective companies, and use of them does not imply any affiliation, sponsorship, or endorsement by such companies.

Licenses

Chainguard container images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" tag of this image:

  • Apache-2.0

  • GCC-exception-3.1

  • GPL-3.0-or-later

  • LGPL-2.1-or-later

  • MIT

  • MPL-2.0

For a complete list of licenses, please refer to this Image's SBOM.

Software license agreement

Compliance

This is a FIPS validated image for FedRAMP compliance.

This image is STIG hardened and scanned against the DISA General Purpose Operating System SRG with reports available.

Learn more about STIGsGet started with STIGs

Related images

Category
FIPS
STIG

Safe Source for Open Sourceâ„¢
Media KitContact Us
© 2025 Chainguard. All Rights Reserved.
Private PolicyTerms of Use

Chainguard ContainersChainguard LibrariesChainguard VMs