From fc1b10b81ebbe4988721fcbfe39359c06ca18cd2 Mon Sep 17 00:00:00 2001 From: ramari16 Date: Fri, 15 Nov 2024 09:44:58 -0500 Subject: [PATCH] ALS-7712: Allow PFB Export to 3rd party via signed URL (#211) --- .../java/edu/harvard/dbmi/avillach/security/JWTFilter.java | 5 ++++- .../harvard/dbmi/avillach/service/PicsureQueryService.java | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pic-sure-api-war/src/main/java/edu/harvard/dbmi/avillach/security/JWTFilter.java b/pic-sure-api-war/src/main/java/edu/harvard/dbmi/avillach/security/JWTFilter.java index 1525dc7c..729ad9c6 100755 --- a/pic-sure-api-war/src/main/java/edu/harvard/dbmi/avillach/security/JWTFilter.java +++ b/pic-sure-api-war/src/main/java/edu/harvard/dbmi/avillach/security/JWTFilter.java @@ -242,7 +242,10 @@ private HashMap prepareRequestMap(ContainerRequestContext reques Query initialQuery = null; // Read the query from the backing store if we are getting the results (full query may not be specified in request) - if (requestPath.startsWith("/query/") && (requestPath.endsWith("result") || requestPath.endsWith("result/"))) { + if (requestPath.startsWith("/query/") && + (requestPath.endsWith("result") || requestPath.endsWith("result/") || + requestPath.endsWith("signed-url") || requestPath.endsWith("signed-url/")) + ) { // Path: /query/{queryId}/result String[] pathParts = requestPath.split("/"); UUID uuid = UUID.fromString(pathParts[2]); diff --git a/pic-sure-api-war/src/main/java/edu/harvard/dbmi/avillach/service/PicsureQueryService.java b/pic-sure-api-war/src/main/java/edu/harvard/dbmi/avillach/service/PicsureQueryService.java index 74945080..542bdf91 100644 --- a/pic-sure-api-war/src/main/java/edu/harvard/dbmi/avillach/service/PicsureQueryService.java +++ b/pic-sure-api-war/src/main/java/edu/harvard/dbmi/avillach/service/PicsureQueryService.java @@ -7,10 +7,7 @@ import edu.harvard.dbmi.avillach.data.entity.Resource; import edu.harvard.dbmi.avillach.data.repository.QueryRepository; import edu.harvard.dbmi.avillach.data.repository.ResourceRepository; -import edu.harvard.dbmi.avillach.domain.FederatedQueryRequest; -import edu.harvard.dbmi.avillach.domain.GeneralQueryRequest; -import edu.harvard.dbmi.avillach.domain.QueryRequest; -import edu.harvard.dbmi.avillach.domain.QueryStatus; +import edu.harvard.dbmi.avillach.domain.*; import edu.harvard.dbmi.avillach.security.JWTFilter; import edu.harvard.dbmi.avillach.util.Utilities; import edu.harvard.dbmi.avillach.util.exception.ApplicationException;