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
/jobs/{jobId}/{filename} serves job output without an authority or ownership check #2980
FileController maps GET /jobs/{jobId}/{filename} and returns the named file from the job's output directory (server/src/main/java/au/csiro/pathling/FileController.java:62-77). The route is outside the FHIR servlet, so the only control on it is anyRequest().authenticated() (server/src/main/java/au/csiro/pathling/config/SecurityConfiguration.java:113-114). The $result operation reads the same files but requires pathling:export or pathling:bulk-submit, a registry entry for the job, and a match between the job's owner and the caller (server/src/main/java/au/csiro/pathling/operations/bulkexport/ExportResultProvider.java:88-112). No manifest produced by the server refers to a /jobs/ URL.
Reproduced on a build of release/server/3.2.0 (f70763af29) with authorisation enabled. A user with the subject alice ran a $sql-export job. A second token had the subject bob and no authorities at all:
Request with bob's token
Result
GET /fhir/$result?job=<alice's job>&file=patients.00000.csv
403, "Missing authority for any of: export, bulk-submit"
GET /jobs/<alice's job>/patients.00000.csv
200, with the content of the file
The caller needs the job identifier and the file name. Job identifiers are random UUIDs, except for bulk submit, where the directory is named after the client-chosen submissionId. File names from $sql-export follow the pattern <name>.00000.<ext>. The route does not consult the job registries, so it continues to work after a restart, when $result returns 404.
Activity