Desktop release: Developer ID gates on the exact artifacts (every binary inside out: Developer ID, hardened runtime, timestamp, no sandbox or get-task-allow; spctl exec/open and stapler on the app, the app in the DMG and in the updater bundle, the DMG); notarization key from ASC_KEY_ID / ASC_ISSUER_ID / ASC_P8 too
This commit is contained in:
parent
d4888ae17b
commit
64ca7af194
2 changed files with 27 additions and 13 deletions
|
|
@ -40,7 +40,7 @@ to the CLI and moves on its own.
|
|||
| `updater.key` | minisign private key of the updater (no password; mode 600) | `bunx tauri signer generate -w ~/.storebound-keys/updater.key -p "" --ci` (done once, D5) |
|
||||
| `updater.key.pub` | its public key; the same text is `plugins.updater.pubkey` in tauri.conf.json and `PUBLIC_KEY` in cli/lib/desktop-dist.ts | the same command |
|
||||
| `forbidden-terms.txt` | names the privacy scan must never find: one per line (people, accounts, emails, machine names) | the owner |
|
||||
| `notary.json` | `{"keyId", "issuerId", "keyPath"}` of an App Store Connect API key for notarytool | the owner, once a Developer ID exists |
|
||||
| `notary.json` | optional: `{"keyId", "issuerId", "keyPath"}` of the App Store Connect API key for notarytool (or the `ASC_*` / `APPLE_API_*` variables) | the owner |
|
||||
|
||||
**Back up `updater.key`** (password manager or an offline copy). If it is lost, installed apps can never update
|
||||
again: they only accept bundles signed with this key, so everyone would have to reinstall by hand. Never commit
|
||||
|
|
@ -99,16 +99,30 @@ What it does, in order:
|
|||
7. Writes `latest.json`, `SHA256SUMS` and `evidence-macos-<version>.json`. The evidence file (tool versions, checks,
|
||||
hashes) stays local.
|
||||
|
||||
### Owner actions for a signed macOS build
|
||||
### Signing identity and notarization key
|
||||
|
||||
1. **Developer ID certificate.** your Apple developer team's Account Holder creates a **Developer ID Application**
|
||||
certificate: developer.apple.com > Certificates > +, with a CSR from Keychain Access on this Mac. Install it in
|
||||
the login keychain. Today the keychain has Apple Distribution and Development identities only, so builds are
|
||||
unsigned previews.
|
||||
2. **Notarization key.** An App Store Connect API key (Users and Access > Integrations, role Developer) as
|
||||
`~/.storebound-keys/notary.json` and its `.p8` file. Or set `APPLE_API_KEY`, `APPLE_API_ISSUER` and
|
||||
`APPLE_API_KEY_PATH`.
|
||||
3. **Rebuild.** Run the command above in Terminal on the Mac.
|
||||
1. **Developer ID certificate.** A **Developer ID Application** certificate of your Apple developer team in the login
|
||||
keychain (the Account Holder creates it at developer.apple.com > Certificates > +, with a CSR from Keychain
|
||||
Access). It is installed on the release Mac since October 2026. A machine without it still builds, but only the
|
||||
ad-hoc `-unsigned` preview.
|
||||
2. **Notarization key.** An App Store Connect API key, found in this order:
|
||||
- `APPLE_API_KEY`, `APPLE_API_ISSUER` and `APPLE_API_KEY_PATH`;
|
||||
- storebound's own `ASC_KEY_ID`, `ASC_ISSUER_ID` and `ASC_P8` (a path or the PEM; by default
|
||||
`~/.appstoreconnect/private_keys/AuthKey_<ASC_KEY_ID>.p8`, where Xcode keeps it);
|
||||
- `~/.storebound-keys/notary.json`.
|
||||
|
||||
The key ids are never written into the repository.
|
||||
3. **Build.** Run the command above in Terminal on the Mac.
|
||||
|
||||
**Gates on the exact artifacts.** A signed release stops unless all of these pass:
|
||||
|
||||
- every executable in `Contents/MacOS` (the app and the CLI sidecar, signed inside out by Tauri), and the bundle, is
|
||||
signed with Developer ID, with the hardened runtime and a secure timestamp;
|
||||
- no executable carries the App Sandbox entitlement (Mac App Store) or `get-task-allow`;
|
||||
- `spctl -a -vvv -t exec <app>` says Notarized Developer ID, and `xcrun stapler validate <app>` passes for the
|
||||
built app, the app inside the mounted DMG and the app inside the updater bundle;
|
||||
- `spctl -a -vvv -t open --context context:primary-signature <dmg>` accepts the DMG, and
|
||||
`xcrun stapler validate <dmg>` passes.
|
||||
|
||||
### Opening an unsigned preview (what the downloads page says)
|
||||
|
||||
|
|
@ -243,8 +257,8 @@ files stay where they are, because links and checksums must not change.
|
|||
|
||||
## Going public: checklist
|
||||
|
||||
1. Developer ID Application certificate and notary key on the Mac, then a signed, notarized macOS build.
|
||||
Check: `spctl` accepted, `stapler validate` OK, self-test from the DMG.
|
||||
1. A signed, notarized macOS build from the release commit (the Developer ID certificate is on the Mac). The gates
|
||||
above must pass.
|
||||
2. Forgejo Actions enabled, the Linux runner registered, a `desktop-v0.1.0` tag built, `add` of the AppImage and
|
||||
deb.
|
||||
3. Windows: a runner, or ship macOS + Linux first. The page and latest.json list only what exists.
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ async function mac(argv: string[]): Promise<void> {
|
|||
if (a.get('identity') && !securityOut.includes(`"${a.get('identity')}"`)) fail(`identity not in the keychain: ${a.get('identity')}`);
|
||||
const signed = !!identity;
|
||||
const notary = signed && !a.has('no-notarize') ? notaryEnv() : null;
|
||||
if (signed && !a.has('no-notarize') && !notary) fail('Developer ID found but no notarization key: set APPLE_API_KEY, APPLE_API_ISSUER, APPLE_API_KEY_PATH or write ~/.storebound-keys/notary.json (docs/desktop-release.md), or pass --no-notarize for a local test');
|
||||
if (signed && !a.has('no-notarize') && !notary) fail('Developer ID found but no notarization key: set ASC_KEY_ID + ASC_ISSUER_ID (+ ASC_P8), APPLE_API_KEY + APPLE_API_ISSUER + APPLE_API_KEY_PATH, or ~/.storebound-keys/notary.json (docs/desktop-release.md), or pass --no-notarize for a local test');
|
||||
const notarized = signed && !!notary;
|
||||
say(`storebound desktop ${version} for macOS (universal), commit ${git.commit.slice(0, 10)}${git.dirty ? ' + uncommitted changes' : ''}: ${signed ? `signing as Developer ID${notarized ? ', notarized' : ' (not notarized)'}` : 'NO Developer ID Application identity in the keychain: ad-hoc signed preview, named -unsigned'}`);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue