user2956699
user2956699

Reputation: 45

Mule ESB - http inbound-endpoint user authentication

How to setup user authentication (verification of username and password) fro Mule ESB http inbound-endpoint?

This http inbound-endpoint will be used for REST service.

Thank you.

Upvotes: 2

Views: 832

Answers (2)

Anirban Sen Chowdhary
Anirban Sen Chowdhary

Reputation: 8321

Mule can be configured with Spring security to provide basic authentication with username and password. The spring security can also be configured to provide role based support where multiple users involve .
Some example you can refer here to get more ideas on it :- http://confluex.com/blog/http-inbound-endpoint-basic-authentication/
and
http://www.javaroots.com/2013/06/how-to-secure-rest-services-in-mule-3.html
also
https://developer.mulesoft.com/docs/display/current/Configuring+the+Spring+Security+Manager

Upvotes: 0

Seba
Seba

Reputation: 2319

<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>
    ...

Upvotes: 2

Related Questions