You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Changing a delegate client's scopes or audiences on Redis storage fails startup #6906
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
Run the auth server with storage.type: redis and one delegate client with scopes [a, b].
Change the scopes to [a, c] and restart against the same Redis.
Startup fails with the error above.
Notes
SPIFFE association edits hit the same check. The strict check is meant to stay for those, so they are not part of this issue.
Activity