Document access for Tower presign
Overview
IP MagicBox (and web) download a Tower deposit by asking Tower for a short-lived signed GET URL. Neo must tell Tower whether the caller can read the document, which company it belongs to, and whether the remotefile is Tower-owned.
How it works
- Box calls Tower
POST /api/v1/files/presignwith the user Bearer token anddocumentId. - Tower calls neo
GET /documents/:idwith that same user token (disposable web token only for that call when needed). - Neo returns the document only if the user can read it, plus
companyIdandfileId.tower(and remote/target). - Tower checks
companyIdagainst its activation, Heads the object with Tower credentials, and returns a signed GET URL.
Key files
src/domains/document/document.controller.ts—GET /documents/:idsrc/domains/document/document.service.ts—getAccessibleDocumentsrc/domains/document/document.responses.ts—fileId.tower,companyId
Technical decisions
Neo does not sign the Box download. Storage secrets stay on Tower. tower: true on the remotefile (or legacy FTP/TOWER markers on the Box side) selects this path.