Skip to content

docs(build, stapel): add a step-by-step guide to signing files inside the image - #468

Draft
reyreavman wants to merge 1 commit into
mainfrom
docs/build/sign-files-guide
Draft

reyreavman wants to merge 1 commit into
mainfrom
docs/build/sign-files-guide

Conversation

@reyreavman

Copy link
Copy Markdown
Collaborator

Summary

Adds a step-by-step guide to the sign directive of stapel images, which was documented only as a reference section in the stapel imports page: what to prepare in Vault, how to declare and verify signed files, how the key and the certificate reach CI, which commands need which of them, key rotation, moving signing out of a build stage, and troubleshooting.

What

  • New page usage/build/signing_files.html in EN and RU, listed in both documentation sidebars after "SBOM roles and workflow".
  • The guide states the Vault policy the signing role needs: update on <mount>/sign/<key>/sha2-256 and read on <mount>/keys/<key>.
  • The guide states that a local key file must be the encrypted delivery-kit PEM (ENCRYPTED DELIVERY-KIT PRIVATE KEY, empty passphrase); a plain OpenSSL key fails with decrypt: ....
  • The guide states that a build passing a key logs in to Vault at startup even when the sign stage is cached, so jobs that only use built images should pass the certificate alone.
  • werf.yaml reference: sign.before/sign.after are described as optional, signing at the end of the image when neither is set.
  • Stapel imports reference: links to the guide; its example now signs a generic archive; the Vault auth paragraph says the JWT, role and mount do not fall back to the authentication --sign-key uses, instead of "to the environment".

… the image

The sign directive was documented only as a reference section in the stapel
imports page, which left the setup around it to guesswork: what a Vault role
needs, how the key and the certificate reach the build, which commands need the
certificate and which the key, how to check the signature and how to move
signing out of a build stage. Add a guide that walks through it end to end,
link it from the reference, and describe before/after as optional in the
werf.yaml reference.

The guide also states two things the reference left out: a local key file has
to be the encrypted delivery-kit PEM, and a build that passes a key logs in to
Vault at startup even when the sign stage is cached. The reference example now
signs a generic archive, matching the guide.

Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant