Skip to content

containerz: add signed bundle transfer to Deploy RPC - #351

Open
sumitk31 wants to merge 4 commits into
openconfig:mainfrom
sumitk31:docker_cosign
Open

containerz: add signed bundle transfer to Deploy RPC#351
sumitk31 wants to merge 4 commits into
openconfig:mainfrom
sumitk31:docker_cosign

Conversation

@sumitk31

@sumitk31 sumitk31 commented Aug 3, 2026

Copy link
Copy Markdown

Summary

Extend the Containerz Deploy RPC to transfer an opaque signed bundle alongside the container image tarball. This enables offline/air-gapped image onboarding where the target verifies a signature before loading the image.

The proto intentionally does not name a specific signing tool (cosign, notary, etc.). It defines only what is transferred; how the target verifies the bundle remains implementation-specific.

Changes

  • signed_bundle_size on ImageTransfer
  • signed_bundle_content and SignedBundleTransferEnd on DeployRequest
  • SignedBundleTransferReady / SignedBundleTransferProgress on DeployResponse
  • gnoi_version bumped to 0.3.0

Deploy flow (when signed_bundle_size > 0)

There is one terminal success for the entire Deploy operation: ImageTransferSuccess. The signed bundle phase uses Ready / Progress / End messages only (no separate bundle success message). Failures at any stage are reported via image_transfer_error.

Phases

Phase Client → Server Server → Client
1. Image transfer ImageTransfer ImageTransferReady
content (chunks) ImageTransferProgress
ImageTransferEnd
2. Signed bundle transfer SignedBundleTransferReady
signed_bundle_content (chunks) SignedBundleTransferProgress
SignedBundleTransferEnd
3. Verify + load (server-side) ImageTransferSuccess or image_transfer_error

When signed_bundle_size = 0, behavior is unchanged (backward compatible): image transfer proceeds directly from ImageTransferEnd to verify/load and ImageTransferSuccess.

Call flow diagram

sequenceDiagram
    participant Client
    participant Server

    Note over Client,Server: Phase 1 — Image transfer
    Client->>Server: ImageTransfer (image_size, signed_bundle_size)
    Server->>Client: ImageTransferReady (chunk_size)
    loop Image chunks
        Client->>Server: content
        Server->>Client: ImageTransferProgress (bytes_received)
    end
    Client->>Server: ImageTransferEnd

    Note over Client,Server: Phase 2 — Signed bundle transfer
    Server->>Client: SignedBundleTransferReady (chunk_size)
    loop Signed bundle chunks
        Client->>Server: signed_bundle_content
        Server->>Client: SignedBundleTransferProgress (bytes_received)
    end
    Client->>Server: SignedBundleTransferEnd

    Note over Client,Server: Phase 3 — Verify + load (server-side)
    Server->>Server: Verify signed bundle against image
    Server->>Server: Load image into registry / plugin store
    alt Success
        Server->>Client: ImageTransferSuccess (name, tag, image_size)
    else Failure (verify or load)
        Server->>Client: image_transfer_error
    end
Loading

Motivation

  • Supply chain integrity — only signed images should be loaded on network devices
  • Air-gapped deployments — common on NOS platforms; registry-based verification is often unavailable
  • Portable gNOI contract — bundle transfer over the same Deploy stream, not side-channel file copies
  • Signing-tool agnosticsigned_bundle_* naming keeps the RPC opaque to the verifier implementation

Implementation notes

  • Go stubs regenerated for containerz (containerz.pb.go, containerz_grpc.pb.go)
  • Reference implementation updated in openconfig/containerz (client, server, cosign verifier)
  • Downstream NOS implementations choose the verifier (e.g. cosign); that detail is outside this proto scope

Test plan

  • Review proto naming and backward compatibility (signed_bundle_size = 0)
  • Regenerate Go stubs via regenerate-files.sh
  • Update Containerz reference client/server implementations

@google-cla

google-cla Bot commented Aug 3, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Extend DeployRequest to stream Sigstore cosign bundles alongside container
images for offline signature verification during image onboarding.

- Add cosign_bundle_size to ImageTransfer
- Add cosign_bundle_content and CosignBundleTransferEnd to DeployRequest
- Add CosignBundleTransferReady/Progress to DeployResponse
- Bump gnoi_version to 0.3.0
Address review feedback: keep the signing mechanism opaque in the
Deploy RPC by using signed_bundle_* field and message names instead of
cosign-specific naming.
@sumitk31 sumitk31 changed the title feat(containerz): add cosign bundle transfer to Deploy RPC containerz: add signed bundle transfer to Deploy RPC Aug 4, 2026
Run regenerate-files.sh (bazel 8.4.2) to update containerz.pb.go and
containerz_grpc.pb.go after signed_bundle_* proto rename.
@sumitk31
sumitk31 force-pushed the docker_cosign branch 2 times, most recently from 45b2757 to 472a38f Compare August 4, 2026 11:53
Match the protoc version stamp on upstream main for containerz stubs only, without bumping the repo-wide protobuf dependency.

@nburnwalcisco nburnwalcisco 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.

Testing if have permission to approve.

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