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
AI provider and MCP create adoption: use a secret nonce instead of the object UID #426
Follow-up from #423 (#422 item 1), maintainer decision "Option A" on that PR.
Gap. After a lost create answer, the CoderAIProvider and CoderMCPServer create paths adopt a Coder resource whose display name is the operator's temporary display name coder-k8s:<object UID>. The operator records that resource's ID, applies the spec to it, and later deletes it by that ID. The object UID is visible to anyone who can read the Kubernetes object. A Coder user who creates a resource with that exact display name inside the window can therefore get it adopted, overwritten, and later deleted. The window normally ends at the next successful read, about 5 s after the lost answer. It stays open while the object stalls with NameConflict or SlugConflict.
Why it was kept in #423. Adoption is the only recovery for a lost create answer (#253) and for a late commit after the marker was cleared. Removing it would make every lost create answer stall with a false conflict on the object's own resource.
Proposal (Option C). Replace the UID in the temporary display name with a random secret nonce. Generate it before the create, store it only in the cleanup record (ConfigMap in the operator namespace, which users cannot read), and adopt only a resource whose display name carries that nonce. Migration: records without a nonce keep today's behavior until their object is next created.
Activity