过程如何验证并在同一主机上与另一个进程进行安全通信 [英] How can a process authenticate and communicate securely with another process on the same host

查看:197
本文介绍了过程如何验证并在同一主机上与另一个进程进行安全通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是想通过SSL与Java RMI要做到这一点,但后来我发现,SSL证书将提供主机级别的身份验证和不处理级别的身份验证。

I was trying to do this with Java RMI over SSL, but later I discovered that SSL certificates will provide host level authentication and NOT process level authentication.

另外,我在配置被存储密钥库的密码;所以证书可以由另一个攻击过程中使用,它可以得到验证。

Also, I was storing the keystore's password in configuration; so the certificates can be used by another attacker process and it can get authenticate.

推荐答案

用于SSL / TLS的X.509证书可能被用于识别的东西比一个主机名其他人(这已经是典型的客户端证书完成)。

An X.509 certificate used for SSL/TLS could potentially be used to identify something else than a host name (this is already typically done for client certificates).

有两种类型的验证的建立SSL / TLS连接到服务器时所涉及:

There are two types of verification involved when establishing an SSL/TLS connection to a server:


  • 证书验证本身。此验证,如RFC 3280 / RFC 5280中描述的证书是在使用时信任且有效用于所需的目的,一般用PKI

  • 主机名验证:一旦信任证书是真实的,客户端会检查它是,它正在寻找服务器。这是具体的协议(如RFC 2818,3.1节HTTPS),但已被概括为在RFC 6125.大多数协议(这类似于检查对护照的图片在你面前的名称相匹配,而不是只接受任何有效的护照。)

在默认情况下,除非你添加的东西做Java的的SSLSocket ■不要执行第二步。 (在Java 7中,一些新的SSL参数让你信任管理器内这样做,但仅限于特定的协议。)

By default, Java's SSLSockets don't perform the second step unless you add something to do it. (In Java 7, some new SSL parameters allow you to do so within the trust manager, but only for specific protocols.)

什么你需要的是找到一种方法来定义如何识别你的其他应用程序和进程,用的东西比主机名称一样,这些命名惯例颁发证书,并有客户端应用程序检查。

What you'd need is to find a way to define how you want to identify your other applications and processes, using something else than the host name, issues certificates with these naming conventions, and have your client application check this.

您应该能够在 SSLSocketFactory的,返回插座中的每个方法,在使用前该工厂为你的RMI应用程序,如描述中实现自己的身份验证机制在这里: https://blogs.oracle.com/lmalventosa/entry/using_the_ssl_tls_bas​​ed1

You should be able to implement your own identity verification mechanism within anSSLSocketFactory, before returning the sockets in each method, an use that factory for your RMI application, as described here: https://blogs.oracle.com/lmalventosa/entry/using_the_ssl_tls_based1

这篇关于过程如何验证并在同一主机上与另一个进程进行安全通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆