Skip to content

daemon: sign attestations on submit - #259

Open
aparcar wants to merge 1 commit into
kpcyrd:mainfrom
aparcar:sign-attestations-on-submit
Open

daemon: sign attestations on submit#259
aparcar wants to merge 1 commit into
kpcyrd:mainfrom
aparcar:sign-attestations-on-submit

Conversation

@aparcar

@aparcar aparcar commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

The daemon only signed attestations on the first "attestation request" instead of on receive. Instead, move the daemon signing to the point where a attestation is submitted from the worker.

For the time being, the "sign on request" is left in place to allow an easier migration, it should be eventually removed.

The daemon only signed attestations on the first "attestation request" instead
of on receive. Instead, move the daemon signing to the point where a
attestation is submitted from the worker.

For the time being, the "sign on request" is left in place to allow an easier
migration, it should be eventually removed.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Copilot AI lite review requested due to automatic review settings August 21, 2026 16:53
@aparcar
aparcar marked this pull request as ready for review August 21, 2026 16:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the daemon’s attestation flow so that (when enabled) attestations are signed at the time a worker submits a rebuild report, instead of only being signed lazily when the attestation is later fetched.

Changes:

  • Add the daemon private key extractor to submit_rebuild_report and sign received attestations on submission when transparently_sign_attestations is enabled.
  • Keep the legacy “sign on GET” logic in get_build_artifact_attestation for a migration period, with updated TODO commentary.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 171 to 175
if let Some(attestation) = &artifact_report.attestation {
Some(if is_zstd_compressed(attestation) {
let bytes = if is_zstd_compressed(attestation) {
attestation.clone()
} else {
zstd_compress(&attestation[..]).await.map_err(Error::from)?
Comment on lines +178 to +182
let bytes = if cfg.transparently_sign_attestations {
attestation::compressed_attestation_sign_if_necessary(
bytes,
&private_key,
)
Comment on lines +178 to +184
let bytes = if cfg.transparently_sign_attestations {
attestation::compressed_attestation_sign_if_necessary(
bytes,
&private_key,
)
.await?
.0
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.

2 participants