Return meaningful error when requesting the S3 API without auth #162

Closed
opened 2021-11-26 09:42:44 +00:00 by quentin · 0 comments
Owner

We do not support requesting the S3 API without authentication but it is supported by Amazon and Minio. When we do it on Garage, the following cryptic error is returned:

Bad request: X-Amz-Algorithm not found in query parameters

This error comes from this code: https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/api/signature.rs#L167-L170

We should probably handle the absence of signature as a special case, then in the api_server.rs check against this specific error, and for know, simply return a 403 forbidden.

In the future, we might have a more complex permission system that allow unauthenticated requests to be handled on the API.

We do not support requesting the S3 API without authentication but it is supported by Amazon and Minio. When we do it on Garage, the following cryptic error is returned: ``` Bad request: X-Amz-Algorithm not found in query parameters ``` This error comes from this code: https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/api/signature.rs#L167-L170 We should probably handle the absence of signature as a special case, then in the api_server.rs check against this specific error, and for know, simply return a 403 forbidden. In the future, we might have a more complex permission system that allow unauthenticated requests to be handled on the API.
quentin added the
action
for-newcomers
scope
s3-api
labels 2021-11-26 09:42:44 +00:00
lx closed this issue 2022-01-18 11:22:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#162
No description provided.