It is working now for me and we need to make the Bearer token request in Header section.
Original Message:
Sent: 06-23-2021 07:55 AM
From: Alessandro K.
Subject: OAuth2 with bearer tokens in RESTMon in UIM
Hi Shubhojit,
Sorry for answering so late. I'm in the same situation as you, I opened a case too, because it is information that a customer needs and I could not provide, and he has the Azure access, I'm not. If I have any new information I will post here.
Alessandro.
Original Message:
Sent: 06-23-2021 07:42 AM
From: Shubhojit Shil
Subject: OAuth2 with bearer tokens in RESTMon in UIM
Thank you Chris.
However I would be expecting the response from Alessandro as well, if he is able to crack it.
Original Message:
Sent: 06-22-2021 02:56 PM
From: Chris Klug
Subject: OAuth2 with bearer tokens in RESTMon in UIM
Shubhojit,
I understand you have a support case opened for this. Let's work this using the support case and then we'll provide the solution here once it's working.
Chris
Original Message:
Sent: 06-22-2021 12:40 PM
From: Shubhojit Shil
Subject: OAuth2 with bearer tokens in RESTMon in UIM
"auth": "token",
didnt work for me in Cloudflare API
Original Message:
Sent: 06-22-2021 11:57 AM
From: Shubhojit Shil
Subject: OAuth2 with bearer tokens in RESTMon in UIM
Thank you Chris. I will try to append this change.
I hope this field value for "token" will be considered while sending the API call in api.cloudflare.com
Original Message:
Sent: 06-22-2021 10:51 AM
From: Chris Klug
Subject: OAuth2 with bearer tokens in RESTMon in UIM
Shubhojit - Refer to the paloalto_schema.json which is found in the restmon_sample_schemas. The sample schemas can be downloaded from the archive at support.nimsoft.com. The paloalto schema uses url token but you can easily change it to bearer token. Just change auth type to "token" rather than "urltoken".
"definition": {
"resource_category": null,
"defaults": {
"checkcert": "no",
"port": 443,
"interval": 120,
"httptimeout": 30000
},
"addedProfileFields": [
{
"name": "token",
"value": "",
"type": "password",
"label": "Token"
}
],
"auth": "token",
"xml_ns": "",
"name": "your_schema_name",
"type": "https"
},
Hope that helps,
Chris
Original Message:
Sent: 06-22-2021 09:45 AM
From: Shubhojit Shil
Subject: OAuth2 with bearer tokens in RESTMon in UIM
Hi Alessandro,
Have you got any update? Even I am trying for Cloudflare API which is using bearer token in header.
Unfortunately there is no OOB Schema templates for bearer token
Original Message:
Sent: 06-15-2021 01:47 PM
From: Alessandro K.
Subject: OAuth2 with bearer tokens in RESTMon in UIM
Hi Cris,
Yes, it is a cloud platform, more specifically the cloud platform is Azure.
Thank you for sharing, I will see it in deep detail.
Original Message:
Sent: 06-15-2021 10:25 AM
From: Chris Klug
Subject: OAuth2 with bearer tokens in RESTMon in UIM
Allesandro,
What system are you needing to connect to? I'm assuming it's in the cloud but need more detail from you.
Here's another source of reference, with a sample attached: https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewthread?MessageKey=dd47d2ac-b714-407d-b98d-972f523cc742&CommunityKey=170eb4e5-a593-4af2-ad1d-f7655e31513b&tab=digestviewer#bmdd47d2ac-b714-407d-b98d-972f523cc742
Chris
Original Message:
Sent: 06-14-2021 04:54 PM
From: Alessandro K.
Subject: OAuth2 with bearer tokens in RESTMon in UIM
Hi David,
Thank you for your reply. I saw your notes in another thread (Is it possible with UIM to monitor a non CA product trough API which has double Authentication security?) and it is very useful. But, I still have a question on how to declare the token in the schema, for example:
For basic authentication we can do:
"definition": {
"resource_category": null,
"defaults": {
"port": 9200,
"interval": 60,
"httptimeout": 30000
},
"auth": "basic",
"xml_ns": "",
"name": "elasticsearch",
"type": "http"
},
For the urltoken we can do something like this:
"definition": {
"resource_category": null,
"defaults": {
"checkcert": "no",
"port": 443,
"interval": 60,
"httptimeout": 30000
},
"auth": "urltoken",
"xml_ns": "",
"name": "paloalto",
"type": "https"
},
"urls": [{
"src": "list",
"xml_ns": "",
"var": "/response/result/ifnet/entry/name",
"id": "detail",
"url": "/api/?type=op&cmd=<show><interface>%var</interface></show>&key=%token"
},
...
But for OAuth2 with bearer tokens I didn't seen nothing. How to use it in definition?
"definition": {
"auth": "OAuth2", <--- Is it correct ?
Where I put the token????
Should I use addedProfileFields?
"type": "http"
}
Thank you again for your reply.
Original Message:
Sent: 06-14-2021 04:12 PM
From: David MICHEL
Subject: OAuth2 with bearer tokens in RESTMon in UIM
Don't have examples, but from my notes:
the parameters etc appear to be encoded in the token for example see https://auth0.com/learn/token-based-authentication-made-easy/
------------------------------
Support Engineer
Broadcom
Original Message:
Sent: 06-14-2021 03:27 PM
From: Alessandro K.
Subject: OAuth2 with bearer tokens in RESTMon in UIM
Hello All,
Does anyone have examples on how to use OAuth2 with bearer tokens or on how to include this type of authentication to make the profile work in RESTMon in UIM?