Skip to content

Changing a delegate client's scopes or audiences on Redis storage fails startup #6906

Closed

Description

@jhrozek

What happens

When the auth server uses Redis storage, changing a delegate client's scopes or audiences and restarting fails startup:

failed to register delegate client "<id>": storage: item already exists:
client "<id>" is already registered as a different configured client

In Kubernetes this means the new pod never becomes Ready and the rollout stays stuck. The only workaround is to delete the client's row from Redis by hand:

<keyPrefix>client:<clientID>

For an operator-managed VirtualMCPServer the prefix is thv:auth:{<namespace>:<name>}:. The braces are literal.

The in-memory backend is not affected, because it starts empty on every restart.

Cause

This is a regression from #6473, first released in v0.47.0.

Before #6473, registerDelegateClients called RegisterClient, which overwrote the Redis row without checking. #6473 moved delegates to ReconcileConfiguredClient. That function refuses to replace a row whose fingerprint differs from the new declaration. The fingerprint includes scopes, audiences, grant types, response types, resources and the public flag.

The strict check is on purpose for SPIFFE placeholders. The #6473 review asked for it, to block rolling policy changes. Nobody discussed delegate clients in that review, so they picked up the same check as a side effect.

Expected

Editing a delegate client's scopes or audiences takes effect on the next restart, as it did before v0.47.0. The server logs a WARN with the old and new values.

Reproduce

  1. Run the auth server with storage.type: redis and one delegate client with scopes [a, b].
  2. Change the scopes to [a, c] and restart against the same Redis.
  3. Startup fails with the error above.

Notes

Activity

  1. added
    bug
    on Oct 22, 2026
  2. added
    needs-triage
    on Oct 22, 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

    bugneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions