Hacker News new | ask | show | jobs
by nightfly 1020 days ago
Not if you use "bastion" type hosts, right?
1 comments

Same issue. Terraform doesn't separate invoker permissions from runtime permissions. It runs with whatever privileges the invoker provides and since it's doing arbitrary privileged things it generally runs with arbitrary privileges.

The only real fix is to run it in a client-server model like a web app where the user has limited permissions and the server gates access to the privileged backend permissions.

Put another way, if I want to create an S3 bucket on AWS, I need S3 CreateBucket privileges, not "run Terraform" privileges.

Ideally, wouldn't your configuration be checked in and only executed by a runner of some kind?
That’s pretty close to what I meant by hosted Terraform.
Yup
Don't grant privileges to users that should not have those privileges?

The gating here is at the cloud level...