How to access a secure endpoint with basic auth?
From ws02 esb, I want to access a service at an http endpoint which is secure with basic authentication.
I guess I have to used the PropertyMediator (with user/password) before the SendMediator but I don't know which properties I have to set. Any ideas where to look at?
- Login or register to post comments
- Printer friendly version
- 369 reads










Re: any update?
I'm tackling a similar problem with an ESB proxy service trying to access an existing service that is secured with HTTP basic authentication.
Any pointers on how to configure HTTP username/password tokens with the SendMediator?
We do not have a BasicAuth
We do not have a BasicAuth mediator.. Yet! But supporting basic auth is a trivial task, and you can do something like below to achieve this:
You basically set a transport header "Authorization" and set it to the required text for BasicAuth (http://en.wikipedia.org/wiki/Basic_authentication_scheme)
asankha
Possible fault with web sequence editor?
Thank you Asankha, my proxy is passing the Authorization header now and everything appears to be working.
One thing I discovered though was that passing groovy script into the Extension -> Script mediator in the web-based sequence editor does not allow me save when I'm done. Instead, it produces a browser/client-based javascript error when I click the Save button citing "mediatornode.removeAttribute is not a function (line 372)" in /extensions/core/js/sequences.js.
This is the js code in question:
function clearnodepositions(mediatornode) {
if (mediatornode.nodeType != 3) {
mediatornode.removeAttribute("esb_med_pos");
var med_children = mediatornode.childNodes;
for (var i = 0; i < med_children.length; i++) {
clearnodepositions(med_children[i]);
}
}
}
Creating the XML sequence configuration directly from the Manage -> Configuration function works perfectly however.
Is this an editor bug?
Thanks William for letting
Thanks William for letting us know, Yes, it seems like a UI bug, and we will rectify and fix this issue soon
asankha