Skip to content

Add new self-service auth method for iOS/iPadOS - #36659

Merged
cdcme merged 11 commits into
mainfrom
feat-36542-ios-ipados-self-service-udid-auth
Dec 5, 2025
Merged

Add new self-service auth method for iOS/iPadOS#36659
cdcme merged 11 commits into
mainfrom
feat-36542-ios-ipados-self-service-udid-auth

Conversation

@cdcme

@cdcme cdcme commented Dec 4, 2025

Copy link
Copy Markdown
Member

Implements #36542. Adds URL/UDID-based authentication for the My Device page on iOS/iPadOS.

Summary

This implements URL-based authentication as a simpler, temporary alternative to certificate-based authentication (#35009).

The device's UUID is embedded in the WebClip URL using $FLEET_VAR_HOST_UUID. When the cert serial header isn't present, but the device UUID is, Fleet validates that it belongs to an iOS/iPadOS device. Sensitive host data is automatically scrubbed from responses.

Details

  • Adds AuthenticateDeviceByURL() to validate UUID and enforce iOS/iPadOS platform restriction
  • Extends device endpoint middleware with checkURLAuthQueryParam to detect ?udid=true
  • Adds AuthnDeviceURL authentication method to authz package
  • Scrubs sensitive data (serial, UUID, MAC, team, profiles, labels, license details) from responses when using URL auth
  • Maintains backward compatibility with token-based and certificate-based auth

Security considerations

URL-based auth is inherently less secure than certificate auth since anyone with the correct URL can access the device page.

Mitigations:

  • Platform restriction ensures only iOS/iPadOS devices can use this method
  • Sensitive data is scrubbed from responses (serial numbers, UUIDs, MACs, team info, profiles, labels)
  • License information is redacted
  • Feature is implemented specifically with fast-follow deprecation in mind

Testing

  • Unit tests for AuthenticateDeviceByURL() covering success, not found, and wrong platform
    cases
  • Endpoint tests for URL auth middleware behavior
  • Integration tests verifying authorization across all device endpoints
  • Manual testing of self-service software installation flow
  • Verified backward compatibility with existing token auth

@codecov

codecov Bot commented Dec 4, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.87342% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.94%. Comparing base (b9b4ba1) to head (0f1bd65).
⚠️ Report is 90 commits behind head on main.

Files with missing lines Patch % Lines
server/service/devices.go 82.35% 5 Missing and 1 partial ⚠️
server/service/hosts.go 89.47% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #36659   +/-   ##
=======================================
  Coverage   65.94%   65.94%           
=======================================
  Files        2248     2248           
  Lines      183797   183874   +77     
  Branches     7676     7676           
=======================================
+ Hits       121198   121249   +51     
- Misses      51524    51547   +23     
- Partials    11075    11078    +3     
Flag Coverage Δ
backend 67.70% <89.87%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cdcme
cdcme marked this pull request as ready for review December 4, 2025 14:05
@cdcme
cdcme requested review from a team as code owners December 4, 2025 14:05
@cdcme
cdcme requested a review from iansltx December 4, 2025 14:45
@cdcme
cdcme marked this pull request as draft December 4, 2025 18:42
@cdcme
cdcme marked this pull request as ready for review December 4, 2025 22:10
Comment thread server/service/devices.go Outdated
Comment thread server/service/devices.go
Comment thread server/service/devices.go
Comment thread server/service/devices_endpoint_test.go Outdated
Comment thread server/service/integration_vpp_install_test.go
Comment thread server/service/integration_enterprise_test.go
Comment thread server/service/hosts.go
Comment thread server/service/endpoint_middleware.go Outdated
@cdcme
cdcme requested a review from iansltx December 5, 2025 14:04

@iansltx iansltx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick turn on the initial work and the feedback. This looks good, given intended functionality.

@cdcme
cdcme merged commit 4cd9133 into main Dec 5, 2025
45 checks passed
@cdcme
cdcme deleted the feat-36542-ios-ipados-self-service-udid-auth branch December 5, 2025 15:16
@iansltx iansltx mentioned this pull request Dec 5, 2025
iansltx added a commit that referenced this pull request Dec 5, 2025
Per discussions on #36542, follow-up to #36659.
@cdcme cdcme linked an issue Dec 8, 2025 that may be closed by this pull request
24 tasks
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.

iOS self-service: URL/UDID auth

2 participants