You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by gi...@git.apache.org on 2017/08/10 01:24:03 UTC

[GitHub] yush1ga opened a new issue #671: Should authParamsString for Authentication support another format.

yush1ga opened a new issue #671: Should authParamsString for Authentication support another format.
URL: https://github.com/apache/incubator-pulsar/issues/671
 
 
   Now, when parsing authParamsString, keys or values containing ":" or "," cannot been parsed correctly.
   
   However, C++ Athenz Plugin requires for URL (containing ":") as a parameter.
   Moreover, other 3rd party or official auth plugins may require parameters containing ":" in near future.
   
   I have 3 ideas to resolve this problem.
   
   ### 1. Enable users to set delimiters.
   Users can set delimiters freely if they don't want to use ":" and ",".
   
   ### 2. Support JSON
   In addition to current format, enable JSON to be used.
   
   ### 3. Ignore second and subsequent ":"
   e.g. 
   When the string like `url:http://hoge.com:4080/` is gotten, it is processed like following.
   ```java
   paramString = "url:http://hoge.com:4080/"
   String[] kv = paramString.split(":")
   paramMap[kv[0]] = "";
   for (int i = 1; i < kv.size(); i++) {
       paramMap[kv[0]] += kv[i];
   }
   ```
   ? In this case, parameter containing "," cannot been parsed.
 
----------------------------------------------------------------
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