Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 Superagent 直接访问 Bos HTTPS Rest API 会遇到 [ERR_TLS_CERT_ALTNAME_INVALID] 问题 #75

Open
jacobbubu opened this issue Oct 21, 2020 · 0 comments

Comments

@jacobbubu
Copy link

jacobbubu commented Oct 21, 2020

Hostname/IP does not match certificate's altnames: Host: bos.bj.baidubce.com. is not in the cert's altnames: DNS:*.bcebos.com, DNS:bcebos.com

必须显示地在 Superagent 中设置 disableTLSCerts() 才能解决。

我知道在官方的 SDK 中显示地忽略了 SSL 证书问题 (https://github.com/baidubce/bce-sdk-js/blob/master/src/http_client.js#L123)

我的问题是,这样还要 HTTPS 干什么?很容易被劫持。

在 HTTPS 是否考虑去掉百度自己的签名方式?这个方式即容易出错、难以调试也有额外的性能开销。

Update:

我发现,当 STS 服务使用 baidubce.com 域名而 BOS 使用 bcebos.com 时不会出现证书和域名不符的问题。但是如果都用 baidubce.com 域名则会报错。这是证书 altnames 申请的问题?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant