How to Exposing secure rest/soap service in Mule, require best and simple approach -


in flow, have many http rest api call, have used key-store (as below) fine internal api calls. need expose rest/soap service external api. simple , best way secure mule api. i'm using mule 3.5.1 version.

<https:connector name="http_https" doc:name="http-https"     cookiespec="netscape" receivebacklog="0" receivebuffersize="0"     sendbuffersize="0" socketsolinger="0" validateconnections="false"     clientsotimeout="10000" serversotimeout="10000" enablecookies="true">     <https:tls-key-store path="cer/check.jks"         keypassword="abc" storepassword="abc" /> </https:connector>   <flow name="service" doc:name="service">     <https:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8085" doc:name="http" connector-ref="http_https" responsetransformer-refs="reponseproperty"/>     <byte-array-to-string-transformer doc:name="byte array string"/>     <logger message="***invoke****#[payload]" level="info" doc:name="logger"/>  <jersey:resources doc:name="rest">      <component class="com.services.callimpl"/>      <jersey:exception-mapper class="com.util.jerseyexceptionmapper"/> </jersey:resources>  <byte-array-to-string-transformer doc:name="byte array string"/> 

so external api calls, shouldn't interfere other mule services. in advance.

if want simple way, basic authentication there simple, based on transport layer, yes simple implement

reference :-http://confluex.com/blog/http-inbound-endpoint-basic-authentication/ ,

you can use oauth 2.0 securing service need validate token before client can access rest service refernce :- https://developer.mulesoft.com/docs/display/current/creating+an+oauth+2.0a+web+service+provider , http://ricston.com/blog/oauth-server-mule/
can refer :- https://developer.mulesoft.com/docs/display/current/mule+sts+oauth+2.0a+example+application

other options jwt(json web token) in mule api, need generate token , validate access service..

reference :- http://jwt.io/

but again here need lot of java coding generate token , validating it


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -