-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Broker] Fix prefix setting in JWT authn and avoid multi calls for the getProperty #12132
Conversation
@RobertIndie Thanks for your contribution. Please do not forget to add docs accordingly to allow users to know your great code changes. And you can ping me to review the docs, thanks. |
4f1fbd4
to
e45b938
Compare
I have created a PR: #12152 for doc. PTAL |
/pulsarbot run-failure-checks |
...ommon/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderToken.java
Outdated
Show resolved
Hide resolved
...ommon/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderToken.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Zike Yang <ar@armail.top>
/pulsarbot run-failure-checks |
@@ -54,7 +54,7 @@ | |||
static final String HTTP_HEADER_VALUE_PREFIX = "Bearer "; | |||
|
|||
// When symmetric key is configured | |||
static final String CONF_TOKEN_SETTING_PREFIX = ""; | |||
static final String CONF_TOKEN_SETTING_PREFIX = "tokenSettingPrefix"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will there be compatibility issues here? After the upgrade, the previous token cannot be used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No compatibility issues will be introduced here. The tokenSettingPrefix
is empty by default.
@RobertIndie PTAL |
…e getProperty (#12132) Motivation Currently, the setting prefix for JWT authentication does not work because the code does not specify the property name for the token setting prefix. Modifications Add token setting prefix property name: tokenSettingPrefix. Avoid multi calls for the getProperty in JWT auth. Verifying this change This change is already covered by the existing test, such as testTokenSettingPrefix. (cherry picked from commit b9a250d)
…e getProperty (apache#12132) Motivation Currently, the setting prefix for JWT authentication does not work because the code does not specify the property name for the token setting prefix. Modifications Add token setting prefix property name: tokenSettingPrefix. Avoid multi calls for the getProperty in JWT auth. Verifying this change This change is already covered by the existing test, such as testTokenSettingPrefix.
Motivation
Currently, the setting prefix for JWT authentication does not work because the code does not specify the property name for the token setting prefix.
Modifications
tokenSettingPrefix
.Verifying this change
This change is already covered by the existing test, such as testTokenSettingPrefix.
Documentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
doc-required