Skip to content

auth: clean up Anisette handling - #367

Merged
kabiroberai merged 1 commit into
mainfrom
fix-anisette-more
Oct 18, 2026
Merged

kabiroberai merged 1 commit into
mainfrom
fix-anisette-more

Conversation

@kabiroberai

@kabiroberai kabiroberai commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Simplifies the Anisette handling code. Removes some unnecessary fields (including hard-coded Mac serial numbers, cf #348) from our http requests amongst other things.

How was it tested?

Tested on macOS:

  • Can log in after resetting provisioning
  • Can run xtool ds teams
  • Can run xtool ds certificates

AI tool usage

How much of this PR was AI-assisted? (check one)

  • 0 - No AI was used to write code
  • 1 - I was assisted by AI. I reviewed the finished result.
  • 2 - I set the AI going and left it to it; nobody has read the result - no review, or AI review only

Summary by CodeRabbit

  • Updates
    • Anisette-backed requests now use device information provided with Anisette data, including an Android 14 device identity.
    • Developer service requests no longer include client-information and device-ID headers.
    • The Anisette command now displays fetched details in sorted order and uses the configured Anisette provider instead of prompting for provisioning data.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 758bc642-69ff-4377-82e5-ebdce9ada7ca
📥 Commits

Reviewing files that changed from the base of the PR and between c3c958d and e83ac65.

📒 Files selected for processing: 17
  • Sources/XKit/DeveloperServices/DeveloperServicesClient.swift
  • Sources/XKit/DeveloperServices/OpenAPI/DeveloperServices+OpenAPI.swift
  • Sources/XKit/GrandSlam/Anisette/ADIDataProvider.swift
  • Sources/XKit/GrandSlam/Anisette/AnisetteData.swift
  • Sources/XKit/GrandSlam/Anisette/AnisetteDataProvider.swift
  • Sources/XKit/GrandSlam/Anisette/DeviceInfo+Fetching.swift
  • Sources/XKit/GrandSlam/Anisette/DeviceInfo.swift
  • Sources/XKit/GrandSlam/Anisette/XADIProvider.swift
  • Sources/XKit/GrandSlam/GrandSlamClient.swift
  • Sources/XKit/GrandSlam/Lookup/GrandSlamLookupManager.swift
  • Sources/XKit/GrandSlam/Requests/Concrete/GrandSlamTrustedDeviceRequest.swift
  • Sources/XKit/GrandSlam/Requests/Concrete/GrandSlamValidateRequest.swift
  • Sources/XKit/GrandSlam/Requests/GrandSlamOperationRequest.swift
  • Sources/XKit/GrandSlam/Requests/GrandSlamRequest.swift
  • Sources/XKit/GrandSlam/Requests/GrandSlamTwoFactorRequest.swift
  • Sources/XKit/Integration/Superconfig.swift
  • Sources/XToolSupport/DSCommands/DSCommand.swift
💤 Files with no reviewable changes: 3
  • Sources/XKit/GrandSlam/Anisette/DeviceInfo+Fetching.swift
  • Sources/XKit/Integration/Superconfig.swift
  • Sources/XKit/DeveloperServices/DeveloperServicesClient.swift

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The change consolidates device identity in AnisetteData and obtains it through AnisetteDataProvider. GrandSlam and DeveloperServices request construction now use the updated data. The XADI client identity and anisette command output change, and the code removes DeviceInfo fetching and Superconfig.

Changes: Anisette Device Identity

Layer / File(s) Summary
Device identity model and acquisition
Sources/XKit/GrandSlam/Anisette/DeviceInfo.swift, Sources/XKit/GrandSlam/Anisette/DeviceInfo+Fetching.swift, Sources/XKit/GrandSlam/Anisette/AnisetteDataProvider.swift, Sources/XKit/GrandSlam/Anisette/ADIDataProvider.swift, Sources/XKit/GrandSlam/Anisette/XADIProvider.swift
DeviceInfo now contains a device ID and client-info string. AnisetteDataProvider exposes asynchronous deviceInfo(), which ADIDataProvider builds from the local user UUID and client info. The XADI client identity changes to Pixel 7 running Android 14.
Anisette data and GrandSlam requests
Sources/XKit/GrandSlam/Anisette/AnisetteData.swift, Sources/XKit/GrandSlam/Anisette/ADIDataProvider.swift, Sources/XKit/GrandSlam/Requests/*, Sources/XKit/GrandSlam/GrandSlamClient.swift, Sources/XKit/GrandSlam/Lookup/GrandSlamLookupManager.swift
AnisetteData includes DeviceInfo in its dictionary. ADIDataProvider uses the identity dictionary for request headers. GrandSlam request methods no longer take a separate DeviceInfo argument; GrandSlam clients use the updated Anisette data.
DeveloperServices and anisette command integrations
Sources/XKit/DeveloperServices/DeveloperServicesClient.swift, Sources/XKit/DeveloperServices/OpenAPI/DeveloperServices+OpenAPI.swift, Sources/XToolSupport/DSCommands/DSCommand.swift
DeveloperServices removes explicit client-info and device-ID headers. The anisette command fetches data through its injected provider and prints dictionary entries sorted by key.

Superconfig Removal

Layer / File(s) Summary
Remove Superconfig
Sources/XKit/Integration/Superconfig.swift
The Superconfig type and its configuration fields, initializer, property-list encoder, filename, and save method are removed.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to e83ac

The Anisette changes are ready to merge after normal checks; no unresolved issue requires a fix before merge.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title is concise and clearly describes the main change: simplifying Anisette handling in authentication flows.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kabiroberai
kabiroberai marked this pull request as ready for review October 18, 2026 23:37
@kabiroberai
kabiroberai merged commit 2afd530 into main Oct 18, 2026
11 checks passed
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