Skip to content
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

All Rejected after updating AwsSdk.S3 library #240

Open
JirHan opened this issue Jan 3, 2024 · 6 comments
Open

All Rejected after updating AwsSdk.S3 library #240

JirHan opened this issue Jan 3, 2024 · 6 comments

Comments

@JirHan
Copy link

JirHan commented Jan 3, 2024

I recently updated AwsSdk.S3 nuget (.NET) from 3.7.304.7 to 3.7.304.8 and s3ninja started to reject all requests done to the a bucket (credentials unchanged, any other code unchanged as well). I am getting following error:
"The computed request signature does not match the one provided. Check login credentials. (Expected: abc, Found: def)"

I was trying to track down the issue and changes in the AwsSdk.S3 nuget but I wasn't able to find any obvious change. Actually the only change seems to be in the construction of the User-Agent header, however I wasn't able to locate any possible effect in the s3ninja source.

@kubalunacek
Copy link

I have a same issue :-(

@jakobvogel
Copy link
Member

Hi, thanks for reporting this. Could you please provide a repository link with a minimal example?

@JirHan
Copy link
Author

JirHan commented Jan 9, 2024

Hey Jakob, this is the minimal example, that works with AwsSdk.S3 nuget 3.7.304.7, but not with 3.7.304.8

try
{
    var uploadRequest = new TransferUtilityUploadRequest()
    {
        InputStream = new MemoryStream(data),
        Key = path,
        BucketName = "test-bucket",
        CannedACL = S3CannedACL.NoACL,
    };

    var config = new AmazonS3Config { ServiceURL = "http://127.0.0.1:29000/s3" };
    using (var client = new AmazonS3Client("AKIAIOSFODNN7EXAMPLE", "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", config))
    {
        using (var transferUtility = new TransferUtility(client))
        {
            await transferUtility.UploadAsync(uploadRequest);
        }
    }
}
catch (Exception ex)
{
    throw ex;
}

@jakobvogel
Copy link
Member

Thank you very much! However, could you please provide an entire repository complete with project files that contain the dependencies and instructions about how to switch between the versions? You know, I don't usually work with .NET. In fact, I did not for more than a decade, and most of my software development takes place on a Mac where .NET is not quite the most prominent environment. 😉 I am sure I could figure out myself how to set everything up to run your sample, but I am seriously lacking the time to do that. So, I would really need a repository that I can check out, please. If I can run that on my Mac, I can have a look at what goes wrong on our side. (Or ask a colleague who happens to own a PC.)

@ScottPierce
Copy link

I'm seeing this issue as well on bun.

If I use the latest npm package I get the issue:

SignatureDoesNotMatch: The computed request signature does not match the one provided. Check login credentials. (Expected: 4fc38e738a41b35ef5f59e42fa74f0efefa8e2b309ef17cf0ba8011e96dbeedb, Found: 30a018794d6dff4baf1ed4d081cf0cebf143afaf09320259163303f7f92fab6a)
"@aws-sdk/client-s3": "^3.540.0",

But by downgrading to 3.362.0 it starts working. I don't know exactly which version it starts working on. I tried a version from 4 months ago and it still didn't work, so I grabbed something that was ~1 year old, and it's working fine.

"@aws-sdk/client-s3": "3.362.0",

@jakobvogel I have a repository I can share with you privately if you like.

@kubalunacek
Copy link

We had to switch to another project - https://github.com/Robothy/local-s3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants