A lightweight, single-binary collector that pulls logs from cloud and SaaS platforms into Kafka, S3, Opensearch
- Google Workspace audit logs from the Admin SDK Reports API: 14 log types, including login, admin, OAuth tokens, Drive, Gmail and SAML.
- One cursor per log type. A cursor moves forward only after the output confirms every event in the window.
- Late events are caught: each poll re-checks the last few minutes, and a periodic sweep reaches back further per log type.
- Deterministic event IDs for deduplication, also used as the Kafka message key.
- API responses are kept as received; nested parameters are flattened into a
paramsobject. - Exponential backoff on rate limits and server errors. Log types the tenant's plan does not offer are re-checked hourly.
- Prometheus metrics per log type: events sent, late events, poll errors and cursor lag.
- Any Bento output: Kafka, S3, OpenSearch, Elasticsearch, HTTP or files.
- One static binary, configured with a YAML file and an env file. No runtime to install.
Requires Go 1.27+.
go build -o bin/siphon ./cmd/collectorA super admin account is needed for these steps
- In the Admin console, go to Directory, Users, Add new user, for example
reports@your-domain. - Sign in once as this user and accept the terms. Set a long password and store it; Siphon does not use it.
- Go to Account, Admin roles, Create new role. Name it "Reports reader" and select only the Reports privilege.
- Assign the role to the reports user.
- In Google Cloud console, signed in as the super admin, create a project inside your organization.
- Go to APIs & Services, Library and enable the Admin SDK API.
- Go to IAM & Admin, Service accounts, Create service account. Do not grant it any roles.
- Open the service account then Keys, there Create new key, JSON. The key file downloads.
- If key creation is blocked, the organization policy "Disable service account key creation" is on. Override it for this project only, create the key, then set the policy back to "Inherit parent's policy". The key keeps working.
- Copy the service account's Unique ID from its details page.
- In the Admin console, go to Security, Access and data control, API controls, Manage Domain Wide Delegation, Add new.
- Client ID: the Unique ID from step 2.6.
- OAuth scope:
https://www.googleapis.com/auth/admin.reports.audit.readonly - Authorize.
-
Save the key as
secrets/google-sa.jsonand restrict it:chmod 600 secrets/google-sa.json. Never commit it. -
Copy the settings template and fill it in:
cp deploy/gws/gws.env.example deploy/gws/gws.env
Set
GWS_ADMIN_SUBJECTto the reports user andKAFKA_BROKERSfor your Kafka. KeepKAFKA_TOPIC=tlsoc.logs.google_workspace: the TLSOC engine reads everytlsoc.logs.*topic by itself, so nothing else needs configuring. -
Start Siphon:
./bin/siphon -e deploy/gws/gws.env -c config/google-workspace.yaml