You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
Linux
RocketMQ version
develop
JDK Version
All Java version
Describe the Bug
The following code in org.apache.rocketmq.proxy.grpc.pipeline.AuthenticationPipeline#newContext will repeatedly insert AK information into the Metadata, which resulting in a memory leak.
if (StringUtils.isNotBlank(defaultAuthenticationContext.getUsername())) {
headers.put(GrpcConstants.AUTHORIZATION_AK, defaultAuthenticationContext.getUsername());
}
Steps to Reproduce
Send message with ACL 2.0 and gRPC client.
What Did You Expect to See?
The AK is unique in metadata no matter how many times the API calls.
What Did You See Instead?
The AK is unique in metadata no matter how many times the API calls.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
dingshuangxi888
changed the title
[Bug] Fix gRPC ACL 2.0 PUT AK to Metadata duplicate
[Bug] Add Utils for put header to Metadata to avoid duplicate data.
Oct 8, 2024
dingshuangxi888
changed the title
[Bug] Add Utils for put header to Metadata to avoid duplicate data.
[Bug] Add Utils for put header to gRPC Metadata to avoid duplicate data.
Oct 8, 2024
Before Creating the Bug Report
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
Linux
RocketMQ version
develop
JDK Version
All Java version
Describe the Bug
The following code in org.apache.rocketmq.proxy.grpc.pipeline.AuthenticationPipeline#newContext will repeatedly insert AK information into the Metadata, which resulting in a memory leak.
if (StringUtils.isNotBlank(defaultAuthenticationContext.getUsername())) {
headers.put(GrpcConstants.AUTHORIZATION_AK, defaultAuthenticationContext.getUsername());
}
Steps to Reproduce
Send message with ACL 2.0 and gRPC client.
What Did You Expect to See?
The AK is unique in metadata no matter how many times the API calls.
What Did You See Instead?
The AK is unique in metadata no matter how many times the API calls.
Additional Context
No response
The text was updated successfully, but these errors were encountered: