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

[fix][client] Initializing client-authentication using configured auth params #23610

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

rdhabalia
Copy link
Contributor

@rdhabalia rdhabalia commented Nov 19, 2024

Motivation

Currently, there are user applications that want to load client configurations dynamically from a config file and create PulsarClient by passing that dynamically created ClientConfigurationData. In that case, the Pulsar client doesn't initialize authentication with provided auth parameters and authPluginClass into ClientConfigurationData, so user applications are not able to configure authentication correctly.
Therefore, PulsarClient should initialize authentication based on provided auth configuration (param and auth-class) and use it for server connection.

Modifications

Pulsar client lib can initialize authentication using configured auth-param and class into client-configuration.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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:

@rdhabalia rdhabalia added area/client doc-not-needed Your PR changes do not impact docs ready-to-test labels Nov 19, 2024
@rdhabalia rdhabalia added this to the 4.1.0 milestone Nov 19, 2024
@rdhabalia rdhabalia self-assigned this Nov 19, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.33%. Comparing base (bbc6224) to head (a75a7c9).
Report is 735 commits behind head on master.

Files with missing lines Patch % Lines
...g/apache/pulsar/client/impl/ClientBuilderImpl.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23610      +/-   ##
============================================
+ Coverage     73.57%   74.33%   +0.75%     
- Complexity    32624    34961    +2337     
============================================
  Files          1877     1944      +67     
  Lines        139502   147129    +7627     
  Branches      15299    16226     +927     
============================================
+ Hits         102638   109362    +6724     
- Misses        28908    29316     +408     
- Partials       7956     8451     +495     
Flag Coverage Δ
inttests 27.33% <50.00%> (+2.75%) ⬆️
systests 24.38% <50.00%> (+0.06%) ⬆️
unittests 73.70% <50.00%> (+0.85%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...g/apache/pulsar/client/impl/ClientBuilderImpl.java 86.54% <50.00%> (+0.56%) ⬆️

... and 660 files with indirect coverage changes

---- 🚨 Try these New Features:

Copy link
Contributor

@vineeth1995 vineeth1995 left a comment

Choose a reason for hiding this comment

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

Looks good

@rdhabalia rdhabalia merged commit 13f77aa into apache:master Nov 26, 2024
55 of 58 checks passed
@rdhabalia rdhabalia deleted the cl_tls branch November 26, 2024 21:20
lhotari pushed a commit that referenced this pull request Nov 27, 2024
lhotari pushed a commit that referenced this pull request Nov 27, 2024
lhotari pushed a commit that referenced this pull request Nov 27, 2024
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Nov 28, 2024
…h params (apache#23610)

(cherry picked from commit 13f77aa)
(cherry picked from commit 9df41fc)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Nov 28, 2024
…h params (apache#23610)

(cherry picked from commit 13f77aa)
(cherry picked from commit 9df41fc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants