Skip to content

Commit

Permalink
419 pkix path building failed (#427)
Browse files Browse the repository at this point in the history
* Adding properties required for SSL authentication, with empty values by default

* Checkstyle fixes.

* Updating related documentation.
  • Loading branch information
ramilsngular authored Jan 8, 2024
1 parent 5ead042 commit 02a814f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 3 deletions.
Binary file modified docs/images/SchemaRegistrySelection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/schema-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ A list of the properties explained here:
* `schema.registry.username` Username
* `schema.registry.password` Password
* `schema.registry.bearer` Token for SASL/OAUTHBEARER
* `schema.registry.keystore.location` The absolute path of the keystore file for the schema registry
* `schema.registry.keystore.password` The password that protects the keystore file for the schema registry
* `schema.registry.truststore.location` The absolute path of the truststore file for the schema registry
* `schema.registry.truststore.password` The password that protects the truststore file for the schema registry
* `ssl.keystore.location` The absolute path of the keystore file for the connection against the schema registry
* `ssl.keystore.password` The password that protects the keystore file for the connection against the schema registry
* `ssl.truststore.location` The absolute path of the truststore file for the connection against the schema registry
* `ssl.truststore.password` The password that protects the truststore file for the connection against the schema registry

## Some Recommendations

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<artifactId>kloadgen</artifactId>

<version>5.6.11</version>
<version>5.6.12</version>

<name>KLoadGen</name>
<description>Load Generation Jmeter plugin for Kafka Cluster. Supporting AVRO, JSON Schema and Protobuf schema types. Generate Artificial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@ class DefaultPropertiesHelper {
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_USERNAME_KEY).propertyValue(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_USERNAME_DEFAULT).build(),
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_PASSWORD_KEY).propertyValue(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_PASSWORD_DEFAULT).build(),
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_BEARER_KEY).propertyValue(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_BEARER_DEFAULT)
.build()));

.build(),
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_SSL_KEYSTORE_LOCATION_KEY).propertyValue("").build(),
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_SSL_KEYSTORE_PASSWORD_KEY).propertyValue("").build(),
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_SSL_TRUSTSTORE_LOCATION_KEY).propertyValue("").build(),
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_SSL_TRUSTSTORE_PASSWORD_KEY).propertyValue("").build(),
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SSL_KEYSTORE_LOCATION_KEY).propertyValue("").build(),
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SSL_KEYSTORE_PASSWORD_KEY).propertyValue("").build(),
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SSL_TRUSTSTORE_LOCATION_KEY).propertyValue("").build(),
PropertyMapping.builder().propertyName(SchemaRegistryKeyHelper.SSL_TRUSTSTORE_PASSWORD_KEY).propertyValue("").build()
));
private DefaultPropertiesHelper() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ private void serializeProperties() {
jMeterVariables.put(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_KEY, SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_BEARER_TYPE);
jMeterVariables.put(SchemaRegistryClientConfig.BEARER_AUTH_CREDENTIALS_SOURCE, "STATIC_TOKEN");
jMeterVariables.put(SchemaRegistryClientConfig.BEARER_AUTH_TOKEN_CONFIG, schemaProperties.get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_BEARER_KEY));
} else if (SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_SSL_TYPE.equalsIgnoreCase(schemaProperties.get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_KEY))) {
jMeterVariables.put(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_KEY, SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_SSL_TYPE);

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public final class SchemaRegistryKeyHelper {

public static final String SCHEMA_REGISTRY_AUTH_BEARER_TYPE = "BEARER";

public static final String SCHEMA_REGISTRY_AUTH_SSL_TYPE = "SSL";

public static final String SCHEMA_REGISTRY_AUTH_BEARER_DEFAULT = "<bearer>";

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

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

public static final String SCHEMA_REGISTRY_SSL_KEYSTORE_LOCATION_KEY = "schema.registry.ssl.keystore.location";

public static final String SCHEMA_REGISTRY_SSL_KEYSTORE_PASSWORD_KEY = "schema.registry.ssl.keystore.password";

public static final String SCHEMA_REGISTRY_SSL_TRUSTSTORE_LOCATION_KEY = "schema.registry.ssl.truststore.location";

public static final String SCHEMA_REGISTRY_SSL_TRUSTSTORE_PASSWORD_KEY = "schema.registry.ssl.truststore.password";

public static final String SSL_KEYSTORE_LOCATION_KEY = "ssl.keystore.location";

public static final String SSL_KEYSTORE_PASSWORD_KEY = "ssl.keystore.password";

public static final String SSL_TRUSTSTORE_LOCATION_KEY = "ssl.truststore.location";

public static final String SSL_TRUSTSTORE_PASSWORD_KEY = "ssl.truststore.password";

private SchemaRegistryKeyHelper() {
}
}

0 comments on commit 02a814f

Please # to comment.