While setting up a Token Vending Machine is well documented, I am having a hard time finding sample code for requesting temporary credentials using Ruby (on Rails).
How would one go about interacting with the TVM using Ruby (on Rails)? Is there any sample code that lays out the process of making a request to a TVM and obtaining temporary credentials to access the various AWS services?
Bart: after a bit of digging, I found the following link for AWS with Ruby: Getting Started. This link is a bit of a walk-through for getting set up, and contains some example code to demonstrate how to authenticate and such.
You can also refer to the AWS SDK for Ruby, which has code examples, browse the GitHub Source Code Repository for the SDK, and check out the Ruby AWS Developer Center, Ruby AWS Developer Forums, and Ruby AWS FAQs.
I would also familiarize myself with the AWS SDK API Reference which is an invaluable reference guide for doing exactly what you’re looking for.
EDIT: A few more resources:
You might take a look at the following file: TokenVendingMachinePolicy.json which contains a configuration to be used in conjunction with the AWS TVM process. While this file is used by a Java project, the JSON should be re-usable for your purposes.
You may also get some headway by taking a look at the rest of the code (while written in Java) which utilizes that file.
The major pieces appear to be:
If you start with these 3 files, I think you should be able to make some headway in translation to Ruby.