Skip to main content

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

  • August 15, 2023
  • 30 replies
  • 124 views

Forum|alt.badge.img+4

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

Forum|alt.badge.img+4
  • Author
  • New Member
  • August 15, 2023

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


Forum|alt.badge.img+4
  • Author
  • New Member
  • August 15, 2023



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


Forum|alt.badge.img+1

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>


Forum|alt.badge.img+4
  • Author
  • New Member
  • 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+12

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+12

Does that help?


Forum|alt.badge.img+4
  • Author
  • New Member
  • August 15, 2023

I will try and retturn. thank you so much


Forum|alt.badge.img+4
  • Author
  • New Member
  • 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+12

That's what I have from my notes yes


Forum|alt.badge.img+12

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


Forum|alt.badge.img+4
  • Author
  • New Member
  • August 15, 2023

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


Forum|alt.badge.img+12

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


Forum|alt.badge.img+4
  • Author
  • New Member
  • August 15, 2023

Login failed with error code 401


Forum|alt.badge.img+4
  • Author
  • New Member
  • 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+12

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+12

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


Forum|alt.badge.img+12

so include the trailing


Forum|alt.badge.img+12

newline


Forum|alt.badge.img+4
  • Author
  • New Member
  • August 15, 2023

ok


Forum|alt.badge.img+4
  • Author
  • New Member
  • August 15, 2023

error code was changed after finishing \\n characters


Forum|alt.badge.img+4
  • Author
  • New Member
  • August 15, 2023



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


Forum|alt.badge.img+12

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+12

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


Forum|alt.badge.img+12

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+12

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