### Motivation

Currently, we can not create an Athenz authentication object using the 
following C++ method:
```cpp
AuthenticationPtr AuthFactory::create(const std::string& 
pluginNameOrDynamicLibPath, const std::string& authParamsString)
```
This is because the auth parameters is parsed as a format like `k1:v1,k2:v2`, 
not as json.
https://github.com/apache/incubator-pulsar/blob/a5c339b4e84d037e6739e70f8467b6d2d2486178/pulsar-client-cpp/lib/Authentication.cc#L114-L135

For this reason, python function can not connect to topic with Athenz 
authentication enabled.
https://github.com/apache/incubator-pulsar/blob/669196c27d3c2028a112d939774744dae8ab1b88/pulsar-functions/instance/src/main/python/python_instance_main.py#L90

### Modifications

Pass the auth parameters string as it is to AuthAthenz or AuthTls, and make 
those plugins parse the string.

### Result

We will be able to parse json format parameters correctly using AuthFactory.
This fix will enable python function to connect to broker using Athenz.

[ Full content available at: 
https://github.com/apache/incubator-pulsar/pull/2540 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to