Skip to content

bug(api/dashboard): calculateCommitmentMetrics does not intersect allowed_accounts for scoped sessions #959

Description

@cristim

Summary

calculateCommitmentMetrics in handler_dashboard.go queries commitment data (reservations, savings plans) without filtering by the caller's allowed_accounts scope. A scoped session therefore sees commitment metrics aggregated across all accounts, not just the ones it has access to.

Reproduction

  1. Create a session scoped to a subset of accounts via allowed_accounts.
  2. Fetch the dashboard endpoint.
  3. Observe that commitment totals include purchases from accounts outside the scope.

Expected behaviour

Commitment metrics should be restricted to the same account set that governs the rest of the dashboard (the set resolved by resolveDashboardAccountScope).

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions