-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43255/
-----------------------------------------------------------

(Updated Feb. 6, 2016, 7:38 a.m.)


Review request for Ambari, Jonathan Hurley, Nate Cole, and Robert Nettleton.


Changes
-------

Converted `AuthToLocalBuilder#copy` to `AuthToLocalBuilder#clone`.  Found and 
fixed issue with `AuthToLocalBuilder.Rule#compareTo` that caused rules to be 
ordered incinsistently and allow for duplicate rules to exist.

This patch should be re-reviewed.  FYI: Nate Cole (@ncole), Jonathan Hurley 
(@jurley)


Bugs: AMBARI-14938
    https://issues.apache.org/jira/browse/AMBARI-14938


Repository: ambari


Description
-------

When processing the user-specified auth-to-local rules while automatically 
generating auth-to-local rule sets using 
`org.apache.ambari.server.controller.AuthToLocalBuilder`, some rules fail to 
render.

This occurs when escape characters are used in the replacement pattern or 
replacement string of the rule, where a role looks like:

```
RULE: [n:string](regexp)s/pattern/replacement/[g]
```

To fix this issue, the regular expression used to parse the rules need to be 
augmented to allow for those characters.

NOTE: Also did some cleanup of 
`org.apache.ambari.server.controller.AuthToLocalBuilder`.


Diffs (updated)
-----

  
ambari-server/src/main/java/org/apache/ambari/server/controller/AuthToLocalBuilder.java
 a8fc487 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
 556bed8 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/AuthToLocalBuilderTest.java
 122e632 

Diff: https://reviews.apache.org/r/43255/diff/


Testing
-------

Manually tested

# Local test results: PASSED

# Jenkins test results: PENDING


Thanks,

Robert Levas

Reply via email to