Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Allow mutual TLS with registry with redirects to the object storage

Abierto
#1,999 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
aws, go, helm

Línea de trabajo

Comienza rastreando la extracción del chart OCI de source-controller cuando .spec.certSecretRef proporciona una CA y, a continuación, compara su gestión de certificados con internal/tlsutil/tls.go de Helm alrededor de las líneas 112-116. Reproduce la redirección a S3 usando la configuración de registro proporcionada y define como terminado que la extracción a través de la redirección tenga éxito, con el comportamiento de los certificados documentado y probado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Go
Estrellas
283
Forks
258
Merge medio
1 d 17 h
PR fusionados (30 d)
15

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fluxcd/source-controller

Todos los issues de fluxcd/source-controller

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.