Skip to content

Attach tailnet identity over an Untrusted placeholder#137

Merged
passcod merged 2 commits into
mainfrom
attach-tailscale-untrusted
May 14, 2026
Merged

Attach tailnet identity over an Untrusted placeholder#137
passcod merged 2 commits into
mainfrom
attach-tailscale-untrusted

Conversation

@passcod
Copy link
Copy Markdown
Member

@passcod passcod commented May 14, 2026

Summary

  • Device::attach_tailscale now treats an existing Untrusted holder of the same tailscale_node_id as a placeholder: it clears that row's tailscale_* columns and proceeds with the requested attachment, all in a single transaction.
  • Trusted-role conflicts still return DeviceTailscaleNodeAlreadyClaimed (HTTP 409) so the operator goes through the merge flow.

Why

Tailnet first-contact auto-creates an Untrusted Device row keyed to the node id. When the operator later wires that node id onto a real (mTLS / server-role / etc.) device, the placeholder claim previously blocked the operation. Detaching it is the right move — the placeholder has no other data worth preserving and the operator's intent is clear.

passcod added 2 commits May 14, 2026 17:01
…laimant

A tailnet first-contact auto-creates an Untrusted Device row holding the
node id. When the operator subsequently binds that node id to a real
device (mTLS-based or otherwise non-Untrusted), the placeholder claim
should not stand in the way — detach the identity from the Untrusted
row and proceed.

Trusted-role conflicts still error out so the operator goes through
the merge flow.
@passcod passcod enabled auto-merge May 14, 2026 05:04
@passcod passcod added this pull request to the merge queue May 14, 2026
Merged via the queue into main with commit 45028b0 May 14, 2026
3 checks passed
@passcod passcod deleted the attach-tailscale-untrusted branch May 14, 2026 05:12
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.

1 participant