Bound images are verified with the old deployment's policy

Ouverte
#2,652 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 2 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
45/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
rust

Piste de recherche

Start in crates/lib/src/boundimage.rs (lines 41-59) to see how bound images are read from the new deployment, then read crates/lib/src/podstorage.rs (lines 459-475) where the pull happens. Trace how the policy path is resolved there and why it still points at the booted system's /etc/containers/policy.json rather than the new deployment's. Done means the pull is given the new deployment's policy (as podman pull --signature-policy allows) and a test exercises an upgrade that adds and permits a bound image.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

If you define a /etc/containers/policy.json in a bootc image, and update this policy in a new image, bootc upgrade will reads the bound images from the new deployment:

https://github.com/bootc-dev/bootc/blob/7cde7bbe233ee45a40cff3d89d4f42b68a258d46/crates/lib/src/boundimage.rs#L41-L59

but pulls them with the booted system's /etc/containers/policy.json:

https://github.com/bootc-dev/bootc/blob/7cde7bbe233ee45a40cff3d89d4f42b68a258d46/crates/lib/src/podstorage.rs#L459-L475

So an image that adds a bound image and allows it in its own policy.json can't be upgraded to:

Source image rejected: Running image docker://ghcr.io/example/app@sha256:… is rejected by policy.

Expected: use the new deployment's policy (podman pull --signature-policy).

bootc 1.17.1, same code in v1.17.4.

Langage dominant
Rust
Étoiles
2.3k
Forks
230
Merge moyen
2 j 11 h
PR mergées (30 j)
42

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de bootc-dev/bootc

Toutes les issues de bootc-dev/bootc

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.