spotify / XCRemoteCache

Other
827 stars 50 forks source link

Integrate AWS Temporary Access Keys #111

Closed devMEremenko closed 2 years ago

devMEremenko commented 2 years ago

Hi XCRemoteCache Team!

I've added support for AWS Temporary Access Keys by supplementing the .rcinfo file with the new aws_security_token parameter.

This change allows using temporary security credentials instead of static keys, which may not be permitted for security reasons.

Integration

Use aws_security_token combined with aws_secret_key, aws_access_key to set everything up.
This page describes receiving a security token.

# First, generate a token using the following command.
TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"`

# Then, use the token to generate top-level metadata items using the following command
curl -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/

AWS Temporary Access Keys is an alternative authorization method, not a substitution for static keys.

Let me know if you have any questions 🙂