Trust the system certificate store for registries (corporate root CA, UnknownIssuer)

Aperta
#303 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
networking

Direzione di ricerca

Start with crates/kiri-image/src/registry.rs and inspect how ureq and rustls configure trusted roots; then trace the update check and Kiri Share clients to see where the same verifier is used. Compare the proposed system verifier and additional CA file options, and check existing tests for registry TLS behavior. Done means corporate roots are trusted for registry pulls and login, with the intended behavior verified for the update check and Kiri Share.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
What you're trying to do

In a company network the image registry (Artifactory) has a certificate issued by the company's own root CA. macOS trusts that root (it's in the System keychain), so browsers, curl and Podman work. With Kiri 0.2.1 (macOS 27.0.1, Apple silicon):

$ docker --context kiri pull registry.corp.example/postgres:17
network error: io: invalid peer certificate: UnknownIssuer

docker login to the same registry fails the same way, and so does Kiri's own update check (update check failed error="io: invalid peer certificate: UnknownIssuer").

The registry client is ureq + rustls with roots from webpki-roots (crates/kiri-image/src/registry.rs); Cargo.lock has no rustls-native-certs or rustls-platform-verifier. There's no setting or file for an extra CA, and the standard variables are ignored:

$ SSL_CERT_FILE=corp-root.pem SSL_CERT_DIR=. kiri raw pull registry.corp.example/postgres:17
kiri: network error: io: invalid peer certificate: UnknownIssuer

Putting the CA into the VM doesn't help, because pulls are made by kiri daemon on the Mac. Today the only way is podman pull … && podman save … | docker --context kiri load.

What you'd like Kiri to do

Any of these would cover it:

  1. Verify with rustls-platform-verifier (macOS keychain, Windows store, /etc/ssl on Linux), keeping webpki-roots as a fallback.
  2. Load extra roots from a file Kiri owns, e.g. ~/.kiri/certs/*.pem, and from SSL_CERT_FILE.
  3. A Settings → Network toggle: "Trust certificates from the system".

The same verifier would help the update check and Kiri Share too.

Would you like to build it?

No, just suggesting it

Lingua principale
Rust
Stelle
7.5k
Fork
329
Merge medio
7h 48m
PR unite (30g)
105

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di libracoder/kiri

Tutte le issue di libracoder/kiri

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.