-
Notifications
You must be signed in to change notification settings - Fork 69
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
only basicauth available for SchemaRegistry? require ssl auth (with certs) #166
Comments
Hey @msrijita18, The |
Hi @mostafa , const schemaRegistry = SchemaRegistry({
url: "https://server.net",
saslConfig: {
username:"YjM4MGFlZjcwN",
password:"YjM4MGFlZjcwN",
algorithm: SASL_SSL,
},
tls: {
clientCertPem: /tmp/sr.truststore.jks,
clientKeyPem: /tmp/sr.keystore.jks,
enableTls: true,
insecureSkipTlsVerify:true,
minVersion: TLS_1_2,
},
}); |
@msrijita18 Also, |
@mostafa |
Hi @mostafa , truststore.jks and keystore.jks are there for Schema registry TLS Auth. Did the following to convert it: But this error pops up:
Would appreciate some help, thanks! |
@msrijita18 |
Its working now. I followed this to convert jks files to pem files But now I'm facing this error:
I'm using this image. I'm looking at this issue. Is it an outdated image problem? |
@msrijita18 Also, the issue you face is that you're using an image with no mounted volume, while using your local addresses in your script. Mount a directory that contains your script and certificates and then use valid paths inside the container in your script. |
@mostafa |
@msrijita18 |
I suppose this is resolved, so I'll close the issue. If you still have any questions related to this issue, feel free to reopen the issue. |
Hi @mostafa , I tried to do the SR auth a couple of ways but it still shows me the same error:
|
@msrijita18 |
@msrijita18 Created #169 to fix this issue. |
Thanks! I look forward to it :) |
@msrijita18 Fixed in #170. |
@mostafa Thanks a lot :-) |
Hi @mostafa ERRO[0003] Failed to get schema from schema registry, OriginalError: %!w(*url.Error=&{Get https://.../versions/latest 0xc00117fb60})
at github.com/mostafa/xk6-kafka.(*Kafka).schemaRegistryClientClass.func1 (native)
at file://scripts-spt/test_avro_with_schema_registry.js:286:4(144)
at native hint="script exception" This error gets thrown when I try to get schemas from remote SR with TLS: Config provided: const valueSubjectName = schemaRegistry.getSubjectName({
topic:topic,
element:VALUE,
subjectNameStrategy:RECORD_NAME_STRATEGY,
schema:valueSchema,
});
const valueSchemaObject = schemaRegistry.getSchema({
subject:valueSubjectName,
schema:valueSchema,
schemaType:SCHEMA_TYPE_AVRO,
}); I tried on local schema registry, it works then ERRO[0000] Failed to get schema from schema registry, OriginalError: %!w(srclient.Error={40401 Subject
'com.example.perso-key' not found. 0xc0006fc1b0})
at github.com/mostafa/xk6-kafka.(*Kafka).schemaRegistryClientClass.func1 (native)
at file:///Users/srijita.mallick/maersk_workspace/scripts/test_avro_with_schema_registry.js:83:4(109)
at native hint="script exception I feel the problem lies with handling tls auth schema registry for getting schemas, can you pl look into it, thanks |
@msrijita18 |
@mostafa
I wanted to show what error it throws if a schema doesn't exist which is this:
And what error I'm getting in TLS auth SR get schema:
When I curl the url to fetch schemas, I get the results easily in my terminal |
Hi @mostafa , I wanted to share the whole script that I'm using: script.js I'm able to log the constant valueSchemaObject , that means function But I'm facing error while using the function
But what value should i put in data parameter (it says we can put any which is an interface in go)? |
@msrijita18 |
@mostafa
But still getting the following error:
|
Hey @msrijita18, Is this resolved or do you still have the issue? |
@msrijita18 |
I'm still facing the same issue, so i used kafka clients for my testing |
I suppose this is resolved. Feel free to reopen it if the issue persists. |
For example to consume avro msgs via schema registry using following cmd:
The text was updated successfully, but these errors were encountered: