apache / apache/cloudstack

ca.framework.cert.management.custom.san and "cloudstack-setup-databases -i" force a single string which must be a hostname

未关闭
#11,848 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
no-issue-activity
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
32

描述

### problem

I need to add 127.0.0.1 to the certificate for $IP:9090/ and ca.framework.cert.management.custom.san is the way to do it, but the feature interprets the entry as a single string, such that the following value:
_cloudstack.internal, 127.0.0.1_

leads to this kind of alt name configuration:

_~# openssl s_client -connect 127.0.01:9090 /dev/null | openssl x509 -noout -text | grep DNS:
IP Address:192.168.0.123, DNS:**cloudstack.internal, 127.0.0.1**_

Note that "cloudstack.internal, 127.0.0.1" is a single string here, so the comma separation is not a thing as I assumed.

Replacing cloudstack.internal with 127.0.0.1 takes me one step further, in that 127.0.0.1 is added to the alt names, but is treated as a hostname, not an IP.

_~#openssl s_client -connect 127.0.01:9090 /dev/null | openssl x509 -noout -text | grep DNS:
IP Address:192.168.0.123, DNS:127.0.0.1_

To further aggravate me, even _cloudstack-setup-databases -i 127.0.0.1_ produces the same results, 127.0.0.1 is treated as hostname, not IP, just like the above.

### versions

4.21.0.0 KVM

### The steps to reproduce the bug

_No response_

### What to do about it?

_No response_

贡献指南

打开贡献指南

调研方向

首先在报告的 4.21.0.0 KVM 设置上,使用 ca.framework.cert.management.custom.san 和 cloudstack-setup-databases -i 127.0.0.1 重现证书行为。按照所示方式使用 openssl s_client 和 openssl x509 检查证书;当 SAN 值被正确解析、IP 地址表示为 IP 条目而不是主机名,且多个值被分别处理时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

领域
cloud, infrastructure, security
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。