feat: Add support for enterprise audit log streaming API#1
Merged
colinsim1 merged 8 commits intocolinsim1:masterfrom Feb 23, 2026
Merged
feat: Add support for enterprise audit log streaming API#1colinsim1 merged 8 commits intocolinsim1:masterfrom
colinsim1 merged 8 commits intocolinsim1:masterfrom
Conversation
Feature/audit log stream v66
Signed-off-by: amreshh <20923769+amreshh@users.noreply.github.com>
…i operations updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description: Add Support for Enterprise Audit Log Streaming API
Closes google#3663
Summary
This PR adds support for the GitHub Enterprise audit log streaming REST API,
allowing users to programmatically manage audit log stream configurations for
enterprises. This includes retrieving the public encryption key, listing,
retrieving, creating, updating, and deleting stream configurations across all
supported vendors.
Changes
Data Structures
AuditLogStreamstruct to represent a stream configuration returned by the API.AuditLogStreamConfigstruct for creating and updating streams.AuditLogStreamKeystruct for the public encryption key.AuditLogStreamVendorConfigmarker interface for compile-time typesafety on vendor-specific configurations.
AzureBlobConfig,AzureHubConfig,AmazonS3OIDCConfig,AmazonS3AccessKeysConfig,SplunkConfig,HecConfig,GoogleCloudConfig, andDatadogConfig.New*StreamConfigconstructor helpers for all 8 vendors.Audit Log Streaming ([EnterpriseService])
Added the following methods to [EnterpriseService]:
GET /enterprises/{enterprise}/audit-log/stream-keyGET /enterprises/{enterprise}/audit-log/streamsGET /enterprises/{enterprise}/audit-log/streams/{stream_id}POST /enterprises/{enterprise}/audit-log/streamsPATCH /enterprises/{enterprise}/audit-log/streams/{stream_id}DELETE /enterprises/{enterprise}/audit-log/streams/{stream_id}Verification Plan
Automated Tests
github/enterprise_audit_log_streaming_test.gowith unit tests for allmethods and constructor helpers.
All tests passed:
Examples
example/auditlogstream/— creates and deletes an Azure Blob Storage stream.Example reads
GITHUB_API_URLandGITHUB_AUTH_TOKENfrom the environmentand handles sealed-box encryption of credentials using the key returned by
GetAuditLogStreamKey.