Skip to content

fix(manager): grant calico-manager access to WAF logs in linseed - #5133

Open
electricjesus wants to merge 1 commit into
tigera:masterfrom
electricjesus:seth/ev6936-manager-waflogs-rbac
Open

fix(manager): grant calico-manager access to WAF logs in linseed#5133
electricjesus wants to merge 1 commit into
tigera:masterfrom
electricjesus:seth/ev6936-manager-waflogs-rbac

Conversation

@electricjesus

Copy link
Copy Markdown
Member

Description

Bug fix. The linseed.tigera.io rule in the manager's ClusterRole lists the flow, DNS and L7 log resources and their multi-cluster variants, but never the WAF ones. The comment directly above that rule says the multi-cluster variants exist "for Linseed to query across multiple clusters for Enterprise Custom Dashboards", so WAF looks like it was simply missed when the collection was added.

calico-dashboard-api runs inside the calico-manager pod and queries linseed as the manager's ServiceAccount. So every WAF dashboard card returns accessDenied for every user, whatever RBAC that user holds. There is no user-side workaround, because the missing permission belongs to the manager rather than to the caller.

It is also hard to attribute. The dashboards linseed repository maps a linseed 403 onto the same accessDenied reply the API returns when the caller is unauthorized, so a gap one hop downstream looks exactly like the user lacking permission. Same-shaped queries against flows, l7 and dns all succeed for the same caller, which is what isolates it.

Both resource names are needed. Linseed's WAF handler authorizes against the plain WAF log resource, and its request middleware appends the multi-cluster suffix for cross-cluster queries, which the dashboards API issues by default.

Components affected: manager rendering only. No other component changes.

Testing

go test ./pkg/render/ passes with the two matching test expectations updated.

Verified on a dev cluster running a v3.24.0-3.0 hashrelease. Granting the manager ServiceAccount get on the two WAF log resources made all 17 WAF dashboard cards render immediately, with no other change. Before the grant, every one of them returned accessDenied while flows, l7 and dns queries succeeded for the same caller.

Issues: https://tigera.atlassian.net/browse/EV-6936

Release Note

Fixed WAF dashboard cards failing with an access denied error for all users.

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

The linseed.tigera.io rule lists the flow, DNS and L7 log resources and their
multi-cluster variants but never the WAF ones, so the dashboards API, which
queries linseed as the calico-manager service account, is refused for the waf
collection. Every WAF dashboard card returns accessDenied for every user
regardless of that user's own RBAC.

Both names are needed: linseed's WAF handler authorizes against waflogs, and
its request middleware appends the multi-cluster suffix for cross-cluster
queries, which the dashboards API issues by default.

EV-6936
@electricjesus
electricjesus requested a review from a team as a code owner August 1, 2026 23:52
@marvin-tigera marvin-tigera added this to the v1.44.0 milestone Aug 1, 2026
@electricjesus electricjesus added kind/bug Something isn't working enterprise Feature applies to enterprise only labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-pr-required enterprise Feature applies to enterprise only kind/bug Something isn't working release-note-required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants