You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PREWAVE-BE-099 — Enforce Owner-Scoped Notification Delivery History Queries #800
DeliveryTrackerService.getUserDeliveryHistory(userId, ...) currently ignores userId and queries delivery history without an ownership predicate. This risks returning delivery records belonging to other users.
Technical scope
Join delivery history to its owning notification (or use an equally authoritative ownership relation) and constrain every page/count query to the requested authenticated user. Apply stable ordering, bounded pagination, and only return fields the user is authorized to see. Keep administrative aggregate statistics behind a separate privileged boundary.
Required tests
Two-user isolation tests proving neither items nor total counts leak across accounts.
Empty, large, and multi-page histories.
Deleted/missing notification relation behavior.
Attempts to pass another user's notification ID or cursor.
SQL/query-level assertion that both data and count queries include the owner constraint.
Security and architecture constraints
Contracts and finalized canonical events remain authoritative for protocol state.
The API remains a projection/read and notification-delivery layer; it must not invent protocol outcomes.
Fail closed on missing, stale, ambiguous, unauthorized, or incomplete state.
Do not expose secrets, device tokens, email verification tokens, private evidence, or unnecessary personal data.
Activity