sneethiraj commented on code in PR #903:
URL: https://github.com/apache/ranger/pull/903#discussion_r3020012221
##########
ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java:
##########
@@ -330,6 +340,13 @@ private void buildUnixUserList(String command) throws
Throwable {
continue;
}
+ if (validateUserName) {
+ if (!isValidUserName(userName)) {
+ LOG.warn("Ignoring Unix Username: [{}]: failed to
confirm to validation-pattern: [{}]", userName, regExUserNameValidator);
Review Comment:
**Good catch**. We can implement the following regex validations that
supports international char sets:
```
private static final String DEFAULT_REGEX_USERNAME_VALIDATOR =
"^[\\p{L}\\p{Mn}\\p{Nd}\\._-]{3,64}$" ;
private static final String DEFAULT_REGEX_GROUPNAME_VALIDATOR =
"^[\\p{L}\\p{N}._\\-\\s]{1,256}$" ;
```
However, we need to document this as part of the upgrade to 2.8.1+ release
that the username and groupname validations are defaulted to be ON with
specific regex and customers are requested to review and modify if needed
before deploying newer version of code.
Can you share your thoughts on the best approach to resolve this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]