cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Header Character Limitation - SOAP Receiver Adapter

nabendu_sen
Active Contributor
0 Kudos

Hi Experts,

We have a scenario where we are trying to send SOAP message over receiver SOAP adapter using Basic Authentication to MuleSoft service. Now we have 32 characters of UserID and 32 characters of Password. When I am using SOAP UI with "Authenticate pre-emptively", I can see below HTTP Authentication Header in the Request and receive successful Response:

Authorization: Basic NTA1YzAyMjk4ZTA4NGZlNGI1ODk1YjBjN2Y5YWQxMmM6YzJmNDk0NDQ1ZDhlNGQ3MkFBMjM3RTA1NTYxMUE5RDI=

But when we are sending through receiver SOAP adapter, HTTP Authentication Header is getting truncated and receiving "invalid_client: wrong client_id or client_secret" error. At MuleSoft server, we can see last few characters are truncated from Password.

I am not sure whether PI has any Character limitation for HTTP Authentication header. Please provide your suggestion.

PI Version: 7.11

Regards,

Nabendu.

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Nabendu,

Are you using dynamic configuration to build URL? If yes, the username/password has to be via authentication keys.

Regards,

Mark

nabendu_sen
Active Contributor
0 Kudos

Hi Mark,

Thanks for the reply. No, I did not use Dynamic Configuration. I have set the static URL in the Receiver SOAP Channel and used basic User ID / Password (Configure User Authentication Option). We have SOAP Action in the channel. Its kind of regular SOAP over HTTP with authentication.

Regards,

Nabendu.

markangelo_dihiansan
Active Contributor
0 Kudos

That is strange. I have not found any OSS either. As a workaround, have you tried passing the authentication via Variable headers e.g XHeaderName1?

nabendu_sen
Active Contributor
0 Kudos

Hi Mark,

I have tried to use Dynamic Configuration with 'TAuthKey' variable as per below blog, but it did not help. The result is same. It's kind of disappointing.

After long research, we found some helpful information in IETF Request for Comments (RFC). I think PI follow <Base64 encoding for Basic Authorization> protocol of RFC2045.

RFC2045 : "The encoded output stream must be represented in lines of no more than 76 characters each"

This is actually happening in our case. PI is only sending Base64 Encoding of Maximum 76 characters. The only step we have now is to raise OSS with SAP.....Weird as well as Strange

Regards,

Nabendu.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Nabendu,

Thank you for that information, it is helpful . What I was referring to about is to have the value of XHeaderName1 to be Authorization: and then use dynamic configuration to place

Basic NTA1YzAyMjk4ZTA4NGZlNGI1ODk1YjBjN2Y5YWQxMmM6YzJmNDk0NDQ1ZDhlNGQ3MkFBMjM3R


Since the authorization are read from the http headers anyway, that approach could work. Just don't input anything on the username/password. The same idea can be found here

but using the receiver side instead of sender.


Regards,

Mark


nabendu_sen
Active Contributor
0 Kudos

It worked Mark. Thanks for all the information. We have raised OSS ticket to SAP to find out the actual reason of the original probem.

Thanks again.

Regards,

Nabendu.

Answers (1)

Answers (1)

former_member207667
Participant
0 Kudos

Hi Nabendu,

I also found this problem a while ago.

You could also use the AXIS adapter, there is no Authorization Header trimmed issue using this adapter.

Best regards.

Mikel