How to call SIEM Audit APIs in Bruno
Objective
This is a step-by-step guide to enable calling Audit APIs in Bruno to integrate Audit with third-party SIEM applications
Environment
25.6;25.7;25.8;25.9 Identity
Procedure
- Go to the Administration space.
- Select Audit, SIEM Integrations.
- Click Create, and select Create SIEM integration.
The following screen will pop up:
Follow step 1 to create an OAuth2 server webapp, set ApplicationID and name.
2 - Make sure to enter the scope.
3 - Set token as follows (lifetime depends on your testing needs)
- Edit the advanced script and SAVE:
5. Create a SIEM service user:
- Grant permission to the service user:
7 - Name the SIEM integration and Apply
8 - Now you will get the API key/endpoint:
Now we have all the needed information to work with Bruno.
The first part will be generating an access token:
We will run {{tenant_url}}/oauth2/Token/GilSiemServer (this is our application id from step1)
You need to fill in the following fields:
Then we enter the user and password that we have created (can enter manually or via the environment)
When entered correctly, we will get an access token, which we use in the next step.
When the parameters do not match, you will get access denied:
Once we have the access token, we proceed with the following endpoint, create a reference point, and query:
Make sure to insert your correct api base URL (siem_url in the screenshot) and x-api-key, copied from step 8 c and d
Enter the access token that you got from the previous step.
In case the access token was wrongly inserted or is not valid, you will get :
"code": "401",
"message": "Unauthorized",
"description": "Unauthorized"
When all parameters are correct, you will receive a reference string ("cursorRef") to use in the result endpoint in next step
Next, we will extract the query results - {{siem_url}}/api/audits/stream/results
Insert reference, access token, and x-api-key as follows.
When running this endpoint, you will get all the audit results.
Below is an example for an event appearance on both the Bruno and Cyberark Audit space