Question

FSM 5.6.3 - Integration Message Routing - Http Header value interupted at colon (:) within value

  • 6 March 2020
  • 0 replies
  • 199 views

Userlevel 3
Badge +8

Hi All,

I am trying to set up an Integration with Solarwinds Service Desk (https://www.samanage.com/docs/api/introduction)

 

The primary challenge that i’m facing is with the Authentication Token provided to us by Solarwinds, as it contains a colon “:” right in the middle. 

 

sample (Editted for obvious reasons) 

ASDSADSADSADSADSADSADdsadsadsadsadsadsadsadsadsvbQ==:eyJhbasds890dsa08979787sad7sd7sds7dsa8dsad78sad8sadsa8dsa8dsad8sadsa8dsad9sad9sad76sad6sads56adsa7n0.o6Yl4dASDSADOIASDSADSADSADSADdsadsaddsad8888asdsdsdss_asdsdds888ASASDdsassasaaAAaaAAA0

the way we are expected to feed this token is in the HTTP Header like:

X-Samanage-Authorization: Bearer TOKEN

Example: (fake token, from solarwinds documentation)

curl -H "X-Samanage-Authorization: Bearer AAAZWV0YXkubmF0YW4rNUBzYW1hbmFnZS5jb20hbGciOiJIUzUxMiJ9.eyJ1c2VyX2ljIjoxMjU2OTQzLCJnZW5lcmF0ZWRfYXQiOiIyMDE3LTA2LTA3IDA5OjE3OjI5In0.j_H15qzJJr9vXGAHCThLEOQrE9GGbjMxZJOs5zAf_iqaGqxlIOAmvPpBx0td_C3r7dliAfXXIgdqhZHVoK1KTwAzd1" -H "Accept: application/vnd.samanage.v2.1+xml" https://api.samanage.com/hardwares.xml

 

Since there are 240 characters in the token and including “X-Samanage-Authorization: Bearer “ that would exceed the 256 character limit (integration_routing_argument.argument_value= nvarchar(256)), we are using a Custom App Param to compensate.

 

I have the routing map set up as follow: 

Custom App Param Name: BB_SW_TOKEN

Custom App Param Value: bearer ASDSADSADSADSADSADSADdsadsadsadsadsadsadsadsadsvbQ==:eyJhbasds890dsa08979787sad7sd7sds7dsa8dsad78sad8sadsa8dsa8dsad8sadsa8dsad9sad9sad76sad6sads56adsa7n0.o6Yl4dASDSADOIASDSADSADSADSADdsadsaddsad8888asdsdsdss_asdsdds888ASASDdsassasaaAAaaAAA0

 

Message Routing setup: 

 

 

The results are “401: Authentication Failed”   

 

Even though the integration run log does in fact show the “Transaction argument” containing the full key;

HTTPHeaders = X-Samanage-Authorization:bearer ASDSADSADSADSADSADSADdsadsadsadsadsadsadsadsadsvbQ==:eyJhbasds890dsa08979787sad7sd7sds7dsa8dsad78sad8sadsa8dsa8dsad8sadsa8dsad9sad9sad76sad6sads56adsa7n0.o6Yl4dASDSADOIASDSADSADSADSADdsadsaddsad8888asdsdsdss_asdsdds888ASASDdsassasaaAAaaAAA0
HTTPMethod = GET
Timeout = 60
URL = https://api.samanage.com/incidents.xml

When testing this through one of our own internal sites, we can see that the Authentication token only sent up to the “==” prior to the colon “:” -- the rest is missing.  

HEADERS
Array
(
[X-Samanage-Authorization] => Bearer ASDSADSADSADSADSADSADdsadsadsadsadsadsadsadsadsvbQ==
)

 

When we do the Exact same test through Postman; no issues at all! 

 

Testing internally; we see it all comes through OK with postman

HEADERS
Array
(
[X-Samanage-Authorization] => Bearer ASDSADSADSADSADSADSADdsadsadsadsadsadsadsadsadsvbQ==:eyJhbasds890dsa08979787sad7sd7sds7dsa8dsad78sad8sadsa8dsa8dsad8sadsa8dsad9sad9sad76sad6sads56adsa7n0.o6Yl4dASDSADOIASDSADSADSADSADdsadsaddsad8888asdsdsdss_asdsdds888ASASDdsassasaaAAaaAAA0
)

 


Does anyone know how we can overcome this?   How can we get this token sent across the HTTP Headers, including the Colon and all items thereafter? 

 

Thank you in advance.

-Rudy

 


0 replies

Be the first to reply!

Reply