Skip to content

Commit 71e2cdb

Browse files
authored
Merge pull request #404 from gm3dmo/issue403
Moving configuration to configuration file
2 parents 620bf3b + f39876a commit 71e2cdb

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

configure.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@ def main(args):
7272
### GitHub Enterprise
7373
enterprise="${enterprise_name}"
7474
75+
# [Enterprise Audit Log Stream](https://docs.github.com/en/enterprise-cloud@latest/rest/enterprise-admin/audit-log?apiVersion=2022-11-28#create-an-audit-log-streaming-configuration-for-an-enterprise)
76+
## Splunk Audit Log Stream
77+
stream_type="Splunk"
78+
enabled=true
79+
domain="audit.example.com"
80+
port=443
81+
token='mytoken'
82+
# SSL verification helps ensure your events are sent to your Splunk endpoint securely.
83+
ssl_verify=true
84+
7585
7686
### GitHub API Version
7787
# https://docs.github.com/en/rest/overview/api-versions

create-splunk-audit-log-stream-for-an-enterprise.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,13 @@ if [ -z "$1" ]
1212
stream_no=$1
1313
fi
1414

15-
16-
enabled=true
17-
stream_type="Splunk"
18-
domain="audit.yourdomain.com"
19-
port=443
20-
token='mytoken'
21-
# SSL verification helps ensure your events are sent to your Splunk endpoint securely.
22-
ssl_verify=false
15+
# Configuration comes from the .gh-api-examples.conf file section "Splunk Audit Log Stream"
2316

2417
# Key ID obtained from the audit log stream key endpoint used to encrypt secrets.
2518
audit_key_details="tmp/audit-log-stream-key.json"
2619
./get-the-audit-log-stream-key-for-encrypting-secrets.sh > ${audit_key_details}
2720
key_id=$(jq -r '.key_id' ${audit_key_details})
2821
key=$(jq -r '.key' ${audit_key_details})
29-
3022
encrypted_token=$(ruby create-enterprise-audit-log-stream-key.rb $key $token)
3123

3224

http-event-collector/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,17 @@ Should contain an event. Press the Show/Hide button to see details of the test m
8888

8989
<img width="1260" alt="event collector search page" src="https://github.com/user-attachments/assets/e9915c22-a81e-438a-ab23-7d0694c0eb9d" />
9090

91-
## Configure the splunk audit log stream in GitHub
91+
### Configure the splunk audit log stream in GitHub
9292

9393
Follow the guidance at [setting up streaming to Splunk](https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise#setting-up-streaming-to-splunk)
9494

9595
<img width="1374" alt="Picture of GitHub Splunk Audit Log Stream Setting page" src="https://github.com/user-attachments/assets/3ea42126-d3d7-4df8-a766-b6e8aa7e7658" />
9696

97+
### Configure the splunk audit log stream using GitHub REST API [Create an audit log straming configuration for an enterprise](https://docs.github.com/en/enterprise-cloud@latest/rest/enterprise-admin/audit-log?apiVersion=2022-11-28#create-an-audit-log-streaming-configuration-for-an-enterprise)
98+
99+
- Set the appropriate values in the configuration file.
100+
- Execute [create-splunk-audit-log-stream-for-an-enterprise.sh](https://github.com/gm3dmo/the-power/blob/main/create-splunk-audit-log-stream-for-an-enterprise.sh)
101+
97102

98103
## API Endpoints
99104

0 commit comments

Comments
 (0)