clowd / Clowd.Squirrel

Quick and easy installer and automatic updates for cross-platform dotnet applications
427 stars 39 forks source link

Add support for AWS SSO sessions #194

Closed smokeballdb closed 8 months ago

smokeballdb commented 9 months ago

Adds a --session option to support S3 operations using a session token from an AWS SSO profile

caesay commented 9 months ago

Hi, thanks for this. Can you explain how to set up and create one of these session tokens? I'm going to be re-writing the docs soon and this would be good to have.

smokeballdb commented 9 months ago

Thanks for the quick response.

Here is more information on retreiving a session token for an IAM user or aws account. https://docs.aws.amazon.com/STS/latest/APIReference/API_GetSessionToken.html

We use SSO to log in to Amazon and the access key id, secret and session are provided automatically on the aws hosted page.

smokeballdb commented 9 months ago

I've added another commit which makes the key id / key optional. By only specifying the region in the AmazonS3Client, it will load credentials from the default profile. This enables use cases such as a build agent running on EC2.