Store Submission & Catalog Signing
This guide covers packaging a validated worker as a multi-arch OCI Image Layout bundle, pushing it to an OCI registry (ghcr.io, Docker Hub, etc.), and signing catalog.signed.json as a JetPack platform operator.
1. Developer Workflow: Packaging & Pushing to OCI
Step 1: Separate Local DevEnv (app.dev.toml) & Validate ProdEnv (app.toml)
If your application is already published in SignedAppCatalog, keep developing locally using app.dev.toml (package.id = "com.dev.<slug>") and npm run install:local (jetpack install-local . --env dev). Never manually change [package].id inside app.toml to bypass APP_SPOOFING_DETECTED—keep your canonical catalog ID in app.toml and verify both environments before release:
jetpack env check ./workers/my-ocr-worker
jetpack validate ./workers/my-ocr-worker --env prod
# Equivalent daemon invocation:
jetpack-daemon --validate-manifest ./workers/my-ocr-worker/app.toml --env prodStep 2: Package an OCI Image Layout v1.0.0 Bundle
jetpack package ./workers/my-ocr-worker \
--out ./dist/my-ocr-worker-oci \
--oci-ref ghcr.io/your-org/my-ocr-worker:0.1.0 \
--env prod(Equivalent npm script inside scaffolded projects: npm run package, or daemon invocation: jetpack-daemon --package-app ./workers/my-ocr-worker --out ./dist/my-ocr-worker-oci --oci-ref ghcr.io/your-org/my-ocr-worker:0.1.0 --env prod. app.dev.toml, .env, and .env.* are automatically stripped from the bundle.)
Output bundle structure:
dist/my-ocr-worker-oci/
├── oci-layout # { "imageLayoutVersion": "1.0.0" }
├── index.json # Root entry with org.opencontainers.image.ref.name tag annotation
└── blobs/sha256/
├── <layer_sha256> # Deterministic .tar.gz with POSIX '/' paths, 0755 entrypoints
├── <config_sha256> # OCI image config JSON with rootfs.diff_ids & io.jetpack.app.* labels
├── <manifest_sha256>... # Per-platform OciImageManifest blobs
└── <index_sha256> # Multi-arch OciImageIndex blob (when multiple architectures are declared)The command prints manifest_sha256, the ready-to-run oras cp --from-oci-layout push command, oras manifest fetch --descriptor verification command, and a CatalogAppEntry JSON block to stdout.
Step 3: Push to ghcr.io with oras & Verify Digest
Ensure your GHCR package visibility is set to Public (JetPack Store installs pull anonymously via ghcr.io/token), then push using the exact tag printed by jetpack package:
oras cp --from-oci-layout ./dist/my-ocr-worker-oci:0.1.0 ghcr.io/your-org/my-ocr-worker:0.1.0
oras manifest fetch --descriptor ghcr.io/your-org/my-ocr-worker:0.1.0Important: Confirm that the remote
digestprinted byoras manifest fetch --descriptormatchesmanifest_sha256fromjetpack package. If your registry or push tool re-serializes the manifest or index, updatemanifest_sha256inCatalogAppEntryto match the exact remote digest before signing the catalog.
Verify end-to-end anonymous pull, SHA-256 verification, and Tar-Slip-safe unpacking from ghcr.io:
jetpack-daemon \
--oci-remote-smoke-test ghcr.io/your-org/my-ocr-worker:0.1.0 \
--expected-digest sha256:<64-hex>For CI/CD automation, see GitHub Actions Publishing to GHCR (examples/publish-app-ghcr.yml).
Populate category, icon_svg, and allowed_origins (for example ["https://studio.example.com"]) in the CatalogAppEntry JSON object.
2. Platform Operator Workflow: Key Hygiene & Catalog Signing
Secret Hygiene & .gitignore Protections
Never commit private signing keys, PEM files, or seed material to source control. The repository .gitignore blocks:
*.key
*.pem
*.secret
jetpack-root-signing*Verify ignore rules before storing local test keys:
git check-ignore -v jetpack-root-signing.key test.pem catalog.secretGenerating the Ed25519 Root Keypair
jetpack-daemon \
--generate-catalog-keypair \
--out-priv ~/.secrets/jetpack-root-signing.keySecurity guarantees:
- Atomic creation: Uses
OpenOptions::create_new(true)and refuses to overwrite existing files. - Strict file permissions: Sets
0600(rw-------) on macOS and Linux. On Windows, store the key under%USERPROFILE%\.secrets\with user-only NTFS ACLs (icacls <path> /inheritance:r /grant:r "%USERNAME%:F"). - Zero-exposure output: The private seed is zeroized in memory (
zeroize::Zeroizing) and never printed to stdout.
Rotating CATALOG_VERIFY_PUBKEY
- Store the production seed in an offline hardware vault (YubiKey, 1Password, HashiCorp Vault, or AWS KMS/Secrets Manager).
- Paste the printed
[u8; 32]array literal intoCATALOG_VERIFY_PUBKEYinsidecrates/jetpack-daemon/src/catalog.rs. - Re-sign
crates/jetpack-daemon/assets/catalog.signed.json. - Run
cargo test -p jetpack-daemon catalog::teststo confirmembedded_signed_catalog_verifies_against_platform_pubkeypasses, then rebuildmake release-daemon.
Signing catalog.signed.json
Sign locally using --key or in CI/CD via JETPACK_SIGNING_KEY:
# Option A: Sign using a local private seed file (64-char hex or raw 32-byte binary)
jetpack-daemon \
--sign-catalog crates/jetpack-daemon/assets/catalog.signed.json \
--key ~/.secrets/jetpack-root-signing.key
# Option B: Sign in CI/CD using an encrypted masked secret environment variable
export JETPACK_SIGNING_KEY="$(cat ~/.secrets/jetpack-root-signing.key)"
jetpack-daemon --sign-catalog crates/jetpack-daemon/assets/catalog.signed.json
unset JETPACK_SIGNING_KEY--sign-catalog parses the catalog against SignedAppCatalog (#[serde(deny_unknown_fields)]), computes the canonical Ed25519 signature over SignedAppCatalog::canonical_payload_bytes(), writes ed25519_signature atomically, and re-verifies the file from disk before exiting 0.
