Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions scripts/otter/fixtures/macos-profile.plist
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Shaped like the Developer ID (Mac) profile Apple issued on 2026-10-12. -->
<plist version="1.0">
<dict>
<key>Entitlements</key>
Expand All @@ -10,11 +11,11 @@
<key>keychain-access-groups</key>
<array><string>YNJ5WLH965.*</string></array>
<key>com.apple.developer.associated-domains</key>
<array><string>*</string></array>
<key>aps-environment</key>
<string>*</string>
<key>com.apple.developer.aps-environment</key>
<string>production</string>
<key>com.apple.security.application-groups</key>
<array><string>group.dev.otterware.code</string></array>
<array><string>group.dev.otterware.code</string><string>YNJ5WLH965.*</string></array>
</dict>
</dict>
</plist>
21 changes: 13 additions & 8 deletions scripts/otter/macos-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ const ProvisioningProfilePlist = Schema.Struct({
Entitlements: Schema.Struct({
"com.apple.application-identifier": Schema.optional(Schema.String),
"com.apple.developer.team-identifier": Schema.optional(Schema.String),
"com.apple.developer.associated-domains": Schema.optional(Schema.Array(Schema.String)),
// Developer ID profiles grant a wildcard as the bare string "*", not a list.
"com.apple.developer.associated-domains": Schema.optional(
Schema.Union([Schema.String, Schema.Array(Schema.String)]),
),
"keychain-access-groups": Schema.optional(Schema.Array(Schema.String)),
[BROWSER_PASSKEYS_ENTITLEMENT]: Schema.optional(Schema.Boolean),
}),
Expand Down Expand Up @@ -200,13 +203,15 @@ export function renderMacPasskeyEntitlements(
: "";
const associatedDomains = configuration.rpDomains
.filter((domain) =>
(grants?.["com.apple.developer.associated-domains"] ?? []).some(
(grant) =>
grant === "*" ||
grant === `webcredentials:${domain}` ||
(grant.startsWith("webcredentials:*.") &&
domain.endsWith(grant.slice("webcredentials:*".length))),
),
[grants?.["com.apple.developer.associated-domains"] ?? []]
.flat()
.some(
(grant) =>
grant === "*" ||
grant === `webcredentials:${domain}` ||
(grant.startsWith("webcredentials:*.") &&
domain.endsWith(grant.slice("webcredentials:*".length))),
),
)
.map((domain) => ` <string>webcredentials:${escapeXml(domain)}</string>`)
.join("\n");
Expand Down
Loading