内容摘要:在前两部分中分别介绍了基于 JAX-WS 的 Web Services 的开发和可靠的消息传递。在这部分将介绍如何在 WAS6.1 中实现安全的 Web Services。安全的 Web Services 就是实现了 WS-Security 规范的 Web Services。WS-Security 通过对消息的加密和签名保证了消息的完整性和机密性;利用认证令牌实现了身份认证。
本文介绍的内容分为 3 个部分:
证书和密钥库的生成
加密和签名配置
认证令牌配置
证书和密钥库的生成
使用 WAS v6.1 JDK 自带的 keytool 工具来生成服务请求者和服务提供者的密钥库。具体过程如下:
<1> 生成密钥对存放密钥库文件
在 cmd 命令行中输入以下命令
keytool –genkey –v –alias bob –keypass bobkey –keystore bob.jks –storepass bobkey –storetype jks –dname “cn=bob,o=ibm”–keyalg “RSA”
这样生成 bob 的公私钥对存储在 bob.jks 中。同理利用下面的命令生成 carol 的公私钥对存储于 carol.jks 中
keytool –genkey –v –alias carol –keypass carolkey –keystore carol.jks –storepass carolkey –storetype jks –dname “cn=carol,o=ibm”–keyalg “RSA”
<2> 导出公钥证书
在 cmd 命令行中输入以下命令
keytool –export –v –alias bob –file bob.cert –keystore bob.jks –storepass bobkey –storetype jks
这样生成了 bob 的公钥证书 bob.cert,其中包含了 bob 的公钥。同理使用下面的命令生成 carol 的公钥证书
keytool –export –v –alias carol –file carol.cert –keystore carol.jks –storepass carolkey –storetype jks
<3> 将通信双方的公钥导入对方的信任密钥库
在 cmd 命令行中输入以下命令
来源:ibm 作者:龚豫鄂 王袁 希儿 责编:豆豆技术应用
- 利用WAS V6.1开发安全可靠的Web Services实现安全的消息传递(上)
- WebSphere Process Server 产品的运行时升级和移植策略及参考实现
- WebSphere Telecom Web Services Server 产品及解决方案介绍
- 增强 WebSphere Service Registry and Repository 的搜索功能
- 使用 WPS V6.1 新功能,灵活实现含人工任务的企业业务流程
- 改进 WebSphere ESB V6.1 中记录的消息的显示
- 测试SOA中基于Human Task的服务
- WebSphere Business Process Management V6.1 入门
- WebSphere Process Server V6 体系结构概述
- 从数据库调用WebSphere业务流程
- 利用WAS V6.1开发安全可靠的Web Services实现安全的消息传递(上)
- WebSphere Process Server 产品的运行时升级和移植策略及参考实现
- WebSphere Telecom Web Services Server 产品及解决方案介绍
- 增强 WebSphere Service Registry and Repository 的搜索功能
- 使用 WPS V6.1 新功能,灵活实现含人工任务的企业业务流程
- 改进 WebSphere ESB V6.1 中记录的消息的显示
- 测试SOA中基于Human Task的服务
- WebSphere Business Process Management V6.1 入门
- WebSphere Process Server V6 体系结构概述
- 从数据库调用WebSphere业务流程
- 利用WAS V6.1开发安全可靠的Web Services实现安全的消息传递(上)
- WebSphere Process Server 产品的运行时升级和移植策略及参考实现
- WebSphere Telecom Web Services Server 产品及解决方案介绍
- 增强 WebSphere Service Registry and Repository 的搜索功能
- 使用 WPS V6.1 新功能,灵活实现含人工任务的企业业务流程
- 改进 WebSphere ESB V6.1 中记录的消息的显示
- 测试SOA中基于Human Task的服务
- WebSphere Business Process Management V6.1 入门
- WebSphere Process Server V6 体系结构概述
- 从数据库调用WebSphere业务流程
- 利用WAS V6.1开发安全可靠的Web Services实现安全的消息传递(上)
- WebSphere Process Server 产品的运行时升级和移植策略及参考实现
- WebSphere Telecom Web Services Server 产品及解决方案介绍
- 增强 WebSphere Service Registry and Repository 的搜索功能
- 使用 WPS V6.1 新功能,灵活实现含人工任务的企业业务流程
- 改进 WebSphere ESB V6.1 中记录的消息的显示
- 测试SOA中基于Human Task的服务
- WebSphere Business Process Management V6.1 入门
- WebSphere Process Server V6 体系结构概述
- 从数据库调用WebSphere业务流程