Repository navigation
feat: activity timeline rules for feedback - #40
Open
mattdjenkinson wants to merge 4 commits into
Open
mattdjenkinson wants to merge 4 commits into
mattdjenkinson wants to merge 4 commits into
Conversation
2 of 3 tasks
An ActivityPolicy per kind turns people's feedback writes into sentences: votes, follows, feedback and reports sent, staff decisions, hiding posts and editing sources. The service's own system: users are left out. Rules for kinds Milo audits at Metadata only use the verb and object reference; a test compiles every rule and enforces that.
mattdjenkinson
force-pushed
the
feat/crd-activity
branch
from
November 17, 2026 20:53
fe9b756 to
e78022e
Compare
mattdjenkinson
force-pushed
the
feat/crd-security
branch
from
November 17, 2026 20:53
7f641b8 to
34c02ac
Compare
|
Two issues to resolve before merging:
The Metadata-only audit policy also needs to ship before these rules are enabled. |
…ort activity CRD deletes return a Status in the audit event, not the deleted object, so the unvote and unfollow rules that read responseObject.spec never matched. A ValidatingAdmissionPolicy with no validations now adds the post's name to vote and subscription deletes as the audit annotation post-ref.feedback.miloapis.com/post, and the rules read it there. Without the annotation the entries still appear, without the post. The activity service files entries under the actor's context with no per-entry access check, and platform-scope readers see every entry, so security report and triage entries would reveal that reports exist. Their ActivityPolicies are removed. Tests evaluate rules in the activity service's CEL environment against delete events written by an envtest API server, check no delete rule reads request or response bodies, and check no policy covers security reports.
Contributor
Author
|
Both fixed in 1bf67c5.
The Metadata-only audit policy is datum-cloud/infra#9437, and it's listed in the README's rollout prerequisites. |
scotwells
approved these changes
Nov 18, 2026
scotwells
approved these changes
Nov 18, 2026
This was referenced Nov 18, 2026
Open
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.
Part of #11, with datum-cloud/infra#9437. #11 stays open until activity timelines are checked in staging (#13). Stacked on #39.
With CRDs, Milo audits feedback writes itself. The Postgres version's own audit backend, and the Milo rule to drop duplicate events, are no longer needed. Two pieces remain:
feedback.miloapis.comwrites atRequestResponse, so search can index posts.submissions,submissionreviews,securityreports,securityreporttriagesandfeedbackdigestsatMetadataonly.ActivityPolicyper kind inconfig/milo/activity.system:users, so feedback-sync, the operator and uploads don't appear. That includes the follows and votes the operator gives submitters.sub-…), and nothing from the body is there.Status, not the deleted object, and the activity service's CEL can't split the<post>.<user>name.post-ref.yamlis aValidatingAdmissionPolicywith no validations that addspost-ref.feedback.miloapis.com/postto vote and subscription deletes. It hasfailurePolicy: Ignore, so it never blocks a delete. Without the annotation the entry still appears, without the post.Tests
test/config/activity_test.go:system:users;requestObjectorresponseObject;kustomize buildof the Milo components renders 7 policies and the admission policy.