flexera-public / right_aws

RightScale Amazon Web Services Ruby Gems
MIT License
451 stars 175 forks source link

Support IAM security tokens #175

Open jhmartin opened 10 years ago

jhmartin commented 10 years ago

Consider supporting temporary credentials as supplied by the IAM Instance Role functionality. This requires passing an additional Security Token field to the API: http://docs.aws.amazon.com/STS/latest/UsingSTS/using-temp-creds.html

zuazo commented 10 years ago

AFAIK this old PR implements this feature: https://github.com/rightscale/right_aws/pull/160 (still not merged)

gerner commented 10 years ago

any updates on this? or is this actually supported somehow?

gerner commented 10 years ago

That PR only adds support for SNS and SQS. S3 (at least) is still missing.

It looks like there's at least some work to start integrating the token: https://github.com/rightscale/right_aws/blob/master/lib/awsbase/right_awsbase.rb#L451

It seems that it hasn't made it's way elsewhere: https://github.com/rightscale/right_aws/blob/master/lib/awsbase/right_awsbase.rb#L439-L440

I would expect something along the lines of: https://gist.github.com/gerner/3ed730d4b1c2846e725c#file-instance_creds-rb-L14

Obviously, this gist is a terrible monkey patch. But you could imagine a more appropriate fix in the actual code.

zuazo commented 10 years ago

You are right. S3 token support is missing in my PR. I did not realize that, sorry. But anyway, it's not merged.