google / go-jsonnet

Apache License 2.0
1.64k stars 236 forks source link

feat: sprig support (bcrypt, htpasswd) #553

Open lukasmrtvy opened 3 years ago

lukasmrtvy commented 3 years ago

Would be great to support https://github.com/Masterminds/sprig library, bcrypt and htpasswd fnctions are definitely useful when comes to deploying webservers. Sprig is used in Helm.

Thanks

CertainLach commented 3 years ago

Both bcrypt and htpasswd are non-deterministic (Because of random salt), but jsonnet is designed to be side-effect free

sbarzowski commented 3 years ago

We could have the salt explicitly provided by the user (as a function argument). That said, it is a fairly difficult thing to add without breaking compatibility with other implementations. I'm aware of experimental work which would provide a general solution to that, but don't expect it anytime soon.