0

我正在尝试使用 Mule 3.5.0 CE 将 xml 字符串发布到 CAS 后面的 REST 服务。我已经在出站端点上配置了 mule 安全管理器和 http 安全过滤器,但没有取得多大成功。mule 文档并没有太大帮助,我遇到了一些关于如何保护入站端点的帖子,但没有关于验证出站请求的内容。以前有没有人这样做过,甚至有可能吗?提前致谢。

<!-- CONNECTORS -->
<https:connector name="HttpsConnector">
    <service-overrides sessionHandler="org.mule.session.NullSessionHandler"/>
    <https:tls-server path="${truststore}" storePassword="password"/>
</https:connector>


<!-- ENDPOINTS -->
<https:endpoint name="PublishEndpoint" connector-ref="HttpsConnector"
    address="${my.url}" 
    method="POST" contentType="application/xml" exchange-pattern="request-response"
    keepAlive="true" />

<mule-ss:security-manager>
    <mule-ss:delegate-security-provider name="memory-provider" delegate-ref="authenticationManager" />
</mule-ss:security-manager>

<spring:beans>
    <ss:authentication-manager alias="authenticationManager">
        <ss:authentication-provider>
            <ss:user-service id="userService">
                <ss:user name="${user}" password="${pwd}" authorities="ROLE_USER" />
            </ss:user-service>
        </ss:authentication-provider>
    </ss:authentication-manager>
</spring:beans>

<!-- publish xml string to service -->
<flow name="PublishFlow">
    <vm:inbound-endpoint ref="ReportEndpoint" />
    <https:outbound-endpoint ref="PublishEndpoint">
        <mule-ss:http-security-filter realm="mule-realm" securityProviders="memory-provider"/>
    </https:outbound-endpoint>
</flow>
4

1 回答 1

0

The CAS security scheme is not directly implemented by the HTTP requester which actually in 3.5.0 does only support non-preemptive BASIC authentication.

The best shot you have is to roll back to http:oubound endpoints and create a custom dispatcher to take care of the authentication by java code.

于 2015-07-07T22:02:28.260 回答