【发布时间】:2015-06-26 08:21:46
【问题描述】:
我们正在尝试在 Weblogic 10.3.6 上部署的 web 服务上配置 ws-security:目的是仅在经过身份验证后才允许执行 ws。
因此,我们在默认 weblogic 领域中创建了一个用户(“虚拟”),并将凭据传达给开发此 web 服务客户端的人员。
他发布了一个由 SOAP-UI 运行的测试信封
<soapenv:Envelope xmlns:sch="http://com.webservices.amm.standalone.key.provider/schema.xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-2">
<wsse:Username>dummy</wsse:Username>
<wsse:Password Type="**http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest**"><!-- digested password --></wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"><!-- encoding type --></wsse:Nonce>
<wsu:Created>2015-06-24T14:42:48.749Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<sch:searchKeyReq>
<sch:KeyProviderInput>
<!--Here input attributes:-->
</sch:KeyProviderInput>
</sch:searchKeyReq>
</soapenv:Body>
</soapenv:Envelope>
哪个响应是
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body><SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">**SOAP-ENV:MustUnderstand**</faultcode>
<faultstring>MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood</faultstring>
</SOAP-ENV:Fault></S:Body></S:Envelope>
显然,我认为,它不依赖于 web 服务的 ws-policy 配置。
所以问题是:
1) 我们必须通过管理控制台或通过 weblogic @Policy 注释与我们在soapenv:Header 标记中看到的oasis 策略对应的weblogic 关联到我们的webservice 的策略>?
2) “虚拟”用户必须具有某些特定角色?
提前致谢
【问题讨论】:
标签: weblogic-10.x ws-security policy