Skip to content

Commit 73cc3ae

Browse files
funnel version 2025-05-19: pass auth header for plugin
1 parent 77c37e9 commit 73cc3ae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gen3workflow/routes/ga4gh_tes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,13 @@ async def create_task(request: Request, auth=Depends(Auth)) -> dict:
115115
body["tags"] = {}
116116
# TODO unit test: user can't set USER_ID tag manually
117117
# TODO raise an error if it's set, and explain it's an internal tag. Same for AUTHZ tag
118-
body["tags"]["USER_ID"] = user_id # used by the funnel plugin to identify the user
118+
# body["tags"]["USER_ID"] = user_id # used by the funnel plugin to identify the user
119119
body["tags"]["AUTHZ"] = f"/users/{user_id}/gen3-workflow/tasks/TASK_ID_PLACEHOLDER"
120120

121121
url = f"{config['TES_SERVER_URL']}/tasks"
122-
res = await request.app.async_client.post(url, json=body)
122+
res = await request.app.async_client.post(
123+
url, json=body, headers={"Authorization": f"bearer {auth.bearer_token}"}
124+
)
123125
if res.status_code != HTTP_200_OK:
124126
logger.error(f"TES server error at 'POST {url}': {res.status_code} {res.text}")
125127
raise HTTPException(res.status_code, res.text)

0 commit comments

Comments
 (0)