News for hackers. Stuff that matters.
Re:HashiCorp Did It Backwards by izalutski on Tuesday September 05, 2023 @06:30PM (#37398698)
Yep, backwards they did

(Disclosure: I'm from Digger and OpenTF so am biased)

Hashi's biggest miscalculation is that they put Terraform (an open language / ecosystem) into the same bucket as Vault and Consul, which are hostable backend applications.

BSL makes sense for Vault, just like it does for MongoDB. It is reasonable to prevent others from charging for hosting your code.

But with Terraform, the backend part (TF Cloud) was never even open source. And it's not required for Terraform to work.

Hashi shot themselves in the foot. Unlike with Vault or Consul, there is enormous vested interest in the community to keep Terraform truly open. Hashi trying to enforce everyone to use their non-oss backend with it will only result in Hashi losing the privileged (and well deserved) position among providers of commercial products in the Terraform ecosystem.

Re:HashiCorp Did It Backwards by galenmarchetti on Tuesday September 05, 2023 @06:39PM (#37398779)
this is a great point. I've been following your work decently closely but this is the first time I thought about the "hostable" vs "non-hostable" differentiation. And thinking more deeply on it, of course it matters. There's a pretty big distinction and, naively, perhaps their attempt to protect TF Cloud with this doesn't even accomplish what they intended for it to accomplish. If the backend part is the thing...that was never even in contention, anyway. If this is the case, they only managed to hurt the community.
Re:HashiCorp Did It Backwards by erik_seaberg on Tuesday September 05, 2023 @07:03PM (#37399013)
Architecturally, I think Terraform really ought to be hosted, because otherwise you have to trust everyone with a far-reaching admin cred on his desktop right next to Zoom and maybe BonziBuddy.
Re:HashiCorp Did It Backwards by nightfly on Tuesday September 05, 2023 @07:40PM (#37399357)
Not if you use "bastion" type hosts, right?
Re:HashiCorp Did It Backwards by nijave on Tuesday September 05, 2023 @08:05PM (#37399578)
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.

Re:HashiCorp Did It Backwards by foota on Tuesday September 05, 2023 @08:34PM (#37399825)
Ideally, wouldn't your configuration be checked in and only executed by a runner of some kind?
Re:HashiCorp Did It Backwards by erik_seaberg on Tuesday September 05, 2023 @08:55PM (#37399989)
That’s pretty close to what I meant by hosted Terraform.
Re:HashiCorp Did It Backwards by nijave on Wednesday September 06, 2023 @07:20AM (#37403573)
Yup
Re:HashiCorp Did It Backwards by ArchOversight on Tuesday September 05, 2023 @08:32PM (#37399811)
Don't grant privileges to users that should not have those privileges?

The gating here is at the cloud level...

Re:HashiCorp Did It Backwards by wingmanjd on Tuesday September 05, 2023 @07:33PM (#37399289)
A small counterpoint:

My $DAYJOB's architecture is completely self-hosted (Proxmox, Nomad, etc). I would not prefer to have some external tool managing that infrastructure.

Re:HashiCorp Did It Backwards by jolux on Tuesday September 05, 2023 @07:48PM (#37399430)
Or you can give people enough permissions to plan but not apply and leave applying to a restricted set of users...
Re:HashiCorp Did It Backwards by quickthrower2 on Tuesday September 05, 2023 @08:14PM (#37399642)
Also you can have laboratory cloud subscriptions seperate from production, where devs have full permissions.
Re:HashiCorp Did It Backwards by nijave on Wednesday September 06, 2023 @07:06AM (#37403495)
That's tricky since the state file frequently contains secrets. You can try to keep secrets out of the state file but that's largely provider/resource dependent. For instance, if you create an AWS RDS Postgres database, the state ends up containing the resource password. If you allow only plans, users can still access the password in the state file.
Re:HashiCorp Did It Backwards by joombaga on Wednesday September 06, 2023 @11:24AM (#37406503)
For RDS you can change the password after creating the DB, or use the SecretsManager integration. There are similar workarounds for other providers and resources. I use TF without storing secrets in the state file (providers: AWS, kubernetes, helm, onepassword, datadog, auth0, and more).
Re:HashiCorp Did It Backwards by macca321 on Thursday September 07, 2023 @08:23AM (#37417895)
You can exfiltrate secrets that aren't in the state, but are in accessible resources during a plan using an http data source with the secret encoded into the url
Re:HashiCorp Did It Backwards by notnmeyer on Tuesday September 05, 2023 @09:55PM (#37400503)
stuff like Atlantis exists. it doesn’t eliminate the need for someone/something to have wide permissions, but you definitely can narrow who/what has that access day to day.
Re:HashiCorp Did It Backwards by jillesvangurp on Wednesday September 06, 2023 @02:39AM (#37401954)
It's a repeat of what Elasticsearch did to their community. Basically, their product got forked (Opensearch) and the fork is now popular. Result: access denied on a sizable percentage of new users that start off using the fork and will likely never transition to the closed source thing.

As a sales strategy it's dumb. I see this as an Elasticsearch/Opensearch consultant. A lot of people reaching out to me for help with that, seem to now default to starting with opensource, i.e. Opensearch. And since a lot of them are in Amazon (who created the fork) they make that really easy. Those are people who will likely never become Elastic customers.

The same will happen with Teraform. Many new users will default to the open fork. A lot of existing users might migrate to that.

There are some other examples:

- Oracle lost control of Hudson when it became Jenkins. Hudson is now a footnote in history.

- Likewise with OpenOffice, which now rots away at the Apache Foundation. LibreOffice is the main product now.

Re:HashiCorp Did It Backwards by okeuro49 on Wednesday September 06, 2023 @03:29AM (#37402251)
> It's a repeat of what Elasticsearch did to their community.

Not exactly the same as I understand. Amazon were providing Elasticsearch as a service with nothing in return. Fair enough (although there did seem to be some issues about alleged ripping off code and trademark infringement).

However as Elasticsearch needed to remain a viable business, they changed the licence.

https://www.elastic.co/blog/why-license-change-aws

Re:HashiCorp Did It Backwards by loosescrews on Wednesday September 06, 2023 @02:40AM (#37401960)
I didn't know that any serious non-Hashicorp backends for Terraform existed before this scandal and I wouldn't have considered anything other than Terraform Cloud. The scandal has soured me on Hashicorp and made me aware of the alternatives. I doubt I'm the only one.
Re:HashiCorp Did It Backwards by benterix on Wednesday September 06, 2023 @03:06AM (#37402107)
If you are on AWS, there is little reason not to use the S3 backend. If Hashicorp insisted on using their backend only, they would be as popular as Pulumi now (which will be another player to gain from this battle).
Re:HashiCorp Did It Backwards by hhh on Wednesday September 06, 2023 @05:48AM (#37403071)
Pulumi are running ads on Twitter already about how they’ll never change their license.