emgarten / Sleet

A static nuget feed generator for Azure Storage, AWS S3, and more.
MIT License
342 stars 41 forks source link

5.2.5 having s3 auth issues on yandex cloud #182

Closed zznty closed 5 days ago

zznty commented 6 months ago

hello, after upgrading to sleet 5.2.5 i'm unable to auth into a s3 bucket on yandex cloud with error:

[Amazon.S3.AmazonS3Exception] The request signature we calculated does not match the signature you provided. Check your key and signing method.

however forcing it to use 5.1.3 had the issue resolved for now.

sleet config:

- name: Push Nuget Package
  env:
    SLEET_FEED_TYPE: s3
    SLEET_FEED_PATH: https://nuget.storage.yandexcloud.net
    SLEET_FEED_BUCKETNAME: nuget
    SLEET_FEED_SERVICEURL: https://storage.yandexcloud.net
    SLEET_FEED_ACCESSKEYID: ${{ secrets.S3_KEY_ID }}
    SLEET_FEED_SECRETACCESSKEY: ${{ secrets.S3_KEY }}
  run: sleet push .
emgarten commented 6 months ago

Thanks for reporting this. The functional tests for S3 are passing. In 5.2.5 the AWS S3 SDK has been updated which could be contributing to this.

I'll see if I can get a repro of this.

emgarten commented 5 months ago

@zznty will you let me know if 5.2.6 solves this problem for you?

Digging into the error it looks like the AWS token dependency needed an update along with the S3 SDK.

I wasn't able to fully create a yandex account and get an S3 bucket setup to test this myself so if you could let me know I would appreciate it.

zznty commented 5 months ago

looks like the issue wasnt fixed. Im still getting the same exception. It could be a bug in either aws sdk or yandex object storage s3 api implementation. I dont have time to dig into it unfortunately.

emgarten commented 5 months ago

I'll reopen this to track the issue

kutep0v commented 1 week ago

@emgarten, can be fixed by updating AWSSDK.S3 to 3.7.307.1 or higher, at least it works with the Selectel cloud. This requires replacing obsolete ECSTaskCredentials with GenericContainerCredentials, but I'm not sure how to properly change the statement above (src/SleetLib/FileSystem/FileSystemFactory.cs:186)

emgarten commented 1 week ago

@emgarten, can be fixed by updating AWSSDK.S3 to 3.7.307.1 or higher, at least it works with the Selectel cloud. This requires replacing obsolete ECSTaskCredentials with GenericContainerCredentials, but I'm not sure how to properly change the statement above (src/SleetLib/FileSystem/FileSystemFactory.cs:186)

Thanks for pointing this out. I'll update the AWS packages: https://github.com/emgarten/Sleet/pull/199

emgarten commented 6 days ago

@zznty @kutep0v try the latest version and let me know if this fixes things for you: https://www.nuget.org/packages/Sleet/6.1.0

kutep0v commented 6 days ago

@emgarten, works fine with yandex cloud and selectel.