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

[improve][misc] KeyStores can now be utilised for performance testing #22692

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

shasank112001
Copy link

@shasank112001 shasank112001 commented May 10, 2024

Fixes #22678

Main Issue: #22678

PIP: #22694

Motivation

If you want to create a TestClient which uses AuthenticationKeyStoreTls as its authPlugin, Pulsar Test Admin/Client utilized in Pulsar-perf is unable to setup a vaild SSL context due to the requirement of the property "useKeyStoreTls" to be "true" for using keystores properly.
Moreover, utilizing the property "useKeyStoreTls" requires the use of trust-stores and not trust certificates, therefore requiring additional trustStoreType, trustStorePath and trustStorePass as parameters to be available, to utilize PulsarPerf.

Modifications

The following changes have been made:

  1. New properties for useKeyStoreTls, trustStore options and keystore options have been added in PerformanceBaseArguments.java
  2. An if check has been added in PerfClientUtils.java, to switch between trustCertsFilePath and keyStore related properties based on useKeyStoreTls.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

(example:)

  • Added test cases to check parameterException when useKeyStoreTls is true but no trustStore Path is provided.
  • Added test cases to verify that arguments are correctly mapped to PulsarAdminBuilder and PulsarClientBuilder

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: PR

@github-actions github-actions bot added the doc-required Your PR changes impact docs and you will update later. label May 10, 2024
@shasank112001 shasank112001 changed the title [improve][testClient] KeyStores can now be utilised for performance testing [improve][misc] KeyStores can now be utilised for performance testing May 10, 2024
Copy link
Member

@nodece nodece left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work.

BTW, this PR requires a PIP.

Copy link
Member

@nodece nodece left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert return String.format(Locale.US, format, get_FloatValue(size));.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required Your PR changes impact docs and you will update later. ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add parameters for KeyStore TLS in Pulsar test client
2 participants