News for hackers. Stuff that matters.
Re:AWS Tagging Best Practices: Using Terraform and CloudForm... by wernerb on Wednesday September 02, 2020 @12:28PM (#24354814)
The problem is that all IAM conditionals just give a generic "Denied" statement which is hard to debug. You at left figuring out if you are missing a uppercase character in your tag key. AWS IAM is currently not meant to be used in a devops/enforcement of best practices way. They have AWS config for that, but that's always after the fact while immediate feedback is what you need to function at scale.

A possible fix is to allow custom deny reasons but large changes like this to any already extremely large and entangled system like IAM is unlikely.

Re:AWS Tagging Best Practices: Using Terraform and CloudForm... by whoknew1122 on Wednesday September 02, 2020 @12:38PM (#24354957)
> "A possible fix is to allow custom deny reasons but large changes like this to any already extremely large and entangled system like IAM is unlikely."

This would allow an attack to enumerate permissions by seeing what's denied.

Generic statements aren't a bug, they're a feature.

Re:AWS Tagging Best Practices: Using Terraform and CloudForm... by renewiltord on Wednesday September 02, 2020 @03:02PM (#24356604)
I feel like this is not a complex problem. You just ensure that someone has `iam:GetDetailedError`. Then you can turn it on for your role/user/whatever and if that doesn't work you can turn it on at the global level temporarily.

After all, if you think about it, if you are unable to determine that you're denying the person for the right reason, you could easily later allow them for the wrong reason.

e.g. A policy that's not meant to be applied to some IAM user is being applied to them but it's documented to be for a different purpose. When that purpose expires, you might remove that policy, and accidentally enable access. If you can get a trace of the denial then you know that it's for the right reasons.

Re:AWS Tagging Best Practices: Using Terraform and CloudForm... by Spivak on Wednesday September 02, 2020 @01:21PM (#24355456)
Yes, but what they're talking about isn't a security denial but a configuration check. Can you imagine if the only output to a git commit pre-hook was "no" and you were left to figure out why?
Re:AWS Tagging Best Practices: Using Terraform and CloudForm... by whoknew1122 on Wednesday September 02, 2020 @02:26PM (#24356179)
> "Yes, but what they're talking about isn't a security denial but a configuration check."

Configuration is a part of security though.

Let's say AWS credentials are leaked. One of the most common uses for leaked credentials is to launch EC2 instance for crypto mining. A malicious actor tries to launch RunInstances on $20k worth of instances and gets denied because there isn't a tag on the instances. Would you want the error to say 'Access denied because you didn't don't have the following tag...'?

Re:AWS Tagging Best Practices: Using Terraform and CloudForm... by Spivak on Wednesday September 02, 2020 @03:33PM (#24357028)
Yes, because lacking a tag isn't a security boundary. The account has permission to launch EC2 instances and knowing that instances need to have tags isn't a password designed to keep malicious actors out, it's a safeguard.