Saturday, 25 May 2019

Setting Authorization Headers in IBM API Connect Test and Monitor

I've recently started exploring the IBM API Connect Test and Monitor tool on IBM Cloud here: -

and was having some fun n' games setting an HTTP Header, using either the basic HTTP Client or the more detailed Test Composer.

My API requires that one send an IAM token, rather than the more Basic Auth of user/password, which is nice :-)

This kept failing with HTTP403 Unauthorized.

Thankfully IBM have a nice active support community on Stack Overflow, so I posted a question here: -

Setting Authorization Headers in IBM API Connect Test and Monitor

and got some rapid feedback from the community.

In essence, I was doing it wrong ....

This is what I needed to do: -

In other words, for the Key/Value Pair (KVP) that comprises the HTTP Header field, I needed to specify Authorization as the key and Bearer XXXXXXXXXXXXXXX as the value ( with a space between the word Bearer and the actual IAM token itself.

So I was holding it wrong .... #Doofus

Apart from the basic HTTP Client, there's also a very spiffing Test Composer, that has the same requirement wrt Authorisation headers: -

For the record, there's also a GitHub project for a native client here: -

with which I've played a wee bit .....

No comments:

SSH and "Too many authentication failures" - a new one on me

Having created a new user on an Ubuntu 16.04 boxen, I started seeing this: - Received disconnect from port 22:2: Too many au...