Comments (4)
This is the mapping:
- clientCertsPem => keystore.pem
- clientKeyPem => keystore.pem
- serverCaPem => truststore.pem
In your case, the keystore.pem store both the certificate and the private key. So, you must split them before use, see this. Also, PEM is a de facto standard supported by Go and xk6-kafka uses Go standard library to load PEM files.
from xk6-kafka.
Many thanks! Everything works now. I see a message in Kafka Tool :)
from xk6-kafka.
Hey @luminorena,
xk6-kafka supports two formats: JKS with PKCS#8 and PEM. If you have certificates in any other format, they should be converted to either of these. The LoadJKS
function is a convenience function to convert JKS files to PEM before being consumed by TLS config. The function extracts the certificates into the same directory as the JKS file. The address of the files are then returned as an object, which in your case is called: truststore
. The tlsConfig
only supports a single certificate for each of the keys, so if you specify multiple keys, they will be overridden by JS. Also, it is your job to determine the index of the correct client certificate in the clientCertsPem
property in truststore
and you don't need to specify all.
from xk6-kafka.
Hi, @mostafa
I've converted pfx (which is actually the equivalent of PKCS#12) to pem and got two certs as a result - one for keystore and the other for truststore.
You write The tlsConfig only supports a single certificate for each of the keys, so if you specify multiple keys, they will be overridden by JS.
But in your library the certs are divided into several parts depending on the cert inside: clientCersPem, clientKeyPem and serverCaPem.
Is it possible to use only two certs (keystore.pem and truststore.pem) each of which contains all types of necessary certs?
UPD: I remember your library doesn't work with PKCS#12, so I've created PEM. And I don't know if it could work with such a PEM. I can also convert the resulted PEM into pure PKCS8 format, but I'm not sure where to use it to get a working cert.
UPD2: Is there any character escaping in LoadJks function, e.g. should I escape dot somehow or maybe the other characters?
from xk6-kafka.
Related Issues (20)
- Creating Connection object failed on `EOF` HOT 1
- Adding support for K6 0.49.0 HOT 3
- Make docker image supports on arm HOT 8
- Incorrect reader/writer initialization in examples and description
- Wrong documentation for ReaderConfig.startOffset HOT 2
- RabbitMQ Compatibility HOT 1
- GoError: Failed to encode data, OriginalError: cannot decode textual record HOT 9
- Binary is not getting build. HOT 2
- Is there any guidance on how k6 works with complex AVRO schemas? HOT 1
- Error importing SCHEMA_TYPES enum when using index.d.ts. HOT 3
- Load test with Avro Schema that contains references throw an error HOT 2
- Reader.consume wont timeout HOT 1
- Getting tls: bad certificate error when try to write avro type message HOT 1
- Query : Avro with and without Schema Registry HOT 9
- How to come up the limit for reader.consume method? HOT 9
- Request to add authentication through oauth bearer token HOT 2
- Use of xk6-kafka with TS and webpack HOT 2
- Error serializing nullable boolean HOT 1
- Possibility to connect to AWS Glue to get SchemaRegistry data HOT 4
- Schema Registry serialized message causes SchemaRegistryException on AWS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xk6-kafka.