S3 - Use credentials from environment variables

Advertisement

ed
Guest

S3 - Use credentials from environment variables

Rather than rely on hardcoded credentials, it would be excellent if WinSCP supported credentials stored in the default AWS environment variables:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
34,943
Location:
Prague, Czechia

Re: S3 - Use credentials from environment variables

Thanks for your suggestion.
We will see, if more people ask for this.

Reply with quote

geo590
Joined:
Posts:
1
Location:
Akron, OH

Re: S3 - Use credentials from environment variables

The AWS CLI stores user credentials in a file and it would be ideal if that same file could be used to authenticate to S3 in WinSCP.

The file is located at C:\Users\<Username>\.aws\credentials Here's a link to the documentation:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html

The file is plain text and contains the access key, secret access key, and session token (only needed for temporary credentials). You can have 1 or more profiles in the file identified by a name enclosed in []. See example below.

It would be awesome to have an option just enter the profile name (i.e. abc) in the S3 settings that will reference the corresponding keys in the credential file.

Thanks for your consideration!
[default]
aws_access_key_id=xxx
aws_secret_access_key=xxx
 
[abc]
aws_access_key_id=xxx
aws_secret_access_key=xxx
aws_session_token="xxx"

Reply with quote

martin
Site Admin
martin avatar

Re: S3 - Use credentials from environment variables

geo590 wrote:

The AWS CLI stores user credentials in a file and it would be ideal if that same file could be used to authenticate to S3 in WinSCP.
Thanks for this suggestion too. We will see what other users prefer.

Reply with quote

lewellej
Joined:
Posts:
1

Re: S3 - Use credentials from environment variables

I would strongly request this. I used winscp for years, but had to switch to cyberduck when our company went to this scheme for AWS credentials. I don't like cyberduck as well, but it does support this.
If you do implement this, best to have some kind of "Refresh" (credentials) button available, as the session token for us expires after 12 hours. Hopefully could continue to use same winscp session beyond life of one token, rather than having to close/restart.

Last edited by lewellej on 2021-01-08 19:15; edited 1 time in total

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
34,943
Location:
Prague, Czechia

Re: S3 - Use credentials from environment variables

This request has been added to the tracker:
https://winscp.net/tracker/1941

I'll send an email with a development version of WinSCP to both of you shortly. [Done]

Reply with quote

Advertisement

You can post new topics in this forum