如何在 Mule 的入站 CXF 服务中设置 WS-SecurityPolicy?

发布于 2024-09-02 19:16:13 字数 998 浏览 3 评论 0原文

在配置用于处理 UsernameToken 和签名的服务时,其设置如下:

<service name="serviceName">
  <inbound>
    <cxf:inbound-endpoint address="someUrl" protocolConnector="httpsConnector" >
      <cxf:inInterceptors>
        <spring:bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
        <spring:bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
        <spring:constructor-arg>
          <spring:map>
            <spring:entry key="action" value="UsernameToken Timestamp Signature" />
            <spring:entry key="passwordCallbackRef" value-ref="serverCallback" />
            <spring:entry key="signaturePropFile" value="wssecurity.properties" />
          </spring:map>
        </spring:constructor-arg>
        </spring:bean>
      </cxf:inInterceptors>
    </cxf:inbound-endpoint>
  </inbound>
</service>

但是如何创建允许哪些算法以及应该对消息的哪些部分进行签名的策略?

When configuring the service for handling UsernameToken and signatures, it's setup like this:

<service name="serviceName">
  <inbound>
    <cxf:inbound-endpoint address="someUrl" protocolConnector="httpsConnector" >
      <cxf:inInterceptors>
        <spring:bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
        <spring:bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
        <spring:constructor-arg>
          <spring:map>
            <spring:entry key="action" value="UsernameToken Timestamp Signature" />
            <spring:entry key="passwordCallbackRef" value-ref="serverCallback" />
            <spring:entry key="signaturePropFile" value="wssecurity.properties" />
          </spring:map>
        </spring:constructor-arg>
        </spring:bean>
      </cxf:inInterceptors>
    </cxf:inbound-endpoint>
  </inbound>
</service>

But how is it possible to create a policy of what algorithms that are allowed, and what parts of the message that should be signed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

救星 2024-09-09 19:16:13

你得去问骡子们。上次我检查过,他们还没有迁移到 CXF 2.2.x。如果它们在 2.2.x 上,您可以使用 CXF 中内置的 WS-SecPol 支持。

You'd have to ask the Mule folks. Last I checked, they hadn't moved to CXF 2.2.x yet. If they ARE on 2.2.x, you could use the WS-SecPol support built into CXF.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文