Skip to content

Find Apple Developer ID Installer certificates - #258

Open
aritchie wants to merge 1 commit into
mainfrom
aritchie/apple-devid-installer
Open

Find Apple Developer ID Installer certificates#258
aritchie wants to merge 1 commit into
mainfrom
aritchie/apple-devid-installer

Conversation

@aritchie

Copy link
Copy Markdown
Collaborator

This pull request adds support for displaying and managing "Developer ID Installer" certificates that are only available in the local macOS keychain, as these are not returned by the App Store Connect API. The changes ensure these certificates are surfaced in the UI, distinguished from API-provided certificates, and handled correctly throughout the codebase and tests.

Apple Certificate Handling Improvements:

  • The GetCertificatesHandler now merges local "Developer ID Installer" certificates from the keychain with those returned by the App Store Connect API, ensuring these certificates are visible in the app even though they are not available from the API. Local-only certificates are marked with the new IsLocalOnly property. [1] [2] [3]
  • The local certificate service (LocalCertificateService) now parses both codesigning and basic policies to find installer certificates, deduplicates results, and exposes a helper to identify installer identities. [1] [2]

UI and Filtering Enhancements:

  • The certificates page now includes "Developer ID Installer" as a filterable type and visually marks certificates that are local-only with a special badge. The revoke button is hidden for local-only certificates, as they cannot be revoked via App Store Connect. [1] [2] [3] [4] [5] [6]

Testing Improvements:

  • Unit tests for GetCertificatesHandler have been expanded to cover the new logic for merging and distinguishing local-only installer certificates, ensuring correct behavior in various scenarios.

Other Minor Changes:

  • The AppleCertificate record now includes an IsLocalOnly property to indicate certificates that exist only in the local keychain.
  • The IOperationModal interface adds a method to request cancellation of running operations.

Copilot AI lite review requested due to automatic review settings September 10, 2026 21:29

Copilot AI 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.

🟡 Changes recommended

Certificate validity, signing eligibility, and filter separation issues remain unresolved.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds local macOS keychain discovery for Developer ID Installer certificates and surfaces them alongside App Store Connect certificates.

Changes:

  • Merges local installer certificates with API results.
  • Adds local-only metadata, filtering, badges, and revoke protection.
  • Expands keychain handling and handler tests.
  • Updates the operation cancellation contract.
File summaries
File Summary
tests/MauiSherpa.Core.Tests/Handlers/Apple/GetCertificatesHandlerTests.cs Tests local certificate merging and deduplication.
src/MauiSherpa/Pages/Certificates.razor Adds installer filtering and local-only presentation.
src/MauiSherpa.Core/Services/LocalCertificateService.cs Queries installer identities from the keychain.
src/MauiSherpa.Core/Interfaces.cs Adds certificate metadata and cancellation contract updates.
src/MauiSherpa.Core/Handlers/Apple/GetCertificatesHandler.cs Converts and merges local installer certificates.
Review details

Suppressed comments (1)

src/MauiSherpa.Core/Handlers/Apple/GetCertificatesHandler.cs:62

  • GetSigningIdentitiesAsync can return identities marked IsValid == false (the parser explicitly records invalid-policy results), but this filter ignores that flag. An expired or revoked installer identity can therefore be merged as a usable local-only certificate; exclude invalid identities before converting them to AppleCertificate.
                .Where(IsDeveloperIdInstaller)
  • Files reviewed: 5/5 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

static AppleCertificate ToCertificate(LocalSigningIdentity identity) => new(
Id: $"keychain:{identity.SerialNumber}",
Name: identity.CommonName,
CertificateType: DeveloperIdInstallerType,
Name: identity.CommonName,
CertificateType: DeveloperIdInstallerType,
Platform: "MAC_OS",
ExpirationDate: identity.ExpirationDate ?? DateTime.UtcNow.AddYears(1),
1 => "DEVELOPMENT",
2 => "DISTRIBUTION",
3 => "DEVELOPER_ID",
4 => "DEVELOPER_ID_INSTALLER",
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.

2 participants