Actions
Activity #4417
openModule #4271: Development
Module #4274: Integration with Virtual Treatment Planning System (VTPS)
Activity #4275: Develop an API to list patients based on a user
Secure File Path Access Using Token-Based URLs
Start date:
11/18/2025
Due date:
% Done:
100%
Estimated time:
Planned Due Date:
Description
1. Implement Token-Based File URL Protection
Each dicom_path and stl_path must be transformed like example:
/secure-file?path=/dicoms/pat001/case001/study123/&token=<signed-token>
The signed token must contain:
------------------------------
user_id ,path, expiry time (e.g., 10 minutes), digital signature (HMAC SHA256)
a) Write a function to generate signed URL:
generateSecureUrl(filePath, userId)
b) Create new API /secure-file
Validate path and token
Ensure:
Token not expired
Token path and request path match
Token is generated for specific user
c) Prevent:
Direct access to /dicoms/... (disable public access)
Directory traversal attacks (../..)
Actions