【发布时间】:2015-06-30 17:20:14
【问题描述】:
我正在尝试使用 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>
【问题讨论】:
-
http-security-filter用于入站端点,而不是出站端点。 CAS 期望什么样的凭据?只是 Basic Auth 授权标头中的用户名和密码?还有什么? -
@DavidDossot CAS 首先需要用户名/密码才能启动身份验证过程。然后有一些交换票恰好完成验证。
-
您可以使用
https:outbound-endpoint上的同名属性传递用户名/密码。但这不会做“少数交换票”。
标签: authentication https mule cas outbound