Document the Open Container Initiative pathway for offline package metadata

What does this MR do?

Offline instances often hold a private container registry but no way to copy directories safely. This adds a page that carries v3 package metadata through that registry as signed artifacts. Each instance reads data only after it passes a signature check at the offline mirror.

The page is package-metadata-oci.md, next to the Package Metadata Database page. That page gets a short section that links to it, so the 1,200-line page does not grow by nearly 400 lines. Linux package and Helm chart steps are tabs. The global navigation lives in another project, so a navigation entry needs a separate change there.

flowchart TD
  accTitle: Moving v3 data through an Open Container Initiative registry
  accDescr: Data is packaged and signed on the connected side, transferred, verified in quarantine at the offline mirror, promoted, and then consumed by a Linux package or Helm chart instance.
  A[Download v3 data] --> B[Package: one artifact per snapshot or delta]
  B --> C[Sign each artifact with your key]
  C --> D[Transfer across the boundary]
  D --> E[Push to quarantine prefix]
  E --> F{Signature verifies?}
  F -- yes --> G[Promote to pmdb prefix]
  F -- no --> H[Reject, transfer again]
  G --> I[Linux package: assemble directory and copy into place]
  G --> J[Helm chart: assemble, build image, pin digest]

What the page covers:

  • Package: a script pushes one artifact for each new snapshot, and one for each bundle of new deltas.
  • Sign and transfer: each artifact is signed with your key pair, then exported with its signature.
  • Verify and promote: artifacts land in a quarantine prefix, and only those that verify move to the prefix instances read.
  • Assemble: a script assembles a directory from the promoted artifacts and stops at a gap in the deltas. Both installation methods use it.
  • Linux package tab: the existing copy steps follow, with the assembled directory as the source.
  • Helm chart tab: an image built from that directory is mounted read-only on Sidekiq and referenced by digest. A tag does not refresh, because the node keeps its cached image. The image replaces the whole package_metadata mount, so other data such as cve_enrichment goes into the assembled directory before the build.
  • Check and repair: the checkpoint queries filter on version_format: :v3. The record of exported tags stays on the connected side until every artifact is promoted, so a lost bundle can be exported again. If that record is lost, a rebuild step lists the registry tags that verify with the signing key.
  • Prerequisites: an Ultimate license, or Premium with the dependency firewall add-on, which the sync needs to run, and a GitLab version that reads v3 for each dataset: 19.4 for licenses, and 19.6 with the sync_v3_advisories flag for advisories.

This page has no diagram yet, so the diagram follows the style guide's Mermaid rules.

How it was checked

Each step ran on test VMs, using real v3 licenses data.

  • Linux package, GitLab 19.5.5 on Fedora 43: a second packaging run pushed only the new deltas. The signature crossed with --recursive and failed with no signatures found without it. A wrong key and a changed file both stayed in quarantine. After assembling and copying, the checkpoints matched the newest tags, and a later delta advanced them. A missing delta made the assemble script stop.
  • Helm chart, GitLab 19.5.6 with chart 10.5.7 on Kubernetes 1.37.2: the image mounted read-only and the checkpoints matched. A new digest in the values and helm upgrade advanced the checkpoint. A reused tag did not.
  • A directory Sidekiq could not read imported zero rows and logged nothing, and find ! -readable listed it.
  • Repair and rebuild, with synthetic data: a missing delta stopped the assemble script, and a re-export from the kept record promoted it. The rebuild listed only the tags signed with the signing key, and left out an unsigned tag and one signed with another key.

Limits:

  • The Helm refresh used one synthetic delta, because the service had no newer real one.
  • The mirror ran over plain HTTP. A mirror with TLS was not tested.
  • Malware advisories were packaged, signed and promoted with synthetic data, not downloaded. GitLab 19.5 reads advisories as v2.
  • The signing step uses a signing configuration with no transparency log service, which is the form cosign recommends. The runs above used the older --tlog-upload=false flags. cosign 3.1.4 accepts the new form (checked on a test install), and a later run pushed and verified a signature to a registry with it. A rerun of the script pushes and signs only the local files whose tags are missing or unsigned.

Related to #642401

Author's checklist

An AI coding assistant wrote this change and ran the checks above on test VMs.

Edited by Andrew Dunn

Merge request reports

Loading
Loading