如果要使用不支持 TLS 的 Instant Messaging 客户机,仍可使用 SSL 代替 TLS 实现客户机到多路复用器的通信。如果将多路复用器配置为使用 SSL,则无法将 TLS 用于客户机到服务器的通信。多路复用器与服务器之间的所有通信都会以明文格式在不安全的传输中进行。
如果在多路复用器上建立传统 SSL,并且要使用 XMPP/HTTP 网关,则必须配置网关以直接与服务器而非多路复用器通信。网关不支持传统 SSL。
在多路复用器和 Instant Messenger 之间启用 SSL 需执行以下步骤:
安装证书。
要在多路复用器中启用 SSL,需请求一个证书。
本小节假定您要将 Sun Java System Web Server 或 Sun Java System Application Server 用作 Web 容器来请求证书。
多路复用器使用 NSS 来实现证书管理,因此可使用 NSS 实用程序来创建、管理和使用证书以及证书数据库。
在 Web 浏览器中,键入以下 URL 来启动 Web 容器的管理服务器:
http://hostname.domain-name:administration-port |
出现一个窗口,提示您输入用户名和密码。
键入安装 Web Server 和 Application Server 期间指定的管理用户名和密码。
出现“管理服务器”页面。
创建一个单独的 Web Server 或 Application Server 实例。
有关安装多个 Application Server 实例的更多信息,参见《Sun Java System Application Server Enterprise Edition 8.2 Installation Guide》。有关安装多个 Web Server 实例的信息,参见《Sun Java Communications Suite 5 Installation Guide》。
创建信任数据库以存储公钥和私钥,被称为密钥对文件。
密钥对文件用于 SSL 加密。
有关创建信任数据库的信息,参见《Sun Java System Application Server Enterprise Edition 8.2 管理指南》中的《Sun Java System Application Server Enterprise Edition 8.2 Administration Guide》中的第 9 章 “Configuring Security”(适用于 Application Server)和《Sun Java System Web Server 7.0 管理员指南》中的《Sun Java System Web Server 7.0 Administrator’s Guide》中的第 6 章 “Certificates and Keys”(适用于 Web Server)。
从 CA 处请求证书。
有关请求证书的更多信息,参见《Sun Java System Application Server Enterprise Edition 8.2 管理指南》中的《Sun Java System Application Server Enterprise Edition 8.2 Administration Guide》中的第 9 章 “Configuring Security”(适用于 Application Server)和《Sun Java System Web Server 7.0 管理员指南》中的《Sun Java System Web Server 7.0 Administrator’s Guide》中的第 6 章 “Certificates and Keys”(适用于 Web Server)。
从证书颁发机构处接收到已签署的服务器证书后,需安装证书并创建数据库以实现安全通信。
在 Web 浏览器中,键入以下 URL 启动管理服务器:
http://hostname.domain-name:administration-port |
出现一个窗口,提示您输入用户名和密码。
键入安装 Web Server 或 Application Server 期间指定的管理用户名和密码。
出现“管理服务器”页面。
安装服务器证书。
有关安装证书的更多信息,参见http://docs.sun.com 上的 Web Server 或 Application Server 产品文档
转至 Web Server 或 Application Server 的 /alias 目录。
将数据库文件从 /alias 目录复制到 Instant Messaging 服务器的 im-cfg-base 目录。
例如,在 Solaris 中:
cp https-serverid-hostname-cert8.db /etc/opt/SUNWiim/default/config/cert8.db |
cp https-serverid-hostname-key3.db /etc/opt/SUNWiim/default/config/key3.db |
cp secmod.db /etc/opt/SUNWiim/default/config/secmod.db |
在 Linux 中:
cp https-serverid-hostname-cert8.db /etc/opt/sun/im/default/config/cert8.db |
cp https-serverid-hostname-key3.db /etc/opt/sun/im/default/config/key3.db |
cp secmod.db /etc/opt/sun/im/default/config/secmod.db |
需允许多路复用器所使用的系统用户对 cert7.db、 key3.db 和 secmod.db 文件拥有读取权限。此外,如果创建了多个 Instant Messaging 实例,则 /default 目录的名称将有所不同,具体取决于实例。
有关 im-cfg-base 的默认位置,参见表 3–1。
转至多路复用器主机上的 im-cfg-base。
有关查找 im-cfg-base 的信息,参见Instant Messaging 服务器目录结构。
使用所选的文本编辑器创建名为 sslpassword.conf 的文件。
在 sslpassword.conf 中输入以下行:
Internal (Software) Token:password |
其中 password 为创建信任数据库时指定的密码。
保存并关闭 sslpassword.conf。
确保所有 Instant Messenger 最终用户都具有 sslpassword.conf 的拥有权和读取权限。
重新启动多路复用器。
验证 SSL 是否正常工作。
可通过多种方式完成此操作,如通过执行调用 Instant Messenger 的安全版本中的步骤。
以管理员身份登录 Web Server 或 Application Server。
删除请求证书时创建的服务器实例。
可为客户机到多路复用器的通信启用 SSL,具体方法为修改 iim.conf 中的参数,然后使用 Instant Messenger 客户机的安全版本来连接到多路复用器。
表 12–2 列出了 iim.conf 中用于在 Instant Messenger 和多路复用器之间启用 SSL 的参数。还列出了这些参数的说明和默认值。
表 12–2 Instant Messaging 多路复用器 SSL 参数
参数 |
默认值 |
说明 |
---|---|---|
iim_mux.usessl |
off |
如果此值设置为 on,则多路复用器在交换应用数据之前,要求它所接受的每一连接均进行 SSL 信号交换。 |
iim_mux.secconfigdir |
Solaris:/etc/opt/SUNWiim/default/config Linux:/etc/opt/sun/im/default/ config |
此目录包含密钥和证书数据库。通常包含安全模块数据库。此外,如果创建了多个 Instant Messaging 实例,则 /default 目录的名称将有所不同,具体取决于实例。有关更多信息,参见在单个 Instant Messaging 安装中创建多个实例。 |
iim_mux.keydbprefix |
(空字符串) |
此值包含密钥数据库文件名的前缀。密钥数据库文件名必须始终以 key3.db 结尾。 例如,如果密钥数据库包含前缀(例如 This-Database-key3.db ),则此参数的值为 This-Database。 |
iim_mux.certdbprefix |
(空字符串) |
此值包含证书数据库文件名的前缀。证书数据库文件名必须始终以 cert7.db 结尾。 例如,如果证书数据库包含前缀(如Secret-stuff-cert7.db),则此参数的值为 Secret-stuff。 |
iim_mux.secmodfile |
secmod.db |
此值包含安全模块文件的名称。 |
iim_mux.certnickname |
Multiplexor-Cert |
此值包含在安装证书时输入的证书名称。 证书名称区分大小写。 |
iim_mux.keystorepasswordfile |
sslpassword.conf |
此值包含具有密钥数据库密码的文件的相对路径和名称。此文件包含下列行: Internal (Software) Token:password 其中 password 是保护密钥数据库的密码。 |
打开 iim.conf。
有关查找和修改 iim.conf 的说明,参见iim.conf 文件语法。
将表 12–2 中的值添加到 iim.conf 中的多路复用器配置参数。
下面是一个包含多路复用器配置参数的 iim.conf 示例:
! IIM multiplexor configuration ! ============================= ! ! Multiplexor specific options ! IP address and listening port for the multiplexor. ! WARNING: If this value is changed, the port value of ’-server’ ! argument in the client’s im.html and im.jnlp files should ! also be changed to match this. iim_mux.listenport = "siroe.com:5222" ! The IM server and port the multiplexor talks to. iim_mux.serverport = "siroe.com:45222" ! Number of instances of the multiplexor. iim_mux.numinstances = "1" ! Maximum number of threads per instance iim_mux.maxthreads = "10" ! Maximum number of concurrent connections per multiplexor process iim_mux.maxsessions = "1000" iim_mux.usessl = "on" iim_mux.secconfigdir = "/etc/opt/SUNWiim/default/config" iim_mux.keydbprefix = "This-Database" iim_mux.certdbprefix = "Secret-stuff" iim_mux.secmodfile = "secmod.db" iim_mux.certnickname = "Multiplexor_Cert" iim_mux.keystorepasswordfile = "sslpassword.conf" |