消息级别的 Web Service 安全性
Web Service 消息级别安全性(Web Service 安全性或 WS-Security)是 Web Service 应用程序的安全性服务质量 (QoS)。WS-Security 标准和概要文件描述了如何为 Web Service 环境中交换的 SOAP 消息提供安全和保护。
WS-Security 作为一个 Liberty 功能部件提供。Liberty 中所提供的 WS-Security 运行时基于 Apache CXF 开放式源代码服务框架。Liberty 中的 WS-Security 功能部件受到 Apache CXF 框架的功能部件和功能的限制。必须通过启用 wsSecurity-1.1 功能部件来显式地启用 WS-Security。请确保您还将 appSecurity-2.0、servlet-3.0(或 servlet-3.1)和 jaxws-2.2 功能部件以及其他必需的 Liberty 功能部件添加至 Liberty 的 server.xml 文件。
使用 Web Service 应用程序的 WSDL 文件中的 WS-SecurityPolicy 来配置 WS-Security。要使用 WS-Security 来保护 Web Service 应用程序,JAX-WS 应用程序必须包含一个具有嵌入式 WS-Security 策略的 WSDL 文件。在 wsdl:binding 和/或 wsdl:operation 部分,必须存在对于该嵌入式 WS-Security 策略的 PolicyReference。