Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load certificate and key from PEM string value instead from file #32

Open
ezeeb opened this issue Jul 9, 2024 · 6 comments
Open

load certificate and key from PEM string value instead from file #32

ezeeb opened this issue Jul 9, 2024 · 6 comments

Comments

@ezeeb
Copy link

ezeeb commented Jul 9, 2024

Hi everybody,

i want to write a load test where i have to connect to an mqtt server as several devices with different identities - i load this list if device identities with SharedArray from an CSV file. The file contains device id, device certificate and device key.

Current implementation of client only allows loading certificate and key from file. Handling files in k6 is quite complicated, so i would like to implement an client api to load them from a PEM string value.

Any suggestions how to add this functionality to the existing api?

@ezeeb
Copy link
Author

ezeeb commented Jul 11, 2024

created a PR, is this a good approach?

@pmalhaire
Copy link
Owner

pmalhaire commented Jul 17, 2024

Hello
It makes more sense to change the JS frontend to handle strings as files, most people use files for cert.

@pmalhaire
Copy link
Owner

On the tls part I can makes this configurable.

@ezeeb
Copy link
Author

ezeeb commented Jul 17, 2024

Hello It makes more sense to change the JS frontend to handle strings as files, most people use files for cert.

Hi, sorry, wasn't specific here. I ask for an additional way to pass cert and key data without breaking the existing API. That's also what my PR tries to implement.

In my case each device has two files (key and cert) and when i test one hundred or one thousand devices i have to create 2 files for each device and the client loads the PEM file content on connect. So at least for me - it would be easier to skip these store to file and load from file steps and simply pass the PEM file content.

What do do you think?

@ezeeb
Copy link
Author

ezeeb commented Jul 17, 2024

On the tls part I can makes this configurable.

That would be great. I guess this is another issue.

@ezeeb
Copy link
Author

ezeeb commented Jul 19, 2024

Hey @pmalhaire, i removed the tls min version from this PR and created a separate issue and pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants