Hologram: taking EC2 Instance Roles everywhere
tech.adroll.com
tech.adroll.com
Our use case is running packer[0], which requires a large IAM profile[1], without needing to create a separate account for AMI creation. It would be awesome to issue credentials that limited Security Group creation/deletion, Instance Creation/Termination, etc to a single, VPC.
[0]: https://www.packer.io/ [1]: https://www.packer.io/docs/builders/amazon.html
MFA requires you to authenticate using both your AWS keys and your MFA device. In other words, an attacker who gains access to your laptop won't gain access to AWS. They'd have to get access to your phone or keyfob too.
When writing your IAM policies, you can require that users authenticate with MFA before they can perfom an action. For example, with a policy of
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "ec2:Describe*",
"Resource": "*"
}]
}
a user can list EC2 instances using their keys. If we add this to the statement "Condition": {"Null": {"aws:MultiFactorAuthAge": false}}
they cannot. Instead, first they have to use their keys and their MFA device to request temporary keys from Amazon's STS. Then they can use their temporary keys to list instances until those keys expire, after which they have to authenticate again to get new ones.You shouldn't have to modify existing programs to work with STS. Instead, take out any explicit authorization code, just like you would do to use IAM roles. Then, wrap invocations of the programs with a tool that talks to STS and configures your environment. I've written one in ruby [1], and it should be easy to reimplement if you prefer another language.
Hopefully Hologram can add support for multi-factor authentication in a future release. Right now, it looks like stealing someone's ssh key is all it would take to get access to AWS.
[0] http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Managi...
I know you can put anything into LDAP, but why treat it like a metadata service? Wouldn't it make more sense to store keys in something like etcd so they're accessible via simple REST api calls? In my experience, the less LDAP does, the happier everyone seems to be.
The GitHub API to list a user's keys doesn't require OAuth or any kind of hoop-jumping: https://api.github.com/users/mdaniel/keys
But then again, if your org is large enough to have LDAP set up, getting LDAP policies changed to support something like hologram would generally be a non-starter in my experience.
In large enterprises, the LDAP service is a core security service that is rarely if ever modified except for periodic maintenance and upgrades.
Messing up the LDAP service for any reason will compromise or disable all authentication company-wide. It's not fun when the CEO comes over and says that his wifi and email logins aren't working anymore...
Not even close to full-featured, but anyway, here's a link for those who are interested: https://github.com/balanced-ops/docker-host/tree/master/iamp...
I think there's a large gap still to be filled with IAM Roles. Hope to see AWS invest more resources into this.
This service is separate from whatever the developer is working on that needs to call to it. If the work in progress exposes temporary credentials it's not the end of the world.
The hologram agent that runs on your laptop, and could potentially be exposed in a cafe, attaches to lo0, so there's no way somebody on your coffee shop wifi could get the creds.
We've had a couple of requests internally for a server-oriented agent, and it's something we want to investigate eventually. I'll make a Github issue for it and at least we can have a conversation.