Skip to content

Enable self-service for iOS/iPadOS IPA only - #35099

Merged
mna merged 19 commits into
feat-32247-ios-ipados-self-servicefrom
mna-34274-self-service-ipa-good
Nov 4, 2025
Merged

Enable self-service for iOS/iPadOS IPA only#35099
mna merged 19 commits into
feat-32247-ios-ipados-self-servicefrom
mna-34274-self-service-ipa-good

Conversation

@mna

@mna mna commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

Related issue: Resolves #34274

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.

  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements)

Testing

Database migrations

  • Checked schema for all modified table for columns that will auto-update timestamps during migration.

@codecov

codecov Bot commented Nov 3, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 11 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feat-32247-ios-ipados-self-service@5d2fe13). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...bles/20251028140720_AddSelfServiceToInHouseApps.go 66.66% 4 Missing and 2 partials ⚠️
ee/server/service/software_installers.go 89.28% 2 Missing and 1 partial ⚠️
server/datastore/mysql/software.go 95.55% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                          Coverage Diff                          @@
##             feat-32247-ios-ipados-self-service   #35099   +/-   ##
=====================================================================
  Coverage                                      ?   66.14%           
=====================================================================
  Files                                         ?     2074           
  Lines                                         ?   174838           
  Branches                                      ?     7173           
=====================================================================
  Hits                                          ?   115639           
  Misses                                        ?    48575           
  Partials                                      ?    10624           
Flag Coverage Δ
backend 67.78% <92.30%> (?)

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.

Comment on lines +948 to +954
// TODO(mna): until we have SCEP-based authentication for iDevices, cheat by
// inserting a token for that host so we can use the self-service API.
hostSecret := uuid.NewString()
mysql.ExecAdhocSQL(t, s.ds, func(q sqlx.ExtContext) error {
_, err := q.ExecContext(context.Background(), `INSERT INTO host_device_auth (host_id, token) VALUES (?, ?)`, data.host.ID, hostSecret)
return err
})

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Heads-up @cdcme , once we have the cert-based auth we should update this hack to use the proper auth in integration tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I just reviewed your cert-auth PR, I can submit a follow-up with proper auth when yours lands, I'll extract a helper func from your tests.

Comment on lines +1569 to +1574
// TODO(mna): until iDevice SCEP-based auth is implemented, cheat by adding a
// token associated with the iOS host so we can use the self-install endpoint.
mysql.ExecAdhocSQL(t, s.ds, func(q sqlx.ExtContext) error {
_, err := q.ExecContext(ctx, `INSERT INTO host_device_auth (host_id, token) VALUES (?, 'secret')`, iosHost.ID)
return err
})

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same here @cdcme , once we have the cert-based auth we should update this hack to use the proper auth in integration tests.

@mna
mna marked this pull request as ready for review November 3, 2025 16:06
@mna
mna requested a review from a team as a code owner November 3, 2025 16:06
@jahzielv jahzielv self-assigned this Nov 3, 2025
@mna
mna merged commit 5892a47 into feat-32247-ios-ipados-self-service Nov 4, 2025
39 checks passed
@mna
mna deleted the mna-34274-self-service-ipa-good branch November 4, 2025 14:50
@cdcme cdcme linked an issue Nov 4, 2025 that may be closed by this pull request
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.

Enable self-service for iOS/iPadOS (IPA)

3 participants