-
Notifications
You must be signed in to change notification settings - Fork 24
feat: Add audit record APIs and deprecate existing audit log APIs #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces new audit record APIs and deprecates the existing audit log APIs in Frontier. The changes establish a more structured audit system with dedicated data models for audit records while maintaining backward compatibility through deprecation warnings.
- Adds new
AuditRecord
model with structured actor, resource, and target components - Introduces user-facing
CreateAuditRecord
API and admin-onlyListAuditRecords
API - Deprecates existing organization-scoped audit log APIs with migration guidance
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
raystack/frontier/v1beta1/models.proto | Defines new audit record data models with actor, resource, target, and main record structures |
raystack/frontier/v1beta1/frontier.proto | Deprecates existing audit log APIs and adds new CreateAuditRecord endpoint |
raystack/frontier/v1beta1/admin.proto | Adds admin-only ListAuditRecords API for audit record retrieval |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
||
message AuditRecord { | ||
string id = 1; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Remove the extra blank line after the id field declaration to maintain consistent spacing throughout the message definition.
Copilot uses AI. Check for mistakes.
@@ -788,6 +788,9 @@ service AdminService { | |||
// Revoke a specific session for a specific user (admin only). | |||
rpc RevokeUserSession(RevokeUserSessionRequest) returns (RevokeUserSessionResponse) {} | |||
|
|||
// Audit Records (Admin Only) | |||
rpc ListAuditRecords(ListAuditRecordsRequest) returns (ListAuditRecordsResponse) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding the GetAuditRecord RPC mentioned in the deprecation messages. The deprecated GetOrganizationAuditLog references 'admin GetAuditRecord API' but this endpoint doesn't exist in the admin service.
Copilot uses AI. Check for mistakes.
No description provided.