Skip to content

Signing

Supply-chain signing for release artifacts and images. Two concerns kept separate on purpose: the operational switch (signing.enabled / signing.auto_provision — may StageFreight sign, and may it provision an identity) and the trust profiles (signing.profiles — an id→profile map defining what class of key each profile requires). A publish target references a profile via signing_profile: <id>.

Signing with Vault or OpenBao

A kms profile with a provider signs through Vault/OpenBao's transit engine, logging in with the CI job's OIDC token: no stored secret. The config names refs; CI variables bind them, so one config serves every group:

secrets:
  providers:
    openbao: { kind: vault }
signing:
  profiles:
    release:
      requires: [kms]
      kms: { ref: tenant, provider: openbao, role: cosign }
      enforce: true
CI variable Example Sets
SF_SECRETS_OPENBAO_ADDR https://secrets.example.com the provider's address
SF_SECRETS_OPENBAO_LOGIN gitlab-ci the JWT auth mount (default jwt)
SF_SECRETS_OPENBAO_ROLE_COSIGN stagefreight-cosign-acme the role for role: cosign
SF_KMS_TENANT hashivault://acme the key for ref: tenant
TRANSIT_SECRET_ENGINE_PATH cosign-signer the transit mount the key lives in

OPENBAO is the provider id and COSIGN/TENANT the refs, upper-cased with - and . as _. With enforce: true a signing failure fails publish; without it the image ships and the failure is reported.

A release signed this way attaches the key's public half as cosign.pub, with its fingerprint and the verify commands in the release notes. transparency_log: true on a profile records its signatures in public Rekor.

On the provider:

  • A transit key per tenant in the mount TRANSIT_SECRET_ENGINE_PATH names (an ECDSA key, non-exportable).
  • A policy granting sign on that key, and read on it for the public half. cosign signs at sign/<key>/<hash-algorithm>, so grant both paths; sign/<key> alone is refused with a 403:
path "cosign-signer/sign/acme"   { capabilities = ["create", "update"] }
path "cosign-signer/sign/acme/+" { capabilities = ["create", "update"] }
path "cosign-signer/keys/acme"   { capabilities = ["read"] }
  • A JWT role on the login mount, trusting your forge as the issuer, binding the audience stagefreight (the rendered pipeline mints the job's token with it) and the projects that may sign, e.g. project_path: "acme/*", with only that policy.

signing

Operational signing configuration (distinct from signing.profiles). Governs whether StageFreight may sign, whether it may create/manage a Tier-0 software identity on your behalf, and where that identity persists. enabled and auto_provision are deliberately separate — "signing is encouraged" and "the system minted an identity for me" are not the same thing.

signing:
  enabled: false   # nil/true = signing allowed; false = all signing off
  auto_provision: false   # explicit consent to create/manage a Tier-0 identity
  state_dir:   # where persistent signing material lives
    type: <string>   # "volume" | "host_path"
    name: <string>   # volume name (type: volume)
    path: <string>   # absolute path (type: host_path)
  profiles:   # id→profile map
    <id>:   # entry key = the unique id
      requires: [<string>]   # trust class(es); v1 enforces exactly one · one of: hardware, key, kms, oidc · required
      key:   # Class reference blocks — at most one, matching the declared class.
        ref: <string>   # required
      oidc:
        issuer: <string>
        identity: <string>
      kms:
        ref: <string>   # required
        provider: <string>
        role: <string>
      pkcs11:   # hardware transport selector (optional; absent = FIDO2 --sk)
        ref: <string>   # required
      physical_presence: <string>   # Assurance properties (hardware-class ONLY; enforced in validation). The value is the keyword…
      non_exportable: <string>
      transparency_log: false   # TransparencyLog overrides the per-class default (on for oidc, off otherwise).
      attestation: false   # Attestation also emits a provenance attestation alongside the signature.
      enforce: false   # Enforce makes a signing failure fatal to the phase (default: best-effort — warn + record a failed…
      allow_fallback: false   # AllowFallback permits an explicitly-configured signer that fails to resolve to fall back to the…
  default_profile: <string>   # DefaultProfile is the profile a target signs under when it names no signing_profile of its own —…

enabled: false disables ALL signing regardless of profiles/keys. auto_provision: true requires a state_dir — with no durable storage an ephemeral key would break trust continuity every run. With auto_provision: false (default), StageFreight never creates key material — it signs only with an explicit COSIGN_KEY/profile. Opinionated always-on belongs in a runner/distribution config, not core. The Tier-0 identity is created once and NEVER silently regenerated: drift, partial state, or an orphan key is fatal. The state_dir must live outside the repository (a key there could be committed, baked into an image, or published).