Skip to content

move enrollment after user login - so no need for pending enrollment. - #236

Open
yuval-k wants to merge 1 commit into
mainfrom
agents/agent-desktop-device-enrollment-update
Open

yuval-k wants to merge 1 commit into
mainfrom
agents/agent-desktop-device-enrollment-update

Conversation

@yuval-k

@yuval-k yuval-k commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Instead of starting a pending enrollment, waiting for user OIDC sign-in and then finish the enrollment, we enroll after the user's OIDC sign-in is complete.

This removes the need to track pending enrollments on the controller: there is no longer a cap of 1,024 pending enrollments, and no in-memory enrollment state, so controller replicas don't need sticky routing.

Changes

  • New RPCs GetLoginConfiguration (read-only) and EnrollDevice replace BeginEnrollment/CompleteEnrollment. Breaking: upgrade controller and agents together; there is no fallback.
  • The agent runs the OIDC login itself (PKCE, state, nonce) and creates the device key/CSR only after sign-in. The controller verifies the ID token and access token as before, and accepts any valid tokens for its client rather than requiring a sign-in it started.
  • Headless (device authorization) agents now call the IdP's device authorization endpoint directly.
  • Migration 0005_enrollment_receipts: retries with the same user and CSR return the original device and certificate, including after a controller restart.
  • The user-facing sign-in flow is unchanged.

Follow-up: #255.

@yuval-k
yuval-k force-pushed the agents/agent-desktop-device-enrollment-update branch 2 times, most recently from afd920c to b86805a Compare November 13, 2026 15:03
@yuval-k
yuval-k marked this pull request as ready for review November 13, 2026 16:04
@yuval-k
yuval-k force-pushed the agents/agent-desktop-device-enrollment-update branch from b86805a to fcd71a6 Compare November 13, 2026 16:16

This branch has not been deployed

No deployments
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