Is there a way to store web site credentials securely instead of clear text in the script file?
Hi @sbhumphreys
Welcome on the support forum
Regarding your concrete question, I believe it depends on your concrete needs.
My first intuition is that you might want to look into the k6/experimental/webcrypto
module which implements the Web Crypto API standard, and offers cryptographic operations. So depending on your needs, you might consider encrypting your file with a specific algorithm, and either a passphrase or a public/private key-pair, and decrypt it in the k6 script.
For context, we’re on track to make the webcrypto module stable. It is built on top of the Go standard library and should safe to use if privacy is your concern.
Hope that helps, let me know if I can help any further
1 Like