Posted: Fri Oct 16, 2009 10:21 am Post subject: Basic Authorization with SSL and Proxy
Acolyte
Joined: 24 Aug 2007 Posts: 70
I have been digging around to make sure that I'm doing this correctly but haven't found anything definitive. Here is my scenario:
MQInput -> Compute -> HTTPRequest
From the broker I need to go through a proxy server to get to an SSL-Secured site that has Basic Authorization enabled.
This is what I believe is proper:
Code:
SET OutputLocalEnvironment.Destination.HTTP.ProxyURL =
TRIM(COALESCE(ProxyURL, ''));
DECLARE CRLF CHAR CAST(X'0D0A' AS CHAR CCSID 1208);
--ProxyAuthorization should be a UDP with a base64 encoded username and password like this base64(user:password)
SET OutputLocalEnvironment.Destination.HTTP.ProxyConnectHeaders =
'Proxy-Authorization: ' || ProxyAuthorization || CRLF || 'Proxy-Connection: Close' || CRLF;
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/x-www-form-urlencoded';
SET OutputRoot.HTTPRequestHeader."Authorization" = 'Basic ' || BasicAuthorization ;
(ProxyURL, ProxyAuthorization, BasicAuthorization are all UDPs that I've confirmed are correctly being set)
Should I be placing the Authorization header somewhere else? I'm getting the following while the broker is trying to set up the SSL connection:
Yeah, we're getting through the proxy alright but we appear to be failing at the endpoint. I have them looking at their logs to see if they can determine why their server appears to have closed the connection but I thought I would do my due diligence to ensure that I am handling the Basic Authentication properly in this scenario.
I know that the proxy stuff is correct for an SSL scenario and I know that the Basic Auth stuff works correctly in a non-SSL scenario. My experience in finding out that the proxy headers need to be handled differently for a SSL vs. a non-SSL scenario has led me to ponder whether the Basic Auth headers need to be send differently for obtaining an SSL connection through a proxy server.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum