Skip to content

Editing a SPIFFE client association on Redis storage leaves the new pod never ready #6907

Open

Description

@jhrozek

What happens

When the auth server uses Redis storage, editing a SPIFFE client association and restarting fails startup:

client "<id>" is already registered as a different configured client
(SPIFFE-reserved clients must match exactly; delete the stored client key
immediately before the rollout)

In Kubernetes the new pod never becomes Ready and the rollout stays stuck. The workaround is to delete the stored placeholder row by hand, immediately before the rollout:

<keyPrefix>client:<clientID>

For an operator-managed server the prefix is thv:auth:{<namespace>:<name>}:. The braces are literal. While the row is gone, the client ID is open to dynamic client registration, so the delete has to happen right before the rollout.

What trips it: any edit to the association's scopes, audiences, resources, principal pattern, methods, or trust-domain reference. Renaming the trust-domain reference counts, because the reference is part of the identity hash. Edits the placeholder does not store, such as grant types or a trust domain's bundle source, do not trip it.

SPIFFE client authentication is not enforced in this build yet, so nobody can hit this today. It will matter once #6199 lands.

Why it works this way

The placeholder row is not used to authorize anything. SPIFFE clients are served from each replica's in-process overlay, built from that replica's config. The row only reserves the client ID, so DCR cannot take it.

The strict check is on purpose. The #6473 review asked for scopes, audiences and RFC 8707 resources in the placeholder fingerprint, because two replicas with different resource allowlists would otherwise look identical during a rolling policy change. Association identity was added to the same contract.

Delegate clients used to share this check by accident. They now replace their row on restart (#6906), and SPIFFE placeholders keep the strict check.

Expected

An operator can edit a SPIFFE association without deleting a Redis key by hand, and without opening a window where the client ID can be registered through DCR.

Options

  • Keep the strict check and add tooling or an operator step that does the delete safely, for example a one-shot job that runs before the rollout.
  • Let the row be replaced when the new association is a deliberate, validated edit, and keep refusing true collisions (another client's ID, or a different trust domain at the same ID). This needs a way to tell an edit from a collision without weakening what the Normalize canonical inbound grants #6473 review asked for.
  • Version the row, so two replicas at different config versions can coexist during a rollout.

Notes

Activity

  1. added
    needs-triage
    on Oct 22, 2026
  2. removed
    needs-triage
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions