Skip to content

Resolve ack scope on the server - #32

Merged
dcadolph merged 2 commits into
mainfrom
server-owned-ack-scope
Oct 31, 2026
Merged

dcadolph merged 2 commits into
mainfrom
server-owned-ack-scope

Conversation

@dcadolph

Copy link
Copy Markdown
Owner

Acking a finding checked scope against the cluster named in the request body. Omitting the cluster, or sending fleet, skipped the check, so an operator scoped to one cluster could silence another cluster's finding in Slack and the dashboard. Deleting an ack had no actor check at all.

The server now owns ack scope. POST /findings/{fingerprint}/ack resolves the fingerprint against the latest report, returns 404 when no current finding carries it, and takes the cluster, scanner, and title from that finding. A fleet-scoped finding, or one with no cluster, needs wildcard scope. DELETE loads the stored ack through the new store.GetAck and applies the same check. The alert ack applies the same rule to an alert with no cluster.

Breaking API change: the ack body is now only ack_by, reason, and snooze_until. A body that names cluster, scanner, or title gets 400. The dashboard and the Go client already send the new shape. An ack for a finding that appears only in an older scan now gets 404.

Group management is admin only, matching the docs. A wildcard-scoped operator can no longer define a group, since a group widens every key scoped to it.

TestMutatingRoutesAreScoped walks every POST, PUT, PATCH, and DELETE route outside /admin and /webhooks and fails, naming the route, when one has no scope case. Each case checks a west operator, an east operator, a group-scoped operator, a wildcard operator, and an admin. The rbac page now says reads are unscoped and that the scan-trigger webhook is authorized by its secret.

The local gate (lint, race, cmd x10, browser, kind integration) is green.

@dcadolph
dcadolph merged commit 7e67fab into main Oct 31, 2026
5 checks passed
@dcadolph
dcadolph deleted the server-owned-ack-scope branch November 2, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant