Node.js Generated Support Images: Temporary Download Links as Tenant Capability Leases
A customer-support image stops being private the moment one tenant can ask the application to sign another tenant's object key. Short answer: store originals and AI-generated derivatives in private object storage, look up each attachment by authenticated tenant and stable attachment ID, and issue a five-minute signed URL only after that lookup succeeds. Treat the URL as a temporary capability,…
The report discusses the security risks of using temporary download links for tenant-specific AI-generated support images in a Node.js application. The primary concern is that allowing one tenant to generate a download link for another tenant's attachment can lead to unauthorized access. The recommended solution is to store the original image in private object storage and generate a stable attachment ID for each image.
When a tenant requests an image, the application should authenticate the tenant and then issue a signed URL valid for only five minutes. This approach treats the URL as a temporary capability rather than proof of authorization. The implementation should avoid using a signing endpoint that accepts an object key, as this can create an authorization gap.
Instead, the application should look up the attachment by tenant-scoped metadata and issue a new URL after each authorization check.
Brief written by urgent.news; may contain errors — check the original.
Source: dev.to