简体   繁体   English

x509: 证书对 * 有效<rest-of-hostname> , 不是<bucket hostname></bucket></rest-of-hostname>

[英]x509: certificate is valid for *<rest-of-hostname>, not <bucket/hostname>

I am trying to upload a file to Amazon S3 bucket with Go SDK to a custom endpoint, but I am obtaining that error:我正在尝试使用 Go SDK 将文件上传到 Amazon S3 存储桶到自定义终端节点,但我收到了该错误:

RequestError: send request failed caused by: Put https://<bucket>.<custom-endpoint>/sample.tar.gz: x509: certificate is valid  for *<hostname>, not <bucket/hostname>

The certificate of the custom endpoint contains a wildcard at the beginning of the Common Name (*.), where I should infer that the wildcard would cover the request it is trying to perform.自定义端点的证书在通用名称 (*.) 的开头包含一个通配符,我应该在此推断通配符将涵盖它尝试执行的请求。

I have tried to upload the file with Python3 and boto3 package, obtaining a successfull result.我尝试使用 Python3 和 boto3 package 上传文件,获得了成功的结果。

Can you please advise about this?你能就此提出建议吗?

You could simply put the word "bucket" in front of the vpc endpoint.您可以简单地将“bucket”一词放在 vpc 端点的前面。 So, if your endpoint is:因此,如果您的端点是:

*.vpce-09f99bc99983c51-188851c5.s3.us-east-1.vpce.amazonaws.com *.vpce-09f99bc99983c51-188851c5.s3.us-east-1.vpce.amazonaws.com

in your config (for the EndpointResolver) you should use:在您的配置中(对于 EndpointResolver),您应该使用:

https://bucket.vpce-09f99bc99983c51-188851c5.s3.us-east-1.vpce.amazonaws.com https://bucket.vpce-09f99bc99983c51-188851c5.s3.us-east-1.vpce.amazonaws.com

Don't forget to to set URL, SigningRegion and Source when returning the EndpointResolverFunc返回 EndpointResolverFunc 时不要忘记设置 URL、SigningRegion 和 Source

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS Aurora PostgreSQL - x509:由未知机构签署的证书 - AWS Aurora PostgreSQL - x509: certificate signed by unknown authority AWS SES 错误:x509:由未知授权机构签署的证书 - AWS SES Error: x509: certificate signed by unknown authority x509:由未知机构使用 AWS IoT 签署的证书 - x509: certificate signed by unknown authority using AWS IoT IdentityServer4 在 AWS 共享 X509 证书 - IdentityServer4 shared X509 certificate at AWS AWS Batch、AWS ECR:Docker 运行给出错误 x509:证书由未知机构签名 - AWS Batch, AWS ECR : Docker run gives an error x509: certificate signed by unknown authority 获取 ssl.SSLError: [X509] 在 python 中找不到证书或 crl (_ssl.c:4062) - getting ssl.SSLError: [X509] no certificate or crl found (_ssl.c:4062) in python 无法通过AWS身份验证连接到Docker容器中的Hashicorp Vault-X509证书错误 - Can't connect to Hashicorp Vault in Docker container with AWS authentication- x509 certificate error Cloudfront证书和主机名:它们可以不同吗? - Cloudfront certificate and hostname: can they be different? 尝试向 websocket 发布响应时,AWS API 网关“x509:由未知机构签名的证书” - AWS API Gateway “x509: certificate signed by unknown authority” when trying to post a response to a websocket 如何配置基于x509客户端证书的身份验证以连接到基于AWS RDS的PostgreSQL - How to configure x509 client certificate based authentication to connect to AWS RDS based PostgreSQL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM