Return 400 bad request for non implemented API #161
Labels
No labels
action
check-aws
action
discussion-needed
action
for-external-contributors
action
for-newcomers
action
more-info-needed
action
need-funding
action
triage-required
kind
correctness
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
background-healing
scope
build
scope
documentation
scope
k8s
scope
layout
scope
metadata
scope
ops
scope
rpc
scope
s3-api
scope
security
scope
telemetry
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#161
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In the doc we say:
But in fact, in many cases we are returning a
200 OK
or404 Not Found
with confusing data.For example, currently we have this logic for request on keys:
Once we will have implemented
ListPart
, wewill have the following logic:So currently, we wrongly forward ListPart to GetObject without any idea on how it will handle the request, and this pattern is true for most of the non-implemented endpoints.
Instead, if we want proper 400 bad requests, we should list all the S3 endpoints and add an error entry. For
ListPart
, we would add:Ideally, we would also update the doc with the full list of S3 endpoints.
I think to this page: https://garagehq.deuxfleurs.fr/reference_manual/s3_compatibility.html
How to quickly generate a list of all S3 endpoints:
The result is 96 endpoints (for now, we support ~16):
I believe
WriteGetObjectResponse
should be excluded from the list.Every endpoints except for
WriteGetObjectResponse
andListBuckets
uses the following header:Host: Bucket.s3.amazonaws.com
(but mentionningBucket.s3.<Region>.amazonaws.com
instead in examples)ListBuckets
does not use this header because it is the only endpoint not related to a specific bucket.WriteGetObjectResponse
on the other hand, use this header:Host: <RequestRoute>.s3-object-lambda.<Region>.amazonaws.com
(notice "s3-object-lambda" instead of "s3")I'm not sure to understand exactly what this endpoint does (post-processing Get requests if my understanding is right), but it seems more related to Amazon lambdas and their integration with S3, than S3 itself.
I also fail to see any difference between
GetBucketNotification
andGetBucketNotificationConfiguration
, which makes me thing the former is not deprecated as much as it has been renamed to the latter, and could be excluded too.Same goes for
PutBucketNotification
andPutBucketNotificationConfiguration
,GetBucketLifecycle
andGetBucketLifecycleConfiguration
, andPutBucketLifecycle
andPutBucketLifecycleConfiguration
.