Skip to content

Commit fab6149

Browse files
small fixes
1 parent ee929fb commit fab6149

File tree

5 files changed

+72
-13
lines changed

5 files changed

+72
-13
lines changed

.secrets.baseline

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,6 @@
9898
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
9999
"min_level": 2
100100
},
101-
{
102-
"path": "detect_secrets.filters.gibberish.should_exclude_secret",
103-
"limit": 3.7
104-
},
105101
{
106102
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
107103
},
@@ -130,6 +126,61 @@
130126
"path": "detect_secrets.filters.heuristic.is_templated_secret"
131127
}
132128
],
133-
"results": {},
134-
"generated_at": "2026-02-27T23:06:29Z"
129+
"results": {
130+
".github/workflows/ci.yml": [
131+
{
132+
"type": "Secret Keyword",
133+
"filename": ".github/workflows/ci.yml",
134+
"hashed_secret": "3e26d6750975d678acb8fa35a0f69237881576b0",
135+
"is_verified": false,
136+
"line_number": 15
137+
}
138+
],
139+
"docs/local_installation.md": [
140+
{
141+
"type": "Secret Keyword",
142+
"filename": "docs/local_installation.md",
143+
"hashed_secret": "08d2e98e6754af941484848930ccbaddfefe13d6",
144+
"is_verified": false,
145+
"line_number": 90
146+
}
147+
],
148+
"docs/s3.md": [
149+
{
150+
"type": "Secret Keyword",
151+
"filename": "docs/s3.md",
152+
"hashed_secret": "08d2e98e6754af941484848930ccbaddfefe13d6",
153+
"is_verified": false,
154+
"line_number": 55
155+
}
156+
],
157+
"tests/conftest.py": [
158+
{
159+
"type": "Base64 High Entropy String",
160+
"filename": "tests/conftest.py",
161+
"hashed_secret": "06a9fa84e13b8f701d0c03235f675fee5e6fd736",
162+
"is_verified": false,
163+
"line_number": 196
164+
}
165+
],
166+
"tests/test-gen3workflow-config.yaml": [
167+
{
168+
"type": "Secret Keyword",
169+
"filename": "tests/test-gen3workflow-config.yaml",
170+
"hashed_secret": "900a7331f7bf83bff0e1b2c77f471b4a5145da0f",
171+
"is_verified": false,
172+
"line_number": 5
173+
}
174+
],
175+
"tests/test_s3_endpoint.py": [
176+
{
177+
"type": "Secret Keyword",
178+
"filename": "tests/test_s3_endpoint.py",
179+
"hashed_secret": "08d2e98e6754af941484848930ccbaddfefe13d6",
180+
"is_verified": false,
181+
"line_number": 77
182+
}
183+
]
184+
},
185+
"generated_at": "2026-03-02T20:27:56Z"
135186
}

gen3workflow/routes/s3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ async def s3_endpoint(path: str, request: Request):
178178
# Extract the caller's access token from the request headers, and ensure the caller (user, or
179179
# client acting on behalf of the user) has access to the user's files.
180180
# Note: sharing task inputs/output is not supported. Currently, users can only access their own
181-
# S3 bucket. It could be supported by hitting the "GET task" endpoint to get the list of
182-
# files for a specific task that a user has access to in another user's bucket.
181+
# S3 bucket. Sharing could be supported in the future by hitting the "GET task" endpoint to get
182+
# the list of files for a specific task.
183183
auth = Auth(api_request=request)
184184
user_id = await set_access_token_and_get_user_id(auth, request.headers)
185185
auth_verb = {"GET": "read", "HEAD": "read", "DELETE": "delete"}.get(

gen3workflow/routes/storage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
router = APIRouter(prefix="/storage")
1616

1717

18-
# TODO: remove the /storage/info path once CI has been updated to use /storage/setup
18+
# TODO: remove the /storage/info path once the CI and plugin use /storage/setup
1919
@router.get("/info", status_code=HTTP_200_OK)
2020
@router.get("/info/", status_code=HTTP_200_OK, include_in_schema=False)
2121
@router.get("/setup", status_code=HTTP_200_OK)
@@ -69,7 +69,7 @@ async def delete_user_bucket(request: Request, auth=Depends(Auth)) -> None:
6969
token_claims = await auth.get_token_claims()
7070
user_id = token_claims.get("sub")
7171
await auth.authorize(
72-
"delete", [f"/services/workflow/gen3-workflow/tasks/{user_id}"]
72+
"delete", [f"/services/workflow/gen3-workflow/storage/{user_id}"]
7373
)
7474
logger.info(f"User '{user_id}' deleting their storage bucket")
7575
deleted_bucket_name = aws_utils.cleanup_user_bucket(user_id, delete_bucket=True)
@@ -105,7 +105,7 @@ async def empty_user_bucket(request: Request, auth=Depends(Auth)) -> None:
105105
token_claims = await auth.get_token_claims()
106106
user_id = token_claims.get("sub")
107107
await auth.authorize(
108-
"delete", [f"/services/workflow/gen3-workflow/tasks/{user_id}"]
108+
"delete", [f"/services/workflow/gen3-workflow/storage/{user_id}"]
109109
)
110110
logger.info(f"User '{user_id}' emptying their storage bucket")
111111
deleted_bucket_name = aws_utils.cleanup_user_bucket(user_id)

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def mock_tes_server_request_function(
193193
"state": "COMPLETE",
194194
"logs": [{"system_logs": ["blah"]}],
195195
"tags": {
196-
"_AUTHZ": f"/services/workflow/gen3-workflow/tasks/OTHER_USER/TASK_ID_PLACEHOLDER"
196+
"_AUTHZ": "/services/workflow/gen3-workflow/tasks/OTHER_USER/TASK_ID_PLACEHOLDER"
197197
},
198198
},
199199
# test that the app can handle a task with no tags:

tests/test_misc.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def test_get_safe_name_from_hostname(reset_config_hostname):
9494
@pytest.mark.parametrize(
9595
"access_token_patcher", [{"user_id": NEW_TEST_USER_ID}], indirect=True
9696
)
97-
async def test_storage_info(
97+
async def test_storage_setup(
9898
client, access_token_patcher, mock_aws_services, trailing_slash
9999
):
100100
"""
@@ -313,6 +313,14 @@ async def test_delete_user_bucket(
313313
e.value.response.get("ResponseMetadata", {}).get("HTTPStatusCode") == 404
314314
), f"Bucket still exists: {e.value}"
315315

316+
# An authz check should have been made
317+
mock_arborist_request.assert_called_with(
318+
method="POST",
319+
path=f"/auth/request",
320+
body=f'{{"requests":[{{"resource":"/services/workflow/gen3-workflow/storage/{TEST_USER_ID}","action":{{"service":"gen3-workflow","method":"delete"}}}}],"user":{{"token":"{TEST_USER_TOKEN}"}}}}',
321+
authorized=client.authorized,
322+
)
323+
316324
# Attempt to Delete the bucket again, must receive a 404, since bucket not found.
317325
res = await client.delete(
318326
"/storage/user-bucket", headers={"Authorization": f"bearer {TEST_USER_TOKEN}"}

0 commit comments

Comments
 (0)