大网数据广告活动
服务器运维问答

AWS Cloud Map Certificate

· 52CE 我爱测

I really love AWS Cloud Map (Service Discovery in AWS). It integrates with the AWS DNS to make service discovery very simple. Just register an instance of a service and you can discover the service via normal DNS resolution. For …

问题原文

原帖链接 · hangonstack · CC BY-SA 4.0

I really love AWS Cloud Map (Service Discovery in AWS). It integrates with the AWS DNS to make service discovery very simple. Just register an instance of a service and you can discover the service via normal DNS resolution. For example curl http://hello-world.production would connect to a production instance of the hello-world service. Great.

My problem is that I want to secure my traffic between my microservices using HTTPS. However, how would I generate a certificate/key for something like hello-world.production? Is a private CA the only option? I know AWS has support for that but would I need to inject the root certificate for my private CA into all my micro-services? Ideally I would avoid running a private CA. If that's the best way, is there a way to ensure all my internal services have the CA's root cert?

Thanks!

已采纳解答

原帖链接 · garethTheRed · CC BY-SA 4.0

Yes. The CA in your case would have to be private.

If you think about it, I could also have a service called hello-world.production. As a public CA would be in the trust-anchor store of most/all clients, if a public CA issued a certificate to both you and I, clients connecting wouldn't know who they're connecting to. A public CA can only issue certificates to entities which are globally unique. Commercial CAs generally rely on the global uniqueness of DNS or email addresses (depending on certificate usage) for this.

Your private CA, on the other hand, will only be in the trust-anchor store of your clients, and it'll only issue certificates to your instance of hello-world.production. If your clients somehow try to connect to my instance, it will fail as I won't have a certificate issued by a private CA your clients trust.

There are many ways to distribute a certificate to a client's trust-anchor store:

  • Windows has Group Policy;
  • Add it to a Docker image;
  • Distribute with Microsoft SCCM;
  • Distribute with open source configuration management tools (Ansible/Puppet/Chef etc.);

How you distribute depends on your scenario.

If you don't want the trouble of running a private CA, you could consider a managed private CA. AWS, Digicert, Entrust and Sectigo provide this service at a cost.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-07-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。