miquella / vaulted

Spawning and storage of secure environments
MIT License
254 stars 30 forks source link

Add AWS region support #149

Closed miquella closed 5 years ago

miquella commented 5 years ago

This PR adds the ability to specify a region in the vault itself or on the CLI via the --region … flag. Thankfully, the AWS SDK handles most of the heavy lifting as long as the region is specified (including selecting the correct partition and endpoints).

Unfortunately, the standard partition defaults to using the global STS endpoint rather than respecting the region specification, so a custom resolver had to be implemented to select region-local endpoints. However, the global STS endpoint is still used if no region is specified.

To help smooth over the user experience, the session cache has been upgraded to be able to cache sessions from multiple different variations of a vault. (i.e. different regions or similar)

miquella commented 5 years ago

This should cover #142 as well.

miquella commented 5 years ago

Latest patchset corrects an issue with the endpoint resolver in the case that no region is provided.