spiffe / go-spiffe

Golang library for SPIFFE support
Apache License 2.0
149 stars 77 forks source link

Save to disk option #173

Open faisal-memon opened 3 years ago

faisal-memon commented 3 years ago

There are a handful of use case where certificates and keys need to be saved to disk. Kubernetes webhooks is the biggest one. MySQL, NATS, and NGINX require certificates to be on disk too. We would like an option for go-spiffe to save certificates to disk to cover these use cases.

azdagron commented 3 years ago

This seems like a generally useful bit of functionality. I can see this bring implemented as an X509ContextWatcher and some accompanying exported helpers that can write out the SVID, Key, and Bundles to disk. We'd need to come up with an on-disk layout, or maybe allow it to be configurable; I'd imagine different programs will have different requirements.