Skip to main content

How to add workspace activity to Chronicle via 3rd party API?

  • August 15, 2023
  • 30 replies
  • 208 views

Hi,
I want to add workspace activity to Chronicle via Add feed --> 3rd party API and log type workspace Activities.

However, I have some information but these are not completely fit to support documentation.

https://us.v-cdn.net/6031969/uploads/editor/yi/awkiwyu7r61e.png

30 replies

  • August 15, 2023

I have these information but adding page ask me diffent named fields


  • August 15, 2023



https://us.v-cdn.net/6031969/uploads/editor/vn/4zy2j0tlbr2w.png


  • August 15, 2023

JWT Endpoint: < auth_uri>
JWT Issuer: < client_email>
JWT Subject: <email of the account created in your workspace and linked to the service account you created (client_email)>
JWT Audience: < auth_uri>
customer ID: <get from workspace Admin. Starts with a C>


  • August 15, 2023

I used this link: https://cloud.google.com/chronicle/docs/ingestion/default-parsers/collect-workspace-logs
However token_uri are written for 2 different fiels and I tried but I had 401 login failed error
Can you help me please?
Which fields are filled by which information? Thank you for your help


Forum|alt.badge.img+15

OAUTH JWT ENDPOINT - token_uri from Google Cloud Service Account JSON
JWT CLAIMS ISSUER - client_email from Google Cloud Service Account JSON
JWT CLAIMS SUBJECT - email address created for Workspace Service Account in your Workspace admin console
JWT CLAIMS AUDIENCE - token_uri from Google Cloud Service Account JSON
RSA PRIVATE KEY - remove all \\n characters and replace with new lines
CUSTOMER ID - from your Google Admin console, i.e., workspace customer ID


Forum|alt.badge.img+15

Does that help?


  • August 15, 2023

I will try and retturn. thank you so much


  • August 15, 2023

I tried the web site but it doesn't work. I will try it again. Token uri will be written twice, isn't it?


Forum|alt.badge.img+15

That's what I have from my notes yes


Forum|alt.badge.img+15

For info, in the near future there will new native Workspace connector which just requires you enter a one time code and them logs will be pulled without requiring a Feed or Service Account. It's in testing at present, but its far easier to configure, and also has the benefit of lower latency as the public APIs aren't all realtime


  • August 15, 2023

That is very good news. When it will be released?


Forum|alt.badge.img+15

@adam9 may be able to give an exact date, but it exists, and we're testing it in private preview, so soon...ish


  • August 15, 2023

Login failed with error code 401


  • August 15, 2023

RSA PRIVATE KEY - remove all \\n characters and replace with new lines

that will be manualy? Because there are some /n in the license except beginning and finishing


Forum|alt.badge.img+15

I'd try first of all just copying the RSA key with everything between the speech marks (") in the private_key field


Forum|alt.badge.img+15

I think since those notes Feed Management is more tolerant of \\n characters


Forum|alt.badge.img+15

so include the trailing


Forum|alt.badge.img+15

newline


  • August 15, 2023

ok


  • August 15, 2023

error code was changed after finishing \\n characters


  • August 15, 2023



https://us.v-cdn.net/6031969/uploads/editor/m7/xus558nerygi.png


Forum|alt.badge.img+15

On NIX you can try a command like below to get the private_key:
cat workspace-sa-1234644b5678.json | jq -r '.private_key'

Or the windows version:
Get-Content workspace-sa-1234644b5678.json | ConvertFrom-Json | Select-Object -ExpandProperty private_key


Forum|alt.badge.img+15

otherwise, I would try adding a feed for another type, e.g., try one of WORKSPACE_ACTIVITY, and WORKSPACE_ALERTS


Forum|alt.badge.img+15

If they both fail, its a related issue, but if one works and the other doesn't then you narrow down there is an issue with that feed


Forum|alt.badge.img+15

And for WORKSPACE_ACTIVITY I usually setup one application first, then add more once that works