Ability to configure SAN/CN validation for client certificates is missing
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- go
调研方向
从链接的 config/http_config.go 部分(约第 819-823 行)开始,阅读 Prometheus HTTPS 配置文档。跟踪客户端证书验证的配置方式,然后确定 dns_name_regex 选项及其匹配行为应放在哪里。完成的标准是,可以通过配置的模式限制已授权客户端证书的身份,而不是接受所有由 CA 签名的证书。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Go
- 星标
- 297
- 派生
- 380
- 平均合并
- 3 天 15 小时
- 30 天内合并 PR
- 13
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
prometheus/common 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
prometheus/common#1023 ·
维护者通常 2 天内回复
-
expfmt: OpenMetrics 1.0 output with a unit that is not a name suffix fails the whole scrape in Prometheus可能已有人在做 @itsmeasadali 于 40 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 58/100
prometheus/common#1005 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 52/100
prometheus/common#876 · 1 条评论 ·
维护者通常 2 天内回复
-
Feature request: Add client_assertion field for oauth2 jwt-bearer grant type可能已有人在做 @alliasgher 于 218 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
prometheus/common#869 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
prometheus/common#858 ·
维护者通常 2 天内回复
查看 prometheus/common 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
txn2/mcp-data-platform#2728 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
blinklabs-io/dingo#6504 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
SocialGouv/iterion#3413 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 88/100
orion-belt-dev/orion-belt#181 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 79/100
kubesmarts/logic-operator#105 ·
维护者通常 1 天内回复