Related user story
#47116
Task
Ships the device SSO SAML flow, inert: a new device-token-authenticated initiation endpoint, a fleet_desktop initiator branch on the existing MDM SSO callback, and a Redis-backed device SSO session store with its __Host- cookie. Nothing consumes the session yet - enforcement is sub-issue 3 - so this merges with zero behavior change and is independently integration-testable.
Condition of satisfaction
Initiation:
Callback:
No enforcement yet:
Tests/commands:
Related user story
#47116
Task
Ships the device SSO SAML flow, inert: a new device-token-authenticated initiation endpoint, a
fleet_desktopinitiator branch on the existing MDM SSO callback, and a Redis-backed device SSO session store with its__Host-cookie. Nothing consumes the session yet - enforcement is sub-issue 3 - so this merges with zero behavior change and is independently integration-testable.Condition of satisfaction
Initiation:
sso_enabled: true:POST /device/{token}/ssoreturns an IdP URL whose SAMLRequest resolves against the configured metadata, and sets the__Host-FLEETSSOSESSIONIDhandshake cookie.sso_enabled: false→ client error (not 500). With no IdP configured → client error naming end user authentication. Free tier →ErrMissingLicenseshape (402/paymentRequired per existing convention).Callback:
fleet_desktop-initiated session responds 303 to the device page URL, sets the device SSO session cookie, and deletes the handshake cookie.HostID/HostUUIDmatch) and expires after the configured TTL (test with a short TTL).ota_enroll,setup_experience,account_driven_enroll,mdm_sso) behave byte-for-byte as before — their integration tests pass unchanged.fleet_desktopbranch never writes host↔IdP-account associations (assertAssociateHostMDMIdPAccountDB-related mock not invoked for this initiator).No enforcement yet:
sso_enabled: trueand no session cookie, all other device endpoints still respond 200 (the gate is sub-issue 3) — pin this with a test that sub-issue 3 will flip.Tests/commands:
MYSQL_TEST=1 REDIS_TEST=1 go test -run TestIntegrationsMDM ./server/service/...(or the suite hosting the MDM SSO callback tests) extended with thefleet_desktopinitiator cases.MYSQL_TEST=1 REDIS_TEST=1 go test ./ee/server/service/...go test ./server/sso/...if the session store lands there.make lint-go-incrementalclean;make generate-mockif the datastore/service interfaces changed.changes/changelog entry if this PR alters user-visible behavior (likely not — the flow is inert until the gate ships; the story-level entry can land with sub-issue 3).