Ability to configure SAN/CN validation for client certificates is missing
Los mantenedores suelen responder en 2 días
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
- go
- Área
- authentication, security
Línea de trabajo
Comienza en la sección vinculada de config/http_config.go, alrededor de las líneas 819-823, y lee la documentación de configuración HTTPS de Prometheus. Sigue cómo se configura la validación de certificados de cliente y determina después dónde deberían ubicarse una opción dns_name_regex y su comportamiento de coincidencia. Se considera terminado cuando las identidades de los certificados de cliente autorizados puedan restringirse mediante el patrón configurado, en lugar de aceptar cualquier certificado firmado por la CA.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Issue
Let's say I have a Prometheus server running, secured with TLS with a custom CA (that of my whole cluster).
Using the documentation at https://prometheus.io/docs/prometheus/latest/configuration/https/ I can specify that the server validates client certificates. However once that is configured, it will accept any certificate signed by the CA.
That is an issue because the safety levels of all the services that have certificates are not the same: some are more likely to be compromised than others.
And of course, it wouldn't be legitimate for some-random-maybe-compromised-service.example.com (even if we know it is that service thanks to the CA!) to access and export the Prometheus metrics.
Solving it
=> In order to avoid this, it should be possible not only to validate that the client certificate is signed by the CA, but that whoever it turns out to be thanks to that authentication is indeed authorized to connect to Prometheus.
Currently, the configuration does not seem to allow configuring that.
However, that also seems reasonably easy to enable:
It's just about adding the proper parameters here:
https://github.com/prometheus/common/blob/2f04d2ec94b96df44aa4f8a60ae9fb29d8512636/config/http_config.go#L819-L823
(Note however that in the article it tries to validate based on some connection data, whereas we just want to validate based on e.g. a regexp).
Implementation notes
I think it would be good to validate that by providing a dns_name_regex in the TLS configuration parameters, as that is both simple and very flexible (users can specify sets of services, wildcards, prefix/suffix factoring..., all while keeping the prometheus side of things very simple). Kafka has done the same for their mTLS configuration, where you can specify which role you get depending on regex.
- Lenguaje dominante
- Go
- Estrellas
- 297
- Forks
- 380
- Merge medio
- 3 d 15 h
- PR fusionados (30 d)
- 13
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de prometheus/common
-
🧭 PR Triage DashboardAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
prometheus/common#1023 ·
Los mantenedores suelen responder en 2 días
-
expfmt: OpenMetrics 1.0 output with a unit that is not a name suffix fails the whole scrape in PrometheusPosiblemente ocupada @itsmeasadali la tomó hace 40 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
prometheus/common#1005 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 52/100
prometheus/common#876 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Feature request: Add client_assertion field for oauth2 jwt-bearer grant typePosiblemente ocupada @alliasgher la tomó hace 218 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
prometheus/common#869 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
prometheus/common#858 ·
Los mantenedores suelen responder en 2 días
Todos los issues de prometheus/common
Issues similares
-
[Plugin] calendarAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
MUKE-coder/grit#228 ·
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
Chemaclass/agnostic-ai#3681 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
OSS TEST
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
seaweedfs/seaweed-block#268 ·
Los mantenedores suelen responder en 1 día