grafana / k6

A modern load testing tool, using Go and JavaScript - https://k6.io
GNU Affero General Public License v3.0
23.89k stars 1.2k forks source link

pfx certificate format for k6 or Encrypted certificate support in k6 #3804

Open subp2022 opened 1 week ago

subp2022 commented 1 week ago

Brief summary

Currently K6 does not support PFX certificate format; Many API specially inside a Banking System needs these kinds of Certificate while testing API

k6 version

0.50.0

OS

Windows 11

Docker version and image (if applicable)

joined-docker.artifactory.danskenet.net/grafana/k6:0.50.0

Steps to reproduce the problem

While Testing a API that needs PFX certificate format got the following error:

ERRO[0001] could not initialize ‘.\Basic_xxxx_POSTTLS.js’: could not load JS test ‘file:///C:/K6DemoProject/Basic_abcdefgh_POSTTLS.js’: tls: failed to find any PEM data in certificate input

Expected behaviour

There should be no error and API test should pass

Actual behaviour

This will be a nice addition to K6 feature list; For many banking system, Testing API with pfx certificate format is mandatory

joanlopez commented 1 week ago

Hi @subp2022,

Thanks for submitting this feature request! 🙇🏻

Is all this about adding support for PFX to the standard TLS certificates already supported by k6?

subp2022 commented 1 week ago

Hi @joanlopez

Thanks for ur reply; yes this is more on encrypted certificate in pfx format;

I was getting this below error and got a suggestion in the forum to add it as future enhancement

https://community.grafana.com/t/erro-0001-could-not-initialize-basic-xxxx-posttls-js-could-not-load-js-test-file-c-k6demoproject-basic-abcdefgh-posttls-js-tls-failed-to-find-any-pem-data-in-certificate-input/123078