-
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
Should authParamsString for Authentication support another format ? #671
Comments
I think the entire parameter value should be parsed on plugins side. Then plugins can choose any format they want. Some plugin may need just a keyword, some other may need binary data. This would break compatibility though. I'd say the current interface could be better. (When can we make incompatible changes btw?) If we need to keep compatibility as possible as we can, 4th option would be "Encode values" (== don't allow to use ":" and ","). Any encodings which doesn't use ":" and "," (e.g. base64, URL encode) are fine, and we can (should) delegate the decoding to plugins. |
Thank you for your comments and I agree. Step 1. Step 2. |
We can manage the compatibility if we provided an extra interface below. /**
* Plugins which use ":" and/or "," in a configuration parameter value need to implement this interface.
* This interface will be integrated into Authentication interface and be required for all plugins on version x.y.
*/
public interface EncodedAuthenticationParameterSupport {
void configure(String encodedAuthParamString);
} URL encoding is just a hack for the compatibility. We can use any encode once we added new interface. So, I think the step 1 is not mandatory. Please keep in mind that the configuration value will be written by humans. Support for double-quotation is much easier to use than URL encoding. |
My name is Yuta Takaba, a software engineer at Yahoo Japan Corporation. 1: Adding 2: Support JSON for configure.
|
This is fixed by #721 |
Now, when parsing authParamsString, keys or values containing ":" or "," cannot be 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.※ In this case, parameter containing "," cannot be parsed.
The text was updated successfully, but these errors were encountered: