简体   繁体   English

服务器及其密钥库之间的TLS身份验证

[英]TLS Authentication between Servers and their Keystores Trustores

Before I go to the main question, I do want to state my understanding on Keystore and TrustStores: 在讨论主要问题之前,我想表达一下我对Keystore和TrustStores的理解:

1) Keystore - Details of key (private key) using which I would do my authentication as a server 1)密钥库-密钥(私钥)的详细信息,我将使用该密钥进行服务器身份验证

2) Truststore - The list of root/interm CAs and other signed Certificates from different domains which I trust. 2)信任库-我信任的来自不同域的根/中间CA和其他已签名证书的列表。

I am trying to establish an inter-server authentication and data exchange mechanism. 我正在尝试建立服务器间的身份验证和数据交换机制。 All my servers has FQDN format as myserverX.mydomain.net where X is the index eg myserver1.mydomain.net . 我所有的服务器的FQDN格式为myserverX.mydomain.net ,其中X是索引,例如myserver1.mydomain.net If my understanding on keystore and truststore is correct, when myserver1 is requesting data from myserver2 , it's myserver1 who is client and myserver2 is server. 如果我的密钥库和信任的理解是正确的,当myserver1从请求数据myserver2 ,它的myserver1谁是客户端和myserver2是服务器。

In this way: 通过这种方式:

1) myserver1 needs to trust myserver2 so myserver2 public key certificate should be imported into the truststore in `myserver1'. 1) myserver1需要信任myserver2因此应将myserver2公钥证书导入到“ myserver1”中的信任库中。

2) The above will also be true when 'myserver1' is server and myserver2 is client - except now myserver1 public key certificate should be imported into myserver2 truststore. 2)当“ myserver1”是服务器且myserver2是客户端时,上述情况也将成立-除非现在应将myserver1公钥证书导入myserver2信任库中。

Am I actually getting things right here? 我真的在这里整理东西吗? Or is there any fundamental mistake I am making? 还是我犯了任何根本性的错误? My intention was to try it out with self-signed certificate, and then, get a proper root CA signed certificate for my servers. 我的目的是尝试使用自签名证书,然后为我的服务器获取正确的根CA签名证书。 But I would be grateful if someone can explain if I am making any wrong assumptions here. 但是,如果有人可以解释我在这里做任何错误的假设,我将不胜感激。

Note - I am going to use Java keytool and JKS-type keystore (with default symmetric key algo and size) and I will use either -certreq and -gencert or -selfcert to generate a self signed certificate for my test. 注意-我将使用Java keytool和JKS类型的密钥库(具有默认的对称密钥算法和大小),并且将使用-certreq and -gencert-selfcert为测试生成自签名证书。

You have it right but if you use CA-signed certificates the import step is not needed. 您拥有正确的权限,但如果使用CA签名的证书,则不需要导入步骤。 CAs are already trusted, by definition, and therefore so are the certificates they sign. 根据定义,CA已经是受信任的,因此它们所签名的证书也是如此。 So your test is pointless. 因此,您的测试毫无意义。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM