HIGH story-bufdir-report-history-audit-log-organization-admin-006 5 pts
5
Story Points
High
Priority
Bufdir Report History & Audit Log
Feature

User Story

As a Organization Administrator
I want to download report files from the history screen using secure, time-limited links that do not expose raw storage paths
So that sensitive grant reporting data is protected from unauthorized access even if a link is accidentally shared

Acceptance Criteria

  • Given the coordinator requests a file download, when the system generates the download link, then the link is a signed URL with a 15-minute expiry and is not a direct public storage path
  • Given a signed URL has expired, when someone attempts to use it, then the server returns an authorization error and the file is not served
  • Given a coordinator from organization A has a signed URL for their report, when a coordinator from organization B attempts to use that URL, then access is denied by the RLS-enforced storage policy
  • Given the coordinator downloads a file successfully, when the download completes, then no raw storage bucket paths or credentials are exposed to the client application
  • Given the coordinator's session expires mid-download, when they attempt to re-download, then they are prompted to re-authenticate before a new signed URL is issued

Business Value

Bufdir reports contain aggregated sensitive data about vulnerable populations. Norwegian data protection regulations (GDPR and Datatilsynet guidelines) require that access to personal data processing records is controlled and auditable. Signed time-limited URLs are the industry-standard mechanism for providing secure temporary file access without exposing infrastructure details.