HTTP Basic Authentication support
Does the WSO2 ESB provide HTTP basic authentication? If so, how? I have seen articles explaining how to support basic auth for clients of the ESB using a mediation, but how can you configure the ESB (as the web service client) to provide uid/pw to the web service that is being proxied? In our scenario clients will be authenticated using a different solution, we then need the ESB to present a uid/pw to the proxied web service. Essentially the ESB connects to the web service using a process id. Is this natively supported or do I need to create a custom mediation to support this?
- Login or register to post comments
- Printer friendly version
- 159 reads











Hi Kevin Adding basic auth
Hi Kevin
Adding basic auth to an outgoing http request simply is adding a transport header named "Authorization" as :
"Basic " + base64( + ":" + )
If this is a common scenario for you, we could very easily write a custom mediator which will do this easily. How do you want to pass the credentials?
asankha
Basic Auth support
Thanks. I understand the details of how to implement basic-auth, but was hoping it was natively supported. We will pursue creating the custom mediator for now. Ideally I was thinking there would some native support for basic-auth via maybe the property mediator, something like:
Seems like basic-auth support would be a commom requirement, so I will create an enhancement request in the JIRA
Hi Kevin I think a part of
Hi Kevin
I think a part of your message got lost since it was in XML.. you need to use the "Open Rich Editor" button when writing XML content - so that they are properly escaped.. sorry about this limitation on this site..
BTW, I fully agree that basic auth is useful to be available natively, and will work on completing the JIRA soon
asankha
I was suggesting adding
I was suggesting adding support via the property mediator, something like:
<syn:property name="BASIC_AUTH_USERID" value="userid" scope="axis2" />
<syn:property name="BASIC_AUTH_PASSWORD" value="password" scope="axis2" />
then the underlying transport logic would set the Authorization header based on the values set above.
or alternatively expanding the Address Endpoint definition to allow those properties to be set.