我正在尝试使用 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>