How to give access to AWS resources without creating 100s of IAM Users?
blog.rajanpanchal.net
blog.rajanpanchal.net
Federate users to AWS using SAML https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_pr...
It’s basically a little mini-nightmare, at least when integrating it into G Suite. Burns a big chunk of a day.
It's a lot easier now though and especially now that I understand how it all works.
There may be a few others like One Login where this is their entire business like Okta that are also good, I don't have experience with any others.
So much so that we don't bother with Okta there. The Okta logins are the G Suite emails anyway.
The aws-vault project recently added support for AssumeRoleWithWebIdentity making it cheap to issue yourself disposable credentials: https://github.com/99designs/aws-vault/blob/v6.0.0-beta9/USA... including launching AWS Console links for those Roles: https://github.com/99designs/aws-vault/blob/v6.0.0-beta9/USA...
Kind of speaking to the blog post's intention, I actually don't have any IAM Users in my AWS account
edit: apparently aws sso assists here!
However, it does require some understanding, standardization, and general competence from those around you as well.
I read the article and wondered why they don’t simply grant object access to a group of users using their existing identity, but I’m not as familiar with AWS as I am with GCP.
very happy to see work on this front!!
Which sucks. We've had to write our own tooling, and you even need to use an extension like this[1] :(
1. https://chrome.google.com/webstore/detail/saml-to-aws-sts-ke...
I want to minimize the total number of accounts with AWS access, since a configuration error can expose so much.
Now if I could just find something that acts like selinux in permissive logging mode so I can grant : to something in a dev environment run the thing I need to write a policy for and have it log every permission needed to run the thing I just ran. Would simplify policy writing a ton.
1. Entirely separate accounts for each stage, and, past dev, all stages are identical.
2. Include a beta stage that doesn't have crap developers set up and forgot. Consider not even giving devs write access to it.
3. Deploy all infrastructure from code via cloudformation or terraform. If you have to use scripts, include deletion logic.
4. Enable cloud custodian to chase down untagged resources. Run it aggressively in dev and beta so it doesn't break prod.
5. Deploy code via artifacts so rolling back is trivial.
6. Integ tests to prove your least privileges IAM roles, routing, security groups, etc. are sufficient.
7. Use CloudTrail and flow logs to prove components still need that access.
8. Load testing in beta to find all the AWS limits before you find them in prod. (Especially, load test any blue/green deployments!)
9. Kill alarm spam with fire. If there's a remedy, automate fixing it. If it's not a real problem, make it a metric. Review your metrics.
10. Figure out where your state (e.g. database) lives and doesn't (which should be most components), and the architecture to make your application resilient should become clear.
And a bonus: You have total control over your AWS environment. Rather than deploying pages of configuration, structure your services so they are configured by convention or introspection[1] as much as possible.
[1]: e.g. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-inst...
Or use iamy model and create users with no rights in a completely separate account. Then grant them AssumeRole on other roles/accounts as needed.
[1] https://summitroute.com/downloads/aws_security_maturity_road... [2] https://aws.amazon.com/blogs/security/aws-foundational-secur...
Scott Piper is the definitive AWS security expert, and this is a guide he publishes and maintains. I'd also suggest following him on Twitter, I learn a lot just from his idle tweets.
More info here: https://www.okta.com/blog/2020/05/how-okta-aws-sso-simplifie...