Allow mutual TLS with registry with redirects to the object storage
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
Direzione di ricerca
Inizia tracciando il pull del chart OCI di source-controller quando .spec.certSecretRef fornisce una CA, quindi confronta la gestione dei certificati con internal/tlsutil/tls.go di Helm intorno alle righe 112-116. Riproduci il reindirizzamento a S3 usando la configurazione del registry fornita e considera completato il lavoro quando il pull attraverso il reindirizzamento ha esito positivo, con il comportamento dei certificati documentato e testato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment:
- OCI registry with redirect on pull configured
- source-controller
v1.7.4
Problem statement
Registry with "redirect on pull" here means that when getting the image registry will not give the client a blob directly, but rather a 302 code with a location if this blob on the object storage.
The concrete case is local registry certificate signed by the internal CA which gets passed to in .spec.certSecretRef of a HelmRepository (repositiry type is oci). When chart image gets pulled registry redirects the client (source-controlelr) to the AWS S3 server with a proper trusted PKI certificate.
This results in a situation where source-controller checks the validity of the certificate of the object storage server using the CA certificate provided earlier in the HelmRelease object. This will obviously fail:
chart pull error: failed to download chart for remote reference: failed
to get ''oci://registry/charts/kcm-templates:1.1.0-rc5'':
failed to copy: httpReadSeeker: failed open: failed to do request: Get "https://s3.eu-west-3.amazonaws.com/docker/registry/v2/blobs/sha256/f6/f631: tls: failed to verify certificate: x509: certificate is valid for *.s3.eu-west-3.amazonaws.com,
s3.eu-west-3.amazonaws.com, *.s3-eu-west-3.amazonaws.com, s3-eu-west-3.amazonaws.com,
This pull works with helm cli for example, because helm adds custom certificate to the pool of the system certs and checks the validity against the pool and not just a single CA certificate (ref: https://github.com/helm/helm/blob/main/internal/tlsutil/tls.go#L112-L116).
The request
Flux should allow that types of environments, either by adding system certificate pool implicitly (as in case of helm) or with an additional flag to enable it.
As I understood the current behavior (single certificate check) is to address certain security-related scenarios. But in the previously described environment it's becomes inconvenient and to overcome this it's required to mount custom certificate directly to the source-controller pod, which will add it to the certificate pool by go runtime.
- Lingua principale
- Go
- Stelle
- 283
- Fork
- 252
- Merge medio
- 1h 6m
- PR unite (30g)
- 12
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fluxcd/source-controller
-
area/docs good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
fluxcd/source-controller#666 · 2 commenti ·
-
area/git bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
fluxcd/source-controller#2165 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
fluxcd/source-controller#2150 ·
-
GitRepository `.spec.ref.commit` + `.spec.ref.branch` does not shallow clone, contrary to the docs Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
fluxcd/source-controller#2146 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
fluxcd/source-controller#2136 · 1 commento ·
Tutte le issue di fluxcd/source-controller
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
acceptance-tests phase-coding schema-coverage testing triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100