pulumi / pulumi

Pulumi - Infrastructure as Code in any programming language 🚀
https://www.pulumi.com
Apache License 2.0
21.93k stars 1.13k forks source link

[feat] add AGE Secrets Provider #11493

Open cr1cr1 opened 2 years ago

cr1cr1 commented 2 years ago

Hello!

Issue details

I would like to try and implement this feature myself, as I believe is not very difficult to do.

Affected area/feature

PraveenNanda124 commented 2 years ago

Good issue

Frassle commented 2 years ago

What fortuitous timing! I was literally yesterday thinking about how we could move our secret providers to a one of our plugin interfaces. Both to help with some internal build dependencies (The actually pulumi engine executable wouldn't have to link directly to the aws sdk for example) but also to allow community members to contribute their own secret plugins.

We've got a hackweek coming up soon, I'll see if I can put a framework together for this then.

Frassle commented 1 year ago

So I did look into this for our hackweek. It looks quite doable, and I think I've already got a good idea of what the cloud and passphrase providers look like when pulled into plugins, which also defines what the grpc interface would look like. You can see these on my pluginSecrets branch, eg. https://github.com/pulumi/pulumi/tree/fraser/pluginSecrets/cloud-secrets.

There's a load of clean up we need to do through the main engine to enable this though, but I'm going to try and do that in small refactor passes over the coming weeks.

In the meantime it would help if you had a look at the proto definition for the secrets service: https://github.com/pulumi/pulumi/blob/fraser/pluginSecrets/proto/pulumi/secrets/secrets.proto

And comment here if you think it would be possible to implement an AGE provider against that interface. Happy to answer any questions you've got about the interface here on on community slack (@Fraser Waters, not @Fraser)

rafaribe commented 1 year ago

Is there any development on this? We use age/sops in our repos and this would be pretty awesome.

Frassle commented 1 year ago

I've been chipping away at it over the months to get in the refactors needed to make it more feasible to switch over to the plugin system, but this hasn't been priority work so it's been slow going.

I expect this will be possible at some point, but it's very hard to guess time scales for it right now.

omidraha commented 1 year ago

@rafaribe Do have an example of using Pulumi with SOPS or age?

folliehiyuki commented 1 year ago

Do have an example of using Pulumi with SOPS or age?

You can treat the Pulumi.<stack>.yaml file as an input to sops to encrypt every value there. The Pulumi secret backend can simply be local password with empty string, for example.

gawsoftpl commented 11 months ago

This issue is dead? Sops with age would be super cool feature.

Frassle commented 11 months ago

This issue is dead? Sops with age would be super cool feature.

Not dead, just very low priority. Some small bits have been done over the last few months to progress this forward.

tgummerer commented 9 months ago

/xref https://github.com/pulumi/home/issues/3297

Cross-referencing this to an internal post mortem issue, since pluginifying the secret manager came up there as a potential action item.

brandonkal commented 4 months ago

Using SOPS to encrypt secrets and state would be a great improvement over passphrase encryption