I've been stuck on this same 400 error for almost a week; if anyone can help I will be thrilled.
In the product I'm working with, there are two APIs. Call one API Joe and the other one Sean. So, Joe the API can already do the thing I'm trying to implement in Sean, which is having a route like /users/:user_guid/:date/files/:file_guid
that pulls down files from Ceph. The files are stored in a bucket owned by a third service, but both Joe and Sean have been granted read permission.
So both Joe and Sean are using information in the route to construct a GET request to Ceph. They are also drawing from cephrgw.yml
files to get a personalized secret access key for authentication.
The Ceph logs show the two APIs' requests being the same (when I request the same file) except for their personalized secret access key... but Joe gets a 200 and returns the file while Sean gets the mysterious 400 Bad Request without other specification. This led me to believe it was an authentication issue BUT here's the thing: If I comment out Joe's cephrgw.yml
file and replace it with Sean's--so now Joe has Sean's secret access key and the GET requests are absolutely identical--Joe still gets a 200.
The logs show no difference between the requests but I'm getting a different result. I'm stumped. What could cause a 400 Bad Request from Ceph that wouldn't influence the GET URL?
Edit: this could be of use too. When I send the request from Sean in postman, I get back a 200 in Sean's logs; rails says everything went just fine since it successfully sent the request. But I get the 400 in Ceph and a weird xml error in postman that looks like this (blanks are names removed):
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>InvalidArgument</Code>
<RequestId>tx000000000000000019efd-006116fe6d-1879_____</RequestId>
<HostId>1879_______</HostId>
</Error>