pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rdhabalia opened a new pull request #884: Restrict partitioned-metadata rest-api access for cpp-client older than 1.21
Date Thu, 01 Jan 1970 00:00:00 GMT
rdhabalia opened a new pull request #884: Restrict partitioned-metadata rest-api access for
cpp-client older than 1.21
URL: https://github.com/apache/incubator-pulsar/pull/884
 
 
   ### Motivation
   
   As per #836 CPP-client older than 1.21 should not allow to create producers/consumers for
partitioned-topic. As we discussed in #827, we should have a way to prevent it at broker.
The easiest way to reject partitioned-metadata-request for partitioned-topics coming from
old-legacy cpp-client.
   Right now, client-lib gets partitioned topic metadata using http or binary-protocol.
   
   **1. http**
   - Pulsar-client-java library: always used to pass client-version using `userAgent` header-value.
   - Pulsar-client-cpp library: was not passing `userAgent` header-value until 1.20 in #765
where it passes version as `Pulsar-CPP-vX`
   Therefore, we can reject all http-requests for partitioned metadata if it has empty version
or version which is < 1.21
   
   **2. Binary-lookup**
    client-version placeholder was introduced in 1.18 version in #387. So, we can't validate
request based on version in binaryProtocol. However, none of the client uses binary-proto-lookup
yet. So, we can silently ignore validation on binary-lookup as we don't have a way to validate.
   
   
   ### Modifications
   
   - Introduce client-cpp version validation for partitioned-metadata-lookup.
   - Make validation dynamic configurable so, we can disable/enable if we see potential client
impact.
   
   ### Result
   
   Broker can be dynamically enabled to validate incompatible cpp-client library to access
partitioned-topic.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message