You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+105Lines changed: 105 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -305,3 +305,108 @@ The documentation website at [telepresence.io](https://telepresence.io) is manag
305
305
- `DOCS_VERSION`- Major.minor version to generate or update (e.g., `2.27`)
306
306
307
307
See the telepresence.io repository for full instructions.
308
+
309
+
### macOS Installer Signing and Notarization
310
+
311
+
The macOS `.pkg` installers are signed and notarized to pass Gatekeeper verification. The signing process uses a protected GitHub Environment to secure the signing credentials.
312
+
313
+
#### Environment Setup
314
+
315
+
The `build-macos-pkg` job uses the `macos-signing` environment, which must be configured in the repository settings:
316
+
317
+
1. Go to https://github.com/telepresenceio/telepresence/settings/environments
318
+
2. Create an environment named `macos-signing`
319
+
3. Enable "Required reviewers" and add authorized personnel
320
+
4. Optionally restrict deployment branches to `release/*`
321
+
5. Add the following secrets to the environment (not repository-level):
322
+
323
+
| Secret Name | Description |
324
+
|-------------|-------------|
325
+
| `MACOS_CERTIFICATE_P12` | Base64-encoded P12 file containing both Application and Developer ID Installer certificates |
326
+
| `MACOS_CERTIFICATE_PASSWORD` | Password for the P12 file |
327
+
| `MACOS_SIGN_APPLICATION` | Developer ID Application certificate name (e.g., `Developer ID Application: Your Name (TEAMID)`) |
328
+
| `MACOS_SIGN_INSTALLER` | Developer ID Installer certificate name (e.g., `Developer ID Installer: Your Name (TEAMID)`) |
329
+
| `MACOS_NOTARIZE_APPLE_ID` | Apple ID email for notarization |
330
+
| `MACOS_NOTARIZE_TEAM_ID` | Apple Developer Team ID |
331
+
| `MACOS_NOTARIZE_PASSWORD` | App-specific password for notarization |
332
+
333
+
#### Release Workflow
334
+
335
+
When a release tag is pushed:
336
+
1. All platform binaries (Linux, Windows, macOS) are built immediately
337
+
2. Linux `.deb`/`.rpm` and Windows `.exe` installers are built
338
+
3. The release is published with all binaries and Linux/Windows installers
339
+
4. The `build-macos-pkg` job waits for approval from a required reviewer
340
+
5. Once approved, signed `.pkg` installers are built and added to the release
341
+
342
+
This design ensures:
343
+
- **Emergency releases can proceed** without the signing approver being available (all binaries and Linux/Windows installers are released)
344
+
- **Signing credentials are protected** by requiring explicit approval before they are exposed
345
+
- **Signed packages are added later** when the approver reviews and approves the job
346
+
347
+
If the environment is not configured or never approved, the release will contain macOS standalone binaries but not `.pkg` installers.
348
+
349
+
#### Obtaining the Certificates
350
+
351
+
You need an [Apple Developer Program](https://developer.apple.com/programs/) membership ($99/year) to obtain signing certificates.
352
+
353
+
1. **Create certificates in Apple Developer Portal:**
354
+
- Go to [Certificates, Identifiers & Profiles](https://developer.apple.com/account/resources/certificates/list)
355
+
- Click the + button to create a new certificate
356
+
- Create **Developer ID Application** certificate (for signing binaries)
357
+
- Create **Developer ID Installer** certificate (for signing .pkg files)
358
+
- Download both certificates and double-click to install in Keychain Access
359
+
360
+
2. **Find your Team ID:**
361
+
- Go to [Membership Details](https://developer.apple.com/account#MembershipDetailsCard)
362
+
- Copy the Team ID (10-character alphanumeric string)
363
+
- Set as `MACOS_NOTARIZE_TEAM_ID`
364
+
365
+
3. **Find the certificate names:**
366
+
- Open Keychain Access and look under "My Certificates"
367
+
- The names will be like:
368
+
- `Developer ID Application: Your Name (TEAMID)` → `MACOS_SIGN_APPLICATION`
369
+
- `Developer ID Installer: Your Name (TEAMID)` → `MACOS_SIGN_INSTALLER`
370
+
- You can also list them with: `security find-identity -v -p codesigning`
371
+
372
+
4. **Export certificates to P12:**
373
+
```bash
374
+
# Export each certificate from Keychain Access:
375
+
# - Right-click certificate → Export
376
+
# - Choose .p12 format
377
+
# - Set a strong password (will be MACOS_CERTIFICATE_PASSWORD)
378
+
379
+
# If you have both in separate .p12 files, you can import them together
380
+
# or export them together from Keychain Access by selecting both
381
+
382
+
# Base64-encode for GitHub secrets:
383
+
base64 -i certificates.p12 | pbcopy
384
+
# Paste as MACOS_CERTIFICATE_P12
385
+
```
386
+
387
+
5. **Create app-specific password for notarization:**
388
+
- Go to [appleid.apple.com](https://appleid.apple.com/) → Sign-In and Security → App-Specific Passwords
389
+
- Generate a new password with a descriptive name (e.g., "GitHub Actions Notarization")
390
+
- Copy the generated password → `MACOS_NOTARIZE_PASSWORD`
391
+
- Use your Apple ID email → `MACOS_NOTARIZE_APPLE_ID`
392
+
393
+
#### Testing Locally
394
+
395
+
To test signing locally before configuring GitHub secrets:
396
+
397
+
```bash
398
+
# Set environment variables
399
+
export MACOS_SIGN_APPLICATION="Developer ID Application: Your Name (TEAMID)"
400
+
export MACOS_SIGN_INSTALLER="Developer ID Installer: Your Name (TEAMID)"
0 commit comments