-
Notifications
You must be signed in to change notification settings - Fork 3
Added support for assuming administrator roles. #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This is towards supporting https://github.com/99designs/aws-vault with mfa on assume-role and removing admin privileges from aws keys, loosely based on https://github.com/cloudposse/terraform-aws-iam-assumed-roles/blob/master/main.tf. Needs a sanity check before deploying, but it's only adding roles atm so _should_ be safe?
This looks great - I much prefer the assume-role setup from a security perspective (that's what we use at work). I'd say go ahead and do the apply of this on your end so we get a confirmation that everything works there. Also, as a general note: if you need to do any iterative development (i.e. multiple
That's pretty much what I did with the DNS stuff... sometimes unfortunately it takes a couple revs to get this stuff right as there's not a great way to test without having a separate dev environment or the like. |
I was actually going to suggest we move to S3 backed state which will mitigate the need for a bunch of commits / act as a mutex for changes, but the approach sounds roughly good to me ^_^ |
hmm, not yet working as expected, now to work out why ^_^ Added to
I can't see a policy attached to the |
I agree 1000%, I definitely want this. Created #8. |
Just tried as well and no luck. One thing I noticed - the policy attached to "Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::537658973298:role/assume-admin" Isn't that kind of circular? I.e. should the policy for the role {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "*",
"Resource": "*"
}
]
} The |
Hmm yeah that does seem circular, I must have missed something in that example. |
Havent had a chance to look yet but https://github.com/duckalini/my_first_terraform (released at our con yesterday ^_^) has examples of assume role use that might help. |
Ping from triage:I am a bit lost for tracking this PR. we have one approve but more commit behind. Do we still need a review ? |
@mathk I flipped back to needing a review and added the "waiting on author" tag - @ryankurte has some issues with the in-process changes that he's trying to resolve. |
This should support https://github.com/99designs/aws-vault with mfa on assume-role and is towards removing admin privileges from base aws keys.
Implementation loosely based on https://github.com/cloudposse/terraform-aws-iam-assumed-roles/blob/master/main.tf.
Needs a sanity check before deploying, but it's only adding roles atm so should be safe?
plan: