Skip to content

Commit 9611d58

Browse files
narphcursoragent
andcommitted
[New Integration] Add Greenhouse ATS audit logs integration
Add a new integration to collect audit logs from Greenhouse Applicant Tracking System (ATS) via the Greenhouse Audit Log API. Features: - CEL input with two-step JWT authentication flow - Cursor-based pagination with Pit-Id and Search-After headers - Time-based filtering for incremental data collection - Full ECS mapping including user, event, and source fields - GeoIP enrichment for source IP addresses - Pipeline and system tests with mock service Dashboards: - Audit Logs Overview: Event counts, timeline, user activity, geographic distribution, event types, request types, target types, performer types - Data Changes: Focused view on create/update/delete operations with field-level change tracking and user activity breakdown Co-authored-by: Cursor <[email protected]>
1 parent 5b89927 commit 9611d58

File tree

20 files changed

+3899
-0
lines changed

20 files changed

+3899
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependencies:
2+
ecs:
3+
reference: "[email protected]"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: "2.3"
2+
services:
3+
greenhouse:
4+
image: docker.elastic.co/observability/stream:v0.15.0
5+
hostname: greenhouse
6+
ports:
7+
- 8080
8+
volumes:
9+
- ./files:/files:ro
10+
environment:
11+
PORT: "8080"
12+
command:
13+
- http-server
14+
- --addr=:8080
15+
- --config=/files/config.yml
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
rules:
2+
- path: /auth/jwt_access_token
3+
methods: ["POST"]
4+
responses:
5+
- status_code: 200
6+
headers:
7+
Content-Type:
8+
- application/json
9+
body: |
10+
{
11+
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IlRlc3QgVXNlciIsImlhdCI6MTUxNjIzOTAyMn0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
12+
"expires": "2099-12-31T23:59:59.999Z"
13+
}
14+
- path: /events
15+
methods: ["GET"]
16+
responses:
17+
- status_code: 200
18+
headers:
19+
Content-Type:
20+
- application/json
21+
body: |
22+
{
23+
"paging": {
24+
"pit_id": "cmFuZG9tX3ZhbHVl",
25+
"search_after": null,
26+
"size": "500",
27+
"next_search_after": null
28+
},
29+
"hits": 2,
30+
"results": [
31+
{
32+
"request": {
33+
"id": "1234zID",
34+
"type": "email_settings#create_organization_email"
35+
},
36+
"performer": {
37+
"meta": {
38+
"name": "Allison Jamie",
39+
"username": "[email protected]"
40+
},
41+
"id": 12345,
42+
"ip_address": "192.168.0.1",
43+
"type": "user"
44+
},
45+
"organization_id": 123,
46+
"event": {
47+
"meta": null,
48+
"target_type": "Global Email Added",
49+
"type": "action"
50+
},
51+
"event_time": "2023-06-02T16:06:19.217Z"
52+
},
53+
{
54+
"request": {
55+
"id": "1234zID",
56+
"type": "email_settings#create_organization_email"
57+
},
58+
"performer": {
59+
"meta": {
60+
"name": "Allison Jamie",
61+
"username": "[email protected]"
62+
},
63+
"id": 12345,
64+
"ip_address": "192.168.0.1",
65+
"type": "user"
66+
},
67+
"organization_id": 123,
68+
"event": {
69+
"meta": {
70+
"id": [null, 1234],
71+
"value": [null, "[email protected]"]
72+
},
73+
"target_type": "OrganizationEmail",
74+
"target_id": 1234,
75+
"type": "data_change_create"
76+
},
77+
"event_time": "2023-06-02T16:06:19.137Z"
78+
}
79+
]
80+
}

packages/greenhouse/changelog.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# newer versions go on top
2+
- version: "0.1.0"
3+
changes:
4+
- description: Initial release.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/1
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"events": [
3+
{
4+
"message": "{\"request\":{\"id\":\"1234zID\",\"type\":\"email_settings#create_organization_email\"},\"performer\":{\"meta\":{\"name\":\"Allison Jamie\",\"username\":\"[email protected]\"},\"id\":12345,\"ip_address\":\"192.168.0.1\",\"type\":\"user\"},\"organization_id\":123,\"event\":{\"meta\":null,\"target_type\":\"Global Email Added\",\"type\":\"action\"},\"event_time\":\"2023-06-02T16:06:19.217Z\"}"
5+
},
6+
{
7+
"message": "{\"request\":{\"id\":\"1234zID\",\"type\":\"email_settings#create_organization_email\"},\"performer\":{\"meta\":{\"name\":\"Allison Jamie\",\"username\":\"[email protected]\"},\"id\":12345,\"ip_address\":\"192.168.0.1\",\"type\":\"user\"},\"organization_id\":123,\"event\":{\"meta\":{\"id\":[null,1234],\"value\":[null,\"[email protected]\"]},\"target_type\":\"OrganizationEmail\",\"target_id\":1234,\"type\":\"data_change_create\"},\"event_time\":\"2023-06-02T16:06:19.137Z\"}"
8+
},
9+
{
10+
"message": "{\"request\":{\"id\":\"5678aID\",\"type\":\"users#update\"},\"performer\":{\"meta\":{\"name\":\"Admin User\",\"username\":\"[email protected]\"},\"id\":99999,\"ip_address\":\"10.0.0.50\",\"type\":\"user\"},\"organization_id\":123,\"event\":{\"meta\":{\"role\":[\"Basic\",\"Site Admin\"]},\"target_type\":\"User\",\"target_id\":12345,\"type\":\"data_change_update\"},\"event_time\":\"2023-06-03T10:30:00.000Z\"}"
11+
},
12+
{
13+
"message": "{\"request\":{\"id\":\"9012bID\",\"type\":\"/v1/candidates/123456\"},\"performer\":{\"meta\":{\"api_key_type\":\"harvest\"},\"id\":1001,\"ip_address\":\"203.0.113.42\",\"type\":\"api_key\"},\"organization_id\":123,\"event\":{\"meta\":null,\"target_type\":\"Candidate\",\"target_id\":123456,\"type\":\"harvest_access\"},\"event_time\":\"2023-06-03T12:00:00.000Z\"}"
14+
},
15+
{
16+
"message": "{\"request\":{\"id\":\"3456cID\",\"type\":\"jobs#destroy\"},\"performer\":{\"meta\":{\"name\":\"HR Manager\",\"username\":\"[email protected]\"},\"id\":55555,\"ip_address\":\"172.16.0.100\",\"type\":\"user\"},\"organization_id\":456,\"event\":{\"meta\":{\"name\":[\"Software Engineer\",null]},\"target_type\":\"Job\",\"target_id\":789,\"type\":\"data_change_destroy\"},\"event_time\":\"2023-06-04T08:15:30.500Z\"}"
17+
}
18+
]
19+
}

0 commit comments

Comments
 (0)