feat: shell-free signing credentials and end-to-end encrypted OTA key vault (beta)
Summary
Makers without a shell can store their signing keys with Capgo. Both features are optional and labeled Beta in the UI.
Native build credentials (iOS and Android). The Builds page has a signing form that saves through a session route (PUT /build/credentials/session). The route needs app.update_settings and verified MFA when the user has enrolled it. Credentials are encrypted at rest with the existing backend envelope.
OTA private key vault, end-to-end encrypted. The customer encrypts the OTA private key on their own machine with a vault secret that is never sent to Capgo (AES-256-GCM, PBKDF2-SHA256 with at least 600k iterations, AAD bound to app ID and public-key fingerprint). Capgo stores ciphertext it cannot read. Any machine with an API key and the secret can reuse the key:
| Where | How |
|---|---|
| CLI | key vault push --generate-secret, status, pull, delete |
| Upload and CI | bundle upload --key-vault decrypts in memory and never writes the key to disk. The secret comes from CAPGO_KEY_VAULT_SECRET set by a secret store, --vault-secret-file or a hidden prompt, never inline on the command line |
| Hosted MCP | capgo_get_ota_key_vault shows status; bundle zip --for-upload --key-vault --json runs locally, followed by the signed upload |
| Local MCP and SDK | capgo_upload_bundle with useKeyVault, uploadBundle({ useKeyVault }), zipBundle({ forUpload, keyVault }) |
| Console | A Beta card on the Builds page encrypts the key in the browser |
Server-side protections:
app_ota_key_vaultis service-role only. Reading the envelope needsapp.upload_bundle. Writing needsapp.update_settings, plus verified MFA for console sessions that enrolled it.- Writes are compare-and-swap on a revision from a sequence that is never reused, checked inside the write itself rather than against a cached read. A conflict returns the current key's metadata.
- The server validates the envelope and the PKCS#1 public key with canonical DER parsing. Clients check the RSA private parameters and that the key matches
CapacitorUpdater.publicKey. - Audit rows hold the fingerprint and revision only. The vault row follows its app through transfers. The same migration drops the org cascade on
app_build_credentialsthat could delete a transferred app's credentials.
The architecture, trust boundary (the browser path trusts code that Capgo serves; the CLI path doesn't) and next steps are in docs/customer-key-custody.md.
Test plan
tests/ota-key-vault.test.ts(integration) covers the permission matrix, ciphertext-only storage and audit, revision conflicts including after a delete and recreate, the session route and cross-organization denial.tests/ota-key-vault.unit.test.tschecks that the backend and client fingerprints match, and covers malformed or weak envelopes and public keys.cli/test/test-key-vault.mjscovers the round trip, tampering, wrong secret and wrong app, invalid private keys,--key-vaultoption conflicts, and the symlink-safe pull.- Build credentials unit (30) and integration suites, plus the MCP output schema tests.
- Typecheck for the CLI, backend and frontend, lint, and dead-code checks all pass.
Screenshots
Captured by the CI visual diff on 8a664e8 at 1280Ć720, demo app, Builds page with no builds.
Before: base revision, no signing or vault cards.

After: the Build signing credentials card (Beta), expanded for iOS, with the native bundle identifier field and the hint that an empty password means a passwordless certificate.

After: the OTA encryption key vault card (Beta) with a stored key (revision and fingerprint), the browser-encryption form, Generate, Replace and Delete.

Checklist
- Architecture in
docs/customer-key-custody.md, updated to describe what is implemented. - Native credential upload from the Builds page, labeled Beta.
- Optional, end-to-end encrypted OTA key vault in the CLI, API, MCP, SDK and console, labeled Beta.
- Reviewed authorization and secret handling against
docs/agent-security-regressions.md. - No customer data in code, tests or this PR.
- Real before and after screenshots from the CI visual diff.
š¤ Generated with Claude Code
Summary by CodeRabbit
- New Features
- Added beta iOS and Android signing-credential management on the builds page, with authenticated uploads and provisioning-profile validation.
- Added an optional OTA private-key vault with browser-side encryption, revision and fingerprint details, and controls to save, replace, or delete keys.
- Added CLI commands to push, pull, check, and delete vault keys. CLI and SDK uploads, upload-ready archives, and MCP uploads can use a vault key for signing.
- Added an MCP tool to retrieve vault status without exposing the private key or vault secret.
- Documentation
- Added guidance on credential handling, vault workflows, secret recovery limits, signing, and CLI usage.