-
Notifications
You must be signed in to change notification settings - Fork 314
Add audit log for policy enforcements #3912
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
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
EVENT_TYPE_POLICY_ENFORCEMENT_CREATED = 74; | ||
EVENT_TYPE_POLICY_ENFORCEMENT_DELETED = 75; | ||
EVENT_TYPE_POLICY_ENFORCEMENT_POLICY_CHANGED = 76; | ||
EVENT_TYPE_POLICY_ENFORCEMENT_INCLUDE_TARGETS_CHANGED = 77; |
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.
Wondering if we should have just a "targets changed" event, and whenever/if we add "exclude targets", it's just a few more fields we add to the appropriate events.
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.
I like it, fixed!
// policy_id is the id of the policy that is enforced. | ||
string policy_id = 2; |
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.
We need policy_ref
too.
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.
Added
// old_policy_id is the id of the old policy. | ||
string old_policy_id = 2; | ||
// new_policy_id is the id of the new policy. | ||
string new_policy_id = 3; |
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.
Same here, missing the refs. It's possible that the change is only that:
- buf.build/acme/some-policy:foo
+ buf.build/acme/some-policy:bar
This adds audit log events for policy enforcements. The resource type is either server, owner (user/organization) or module. This aligns with current policy event types like
EVENT_TYPE_SERVER_UNIQUENESS_POLICY_ENABLED
that apply to the server resource.