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

[Issue 10202][pulsar-broker] Update the authentication data when an authentication refresh happens #10203

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

kaushik-develop
Copy link
Contributor

@kaushik-develop kaushik-develop commented Apr 12, 2021

Fixes #10202

Motivation

A pulsar broker does not refresh authentication data when an authentication state completes and a refresh happens. This change is to fix the issue.
Without this fix, the server can be seen to continue using stale auth data.

Modifications

  • Use the new authData when an authentication state changes to "complete"
  • In the producer/consumer classes, do not cache the authData; get it from the connection

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Added an integration test [testExpiringTokenWithRefreshAndProducerRestart()] to verify

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

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): no
  • The public API: no
  • The schema: no
  • The default values of configurations: no
  • The wire protocol: no
  • The rest endpoints: no
  • The admin cli options: no
  • Anything that affects deployment: don't know

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@merlimat merlimat added this to the 2.8.0 milestone Apr 12, 2021
@merlimat merlimat added the type/bug The PR fixed a bug or issue reported a bug label Apr 12, 2021
Copy link

@hsaputra hsaputra left a comment

Choose a reason for hiding this comment

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

LGTM +1

@kaushik-develop
Copy link
Contributor Author

/pulsarbot run-failure-checks

@kaushik-develop
Copy link
Contributor Author

/pulsarbot run-failure-checks

1 similar comment
@kaushik-develop
Copy link
Contributor Author

/pulsarbot run-failure-checks

@merlimat merlimat merged commit df1a024 into apache:master Apr 14, 2021
@kaushik-develop kaushik-develop deleted the oss_server_cnx_auth_fix branch April 14, 2021 19:04
ivankelly pushed a commit to ivankelly/pulsar that referenced this pull request Aug 10, 2021
Co-authored-by: Kaushik Ghosh <kaushikg@splunk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Authentication state refresh needs to be handled
6 participants