Loading

Tuesday, October 2, 2007

How To - 10.1.3 OWSM: Send username/password in HTTP header of outbound message from gateway to the web service

OWSM gateway acts as a proxy in accepting requests, perform some processing on it, and then forwarding the request to the actual endpoint.
If the actual endpoint requires credential to be sent in HTTP header (Authorization header also known as HTTP Basic header), then gateway can be configured to send such credentials.

Edit details of the registered service through OWSM Control (UI) setting "Forward Credentials" option to true.

Where do the credentials to be sent come from?
Credentials that need to be sent by the gateway to the actual endpoint should be known to the gateway through either
a. "Extract Credentials" policy step (or)
b. Setting them in a custom policy step using the following API
import com.cfluent.pipelineengine.container.MessageContext;
MessageContext ctx = (MessageContext) messageContext;
ctx.setUnverifiedUserid(username);
ctx.setUnverifiedPassword(password);