Skip to content

Add extra CAs for SPIRE agent#23

Merged
alec-w merged 1 commit intomainfrom
add-extra-cas-for-spire-agent
Feb 12, 2026
Merged

Add extra CAs for SPIRE agent#23
alec-w merged 1 commit intomainfrom
add-extra-cas-for-spire-agent

Conversation

@alec-w
Copy link
Contributor

@alec-w alec-w commented Feb 11, 2026

Part of https://github.com/cofide/cofide/issues/175

Same approach as already taken with the SPIRE server.

When running SPIRE agent in clusters outside the one with the SPIRE server we can point it at a URL to fetch the server trust bundle (our external storage). When running locally this is served with a self-signed cert and so the SPIRE agent needs to be configured to trust this.

@alec-w alec-w self-assigned this Feb 11, 2026
@alec-w alec-w added this to the now milestone Feb 11, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @alec-w, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the SPIRE agent's flexibility by enabling the inclusion of custom Certificate Authorities (CAs) into its trust store. This is particularly useful for development environments or specific setups where self-signed certificates are used, ensuring the agent can establish trust with endpoints secured by these additional CAs.

Highlights

  • Extra CA Support: Introduced a new extraCAs parameter in the spire-agent Helm chart, allowing users to provide a bundle of X.509 certificates for additional Certificate Authorities (CAs).
  • ConfigMap for CAs: Implemented a new Helm template to create a Kubernetes ConfigMap, which will store the provided extraCAs bundle.
  • Agent Volume Mounting: Configured the SPIRE agent daemonset to conditionally mount the extra-ca ConfigMap as a read-only file at /etc/ssl/certs/extra-ca.crt within the agent pods.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • charts/spire/charts/spire-agent/templates/daemonset.yaml
    • Added conditional volume mount for extra-ca to the agent container.
    • Added conditional volume definition for extra-ca using a ConfigMap.
  • charts/spire/charts/spire-agent/templates/extra-ca-configmap.yaml
    • Introduced a new ConfigMap template to store additional CA certificates.
  • charts/spire/charts/spire-agent/values.yaml
    • Added extraCAs parameter to values.yaml for custom CA bundles.
Activity
  • No human activity (comments, reviews) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a feature to add extra CA certificates to the SPIRE agent's trust store, primarily for development environments with self-signed certificates. A medium-severity vulnerability was identified where the new extraCAs parameter could allow users with Helm value permissions to inject arbitrary CA certificates, potentially leading to Man-in-the-Middle attacks. To address this, it's recommended to reference a pre-existing Kubernetes secret instead of directly passing raw certificate content. Furthermore, for improved maintainability, consider adding a checksum annotation to the pod template to ensure that changes to the CAs trigger a rolling update of the agent pods.

Added in the same manner as done for the SPIRE server already.
This allows configuring the agent to trust self-signed certificates for
local dev.
@alec-w alec-w force-pushed the add-extra-cas-for-spire-agent branch from 4232b60 to d4e960b Compare February 12, 2026 15:45
@alec-w alec-w changed the title WIP: Add extra CAs for spire agent Add extra CAs for spire agent Feb 12, 2026
@alec-w alec-w marked this pull request as ready for review February 12, 2026 15:49
@alec-w alec-w changed the title Add extra CAs for spire agent Add extra CAs for SPIRE agent Feb 12, 2026
@alec-w alec-w merged commit 043f615 into main Feb 12, 2026
36 checks passed
@alec-w alec-w deleted the add-extra-cas-for-spire-agent branch February 12, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants