Mule ESB - http入站端点用户身份验证

时间:2014-02-05 18:02:51

标签: mule esb

如何设置Mule ESB http入站端点的用户身份验证(验证用户名和密码)?

此http入站端点将用于REST服务。

谢谢。

2 个答案:

答案 0 :(得分:1)

<spring:beans>
   <security:authentication-manager alias="MyManager">
        <security:authentication-provider>
            <security:user-service id="UserService">
                <security:user name="someusername" password="somepassword" authorities="ROLE_ADMIN"/>
            </security:user-service>
        </security:authentication-provider>
   </security:authentication-manager> 
</spring:beans>

<spring-security:security-manager>
    <spring-security:delegate-security-provider delegate-ref="MyManager" name="InMemory"/>
</spring-security:security-manager>

<flow name="main">
    <http:inbound-endpoint address="http://localhost:8000/secured">
        <spring-security:http-security-filter realm="mule-realm" securityProviders="InMemory"/>
    </http:inbound-endpoint>
    ...

答案 1 :(得分:0)

可以使用 Spring security 配置Mule,以使用用户名密码提供基本身份验证。弹簧安全性还可以配置为在多个用户参与的情况下提供基于角色的支持 您可以在此处参考一些示例以获得更多想法: - http://confluex.com/blog/http-inbound-endpoint-basic-authentication/

http://www.javaroots.com/2013/06/how-to-secure-rest-services-in-mule-3.html

https://developer.mulesoft.com/docs/display/current/Configuring+the+Spring+Security+Manager