-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Feature Description
Currently, the TLS Auth section of the Options inside the javascript only supports clear text private key. This is generally considered insecure in a production environment.
tlsAuth: [
{
domains: ['example.com'],
cert: open('./mycert.pem'),
key: open('./mycert-key.pem'),
},
]
For the Windows platform, usually, the certificate is installed into the windows local certificate store. I would like to request that K6 supports accessing the Windows certificate store for accessing the private key instead of providing a cleartext private key.
For example, something like below:
tlsAuth: [
{
domains: ['example.com'],
cert: open('./mycert.pem'),
keyid: 'LocalMachine/My/1cdb52270cde175e62e876551bcd56b21bad84c4',
},
],
On a Windows machine, this Powershell command can be used to list all the certs installed in the local machine's certificate store:
Get-ChildItem -path cert:\LocalMachine\My
And the thumbprint string from above output for a specific cert would be the string to use in the configuration.
A library I have found online implemented in GO seems to have this functionality already: https://github.com/google/certtostore/blob/master/certtostore_windows.go
Suggested Solution (optional)
No response
Already existing or connected issues / PRs (optional)
No response