cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
643
Views
1
Helpful
2
Replies

Dealing with Basic Authentication & Bearer tokens in Cisco-Workflows

HannesHeinrich
Level 1
Level 1

Hello everyone,

I noticed the following problem today when trying out Cisco Workflows.

A token must be created for authorisation on the Umbrella API (Create Authorization Token - Cloud Security API - Cisco DevNet). I have created the Umbrella API as a ‘HTTP Endpoint target’  in workflows for this purpose.

Since I don't want to generate the token again and again via a manual script after the 3600-minute expiry time, I created the ‘target’ with the basic authentication (which doesn't change that often).

HannesHeinrich_1-1739638889169.png

I then built a task that queries the bearer token:

HannesHeinrich_2-1739638969516.png

The whole thing also works, I get a valid token back, which I have also tested via Postman.

As soon as I now want to query all tunnels from my umbrella organisation in my next task, e.g. via API, I get a problem.
I have to use my ‘api.umbrella.com’ as the target again, which still uses Basic authentication (In the URL field I have the following limitation ‘Relative URL for System APIs, Device Registration and Target APIs. Does not support specifying fully qualified URL.").

HannesHeinrich_3-1739639545259.png

Now I have simply written the Barer token in the header, in the hope that this will overwrite the Basic Auth:

HannesHeinrich_4-1739639625020.png

(not the real token)

Unfortunately, that didn't work. When I start these workflows, I can see in the ‘Input’ output that the token is insert, but unfortunately the authorisation does not work.

HannesHeinrich_5-1739639857766.pngHannesHeinrich_6-1739639902503.png

If I then delete my api.umbrella.com target and create a new one with token authentication (it's really stupid that you can only create a URL once as a target - I have several umbrella tenants that all use the same URL), then this workflow task also works.

Does anyone have such a scenario and was able to solve it?

EDIT

I have deactivated the target ‘Authentication required’.

HannesHeinrich_0-1740670522095.png


I then created a workflow for authentication.

In this I have the API key encoded in Base64. This allows me to query the access token from Umbrella and use it in other workflows.

HannesHeinrich_1-1740670654261.png

 

 

 

 



1 Accepted Solution

Accepted Solutions

HannesHeinrich
Level 1
Level 1

EDIT

I have deactivated the target ‘Authentication required’.

HannesHeinrich_0-1741332519996.png

 




I then created a workflow for authentication.

In this I have the API key encoded in Base64. This allows me to query the access token from Umbrella and use it in other workflows.

HannesHeinrich_1-1741332519953.png

 

 

 

 

 

View solution in original post

2 Replies 2

@HannesHeinrich  I haven't worked with Umbrella inside of Workflows and I don't know of anyone else that has either so I don't have an answer to your question at this time.  The good news is that later this year, likely around Cisco Live US, a native adapter for Cisco Umbrella as a Workflows target should be available.

HannesHeinrich
Level 1
Level 1

EDIT

I have deactivated the target ‘Authentication required’.

HannesHeinrich_0-1741332519996.png

 




I then created a workflow for authentication.

In this I have the API key encoded in Base64. This allows me to query the access token from Umbrella and use it in other workflows.

HannesHeinrich_1-1741332519953.png