Bound images are verified with the old deployment's policy

Aberta
#2,652 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
rust

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Rust
Estrelas
2.3k
Forks
230
Merge médio
2d 11h
PRs com merge (30d)
42

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de bootc-dev/bootc

Todas as issues de bootc-dev/bootc

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.