Add support for user names in config containing a dot#86633
Add support for user names in config containing a dot#86633azat merged 5 commits intoClickHouse:masterfrom
Conversation
For correct config parsing, the dots in the user names have been escaped for some time [1]. This caused a confusion for some users. This commit adds optional de-escaping to the config parsing process. In order to keep the behaviour backwards-compatible, it's been hidden behind the new config entry `<escape_dot_in_user_name>` which is turned on by default. Fixes ClickHouse#82026 [1] ClickHouse#58354
|
If this needs further testing, please tell me what should I cover additionally. Also please tell me if I overlooked anything. |
|
Workflow [PR], commit [34daf9c] Summary: ❌
|
|
On a second thought, I am not sure whether this behaviour should be able to change via setting. Before that commit, you still could have a user with a dot in the username. However, the behaviour was inconsistent. If you have a user
So I wonder if the setting is needed or I should make this behaviour the default and non-changeable. |
|
@azat you were the author of the PR that changed this behaviour as well. Would you be able to have a look at it? Thanks! |
| user->setName(user_name); | ||
| String unescaped_user_name = user_name; | ||
| if (!escape_dot_in_user_name) | ||
| Poco::replaceInPlace(unescaped_user_name, "\\.", "."); |
There was a problem hiding this comment.
Can we simply do this always, without any options? This looks safe for users.
There was a problem hiding this comment.
Oh, you already raised the question
So I wonder if the setting is needed or I should make this behaviour the default and non-changeable.
Yes, let's remove the configuration directive.
There was a problem hiding this comment.
Thanks for the feedback! I've removed the option making this change unconditional. Also, I updated the changelog entry to reflect the new behaviour. Please have a look.
Head branch was pushed to by a user without write access
|
Pushed a fix for the test and also renamed the test itself. Please re-add it to the merge queue if it looks good to you |
6b451c9
Add support for user names in config containing a dot
24.8.14 Backport of ClickHouse#86633 - Add support for user names in config containing a dot
Add support for user names in config containing a dot
Add support for user names in config containing a dot
25.8.13 Backport of ClickHouse#86633 - Add support for user names in config containing a dot
Add support for user names in config containing a dot
Add support for user names in config containing a dot
25.8.15 Stable Backport of ClickHouse#86633 - Add support for user names in config containing a dot
For correct config parsing, the dots in the user names have been escaped for some time [1]. This caused a confusion for some users. This commit adds the "un-escaping" to the user name handling.
Fixes #82026
[1] #58354
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixes handling of users with a dot in the name when added via config file.
Documentation entry for user-facing changes