Skip to content

Commit 02a814f

Browse files
authored
419 pkix path building failed (#427)
* Adding properties required for SSL authentication, with empty values by default * Checkstyle fixes. * Updating related documentation.
1 parent 5ead042 commit 02a814f

File tree

6 files changed

+40
-3
lines changed

6 files changed

+40
-3
lines changed
-106 KB
Loading

docs/schema-registry.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ A list of the properties explained here:
1515
* `schema.registry.username` Username
1616
* `schema.registry.password` Password
1717
* `schema.registry.bearer` Token for SASL/OAUTHBEARER
18+
* `schema.registry.keystore.location` The absolute path of the keystore file for the schema registry
19+
* `schema.registry.keystore.password` The password that protects the keystore file for the schema registry
20+
* `schema.registry.truststore.location` The absolute path of the truststore file for the schema registry
21+
* `schema.registry.truststore.password` The password that protects the truststore file for the schema registry
22+
* `ssl.keystore.location` The absolute path of the keystore file for the connection against the schema registry
23+
* `ssl.keystore.password` The password that protects the keystore file for the connection against the schema registry
24+
* `ssl.truststore.location` The absolute path of the truststore file for the connection against the schema registry
25+
* `ssl.truststore.password` The password that protects the truststore file for the connection against the schema registry
1826

1927
## Some Recommendations
2028

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<artifactId>kloadgen</artifactId>
99

10-
<version>5.6.11</version>
10+
<version>5.6.12</version>
1111

1212
<name>KLoadGen</name>
1313
<description>Load Generation Jmeter plugin for Kafka Cluster. Supporting AVRO, JSON Schema and Protobuf schema types. Generate Artificial

src/main/java/com/sngular/kloadgen/config/schemaregistry/DefaultPropertiesHelper.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,16 @@ class DefaultPropertiesHelper {
2222
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_USERNAME_KEY).propertyValue(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_USERNAME_DEFAULT).build(),
2323
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_PASSWORD_KEY).propertyValue(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_PASSWORD_DEFAULT).build(),
2424
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_BEARER_KEY).propertyValue(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_BEARER_DEFAULT)
25-
.build()));
26-
25+
.build(),
26+
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_SSL_KEYSTORE_LOCATION_KEY).propertyValue("").build(),
27+
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_SSL_KEYSTORE_PASSWORD_KEY).propertyValue("").build(),
28+
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_SSL_TRUSTSTORE_LOCATION_KEY).propertyValue("").build(),
29+
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_SSL_TRUSTSTORE_PASSWORD_KEY).propertyValue("").build(),
30+
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SSL_KEYSTORE_LOCATION_KEY).propertyValue("").build(),
31+
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SSL_KEYSTORE_PASSWORD_KEY).propertyValue("").build(),
32+
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SSL_TRUSTSTORE_LOCATION_KEY).propertyValue("").build(),
33+
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SSL_TRUSTSTORE_PASSWORD_KEY).propertyValue("").build()
34+
));
2735
private DefaultPropertiesHelper() {
2836
}
2937

src/main/java/com/sngular/kloadgen/config/schemaregistry/SchemaRegistryConfigElement.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ private void serializeProperties() {
7373
jMeterVariables.put(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_KEY, SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_BEARER_TYPE);
7474
jMeterVariables.put(SchemaRegistryClientConfig.BEARER_AUTH_CREDENTIALS_SOURCE, "STATIC_TOKEN");
7575
jMeterVariables.put(SchemaRegistryClientConfig.BEARER_AUTH_TOKEN_CONFIG, schemaProperties.get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_BEARER_KEY));
76+
} else if (SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_SSL_TYPE.equalsIgnoreCase(schemaProperties.get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_KEY))) {
77+
jMeterVariables.put(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_KEY, SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_SSL_TYPE);
78+
7679
}
7780
}
7881
}

src/main/java/com/sngular/kloadgen/util/SchemaRegistryKeyHelper.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public final class SchemaRegistryKeyHelper {
4040

4141
public static final String SCHEMA_REGISTRY_AUTH_BEARER_TYPE = "BEARER";
4242

43+
public static final String SCHEMA_REGISTRY_AUTH_SSL_TYPE = "SSL";
44+
4345
public static final String SCHEMA_REGISTRY_AUTH_BEARER_DEFAULT = "<bearer>";
4446

4547
public static final String SCHEMA_REGISTRY_SUBJECTS = "schema.registry.subjects";
@@ -50,6 +52,22 @@ public final class SchemaRegistryKeyHelper {
5052

5153
public static final String ENABLE_AUTO_SCHEMA_REGISTRATION_CONFIG = "auto.register.schemas";
5254

55+
public static final String SCHEMA_REGISTRY_SSL_KEYSTORE_LOCATION_KEY = "schema.registry.ssl.keystore.location";
56+
57+
public static final String SCHEMA_REGISTRY_SSL_KEYSTORE_PASSWORD_KEY = "schema.registry.ssl.keystore.password";
58+
59+
public static final String SCHEMA_REGISTRY_SSL_TRUSTSTORE_LOCATION_KEY = "schema.registry.ssl.truststore.location";
60+
61+
public static final String SCHEMA_REGISTRY_SSL_TRUSTSTORE_PASSWORD_KEY = "schema.registry.ssl.truststore.password";
62+
63+
public static final String SSL_KEYSTORE_LOCATION_KEY = "ssl.keystore.location";
64+
65+
public static final String SSL_KEYSTORE_PASSWORD_KEY = "ssl.keystore.password";
66+
67+
public static final String SSL_TRUSTSTORE_LOCATION_KEY = "ssl.truststore.location";
68+
69+
public static final String SSL_TRUSTSTORE_PASSWORD_KEY = "ssl.truststore.password";
70+
5371
private SchemaRegistryKeyHelper() {
5472
}
5573
}

0 commit comments

Comments
 (0)