AWS Permission Boundaries for Dummies
firemon.com
firemon.com
Usually, the best way to learn is by experimentation. But with security, your "experiments" might leave you exposed. Or at least, leave your system in some nonstandard state, making it even harder to figure out what the correct route was supposed to be.
It's why I've been happy to use things like netlify. They may not scale, but at least it feels like I can get a project up without it becoming an ordeal of opening permissions.
It's not my main line of work, and as you say, I imagine I would figure it out if I did it consistently for a bit. But every time I start a side project using AWS, IAM scares me off.
You now have full permissions to servers, storage and anything else created under that group without me having to enumerate them. If I want to create a new blob store under that group, you already have access without me having to edit iam. I can still make granular permissions where suitable.
Azure makes the path to having all console users require mfa much simpler too.
AWS IAM does have resource condition keys which allow matching resources by account, org, org path, and tag. Resources in a Cloudformation stack would be automatically tagged, for example.
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_p...
Every time I need to do something IAM related that's beyond the obvious, I find that I have forgotten everything I learned and thought I hammered into my head the last time...
I find reading AWS documentation on the subject almost unbearably tedious, so I need to go and re-read tutorials and re-watch videos. Coincidentally, this is what I am doing again this morning!
1. Specify your infrastructure as code, doesn't matter what tool; can be bash for all it matters. But no manual changes to your AWS account(s).
2. Monorepo your company's app(s) and the IaC together. Obviously allow them to be deployed independently but make it so it's not a huge PITA to make a code change with a corresponding infra change in a single PR.
3. Require reviews from someone with infra experience to check MRs that change infra and use that as an opportunity to narrow permissions.
If there are so many infra changes that your ops team is overwhelmed reviewing PRs then your permissions are too narrow.
But IMO permission boundaries still have a place in certain cases.
If you allow SREs to login and poke around in the accounts, what will stop them from creating policies in ad hoc way?
Yes you can make RO roles but these don’t always work the way they are advertised.
But I totally agree with your approach otherwise and that’s a winner setup for us as well on several projects.
The thing rolling out changes to your infra once merged is god. Boundaries don’t do anything in this model because “asking for the permission boundary to be changed so I can make X change” is the same as “ask to make X change.” Both require approval of the same people.
Once you graduate to polytheism is when you need boundaries.
regarding the frustrations with size limits: I feel the same about so many of the constraints in AWS IAM. Also on my gripe list: Using raw JSON to specify policy rather than a better DSL for expressing complex logic. Trying to get certain conditions properly specified can be a mind bender with the syntax provided, or be downright impossible.
RAM is getting there, but I tried this pattern again recently and ran headfirst into the problem of not being able to easily share a R53 zone between accounts without it descending into a mess of assume-role.
I’m sold on the simplicity of small team accounts rather than larger accounts with complicated IAM policy though.
That's just a permission boundary in AWS.
https://docs.aws.amazon.com/IAM/latest/UserGuide/access_poli...