New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3 PHP SDK using X-Amz-Expires results in "Request has expired" error #6111
Comments
@atrauzzi One scenario where this can happen is that the clock on the client and the server is not in sync, which would explain why increasing the expire time helps in your case. You can try a command similar to the following using mc and see if it works
I have set an expiry time of 5 seconds. The s3 alias used here is Please let us know how it goes |
The server and client are both running on the same machine in my case. |
@atrauzzi The docker container and the host machine are out of sync which is causing this issue. Can you please run |
Related? docker/for-mac#2076 |
@atrauzzi There is definitely a time sync issue between the client and the server. In this case, it is the host machine and the docker container. If you can make sure that there is no time difference, you will not see this issue anymore. We will also make sure that there is allowed skew between the client and the server. |
Sounds good! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Expected Behavior
Download of the file should commence within the time period specified.
Current Behavior
Minio is serving the following response:
Possible Solution
If we look at the code I'm using:
And then if we look at the URI sent back by minio to the SDK:
... you can see
X-Amz-Expires=5
, which I'm not sure is correct? Hard to say as nothing really outlines what kind of values should go in here. Of note is that if I increase the number of seconds in my code above up to 100, the download works.This leaves me with the suspicion that somehow, minio is receiving the correct timestamp from the SDK, but the URI it sends back is either not correct, or it isn't interpreting the URI it sends back correctly. Rather than seconds, it might now be thinking it's milliseconds?
Steps to Reproduce (for bugs)
All that's necessary is to use the AWS PHP SDK to generate a signed URI with a time limit against minio.
Context
I would like to avoid streaming bytes directly from my worker nodes, so I am looking to facilitate a short window in which I can generate redirects to timed URIs against storage.
Your Environment
minio version
): Latest dockeruname -a
): UbuntuThe text was updated successfully, but these errors were encountered: