-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48025/
-----------------------------------------------------------
Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay
Kulkarni, Madhan Neethiraj, Mehul Parikh, Ramesh Mani, Selvamohan Neethiraj,
and Velmurugan Periasamy.
Bugs: RANGER-1005
https://issues.apache.org/jira/browse/RANGER-1005
Repository: ranger
Description
-------
**Problem Statement :**
Currently Ranger user password can be changed from Ranger Admin UI only, Ranger
should have utility to change Ranger user password from command line also.
**Proposed Solution :**
Created a java based command line utility to accept three parameters : userid,
old password and new password. provided user id and old password will be
compared with existing password in DB; if both are same then
UserMgr.updatePasswordInSHA256(username,password) will be called to update the
password.
To make change password process easier a python script has been added which can
accept parameters like loginID, old password and new password. after validating
input parameters values python script will call above mentioned java class and
send received parameters as argument to change the password.
Diffs
-----
security-admin/scripts/changepasswordutil.py PRE-CREATION
security-admin/src/main/java/org/apache/ranger/patch/cliutil/ChangePasswordUtil.java
PRE-CREATION
src/main/assembly/admin-web.xml 7fd2abf
Diff: https://reviews.apache.org/r/48025/diff/
Testing
-------
**Steps Performed(with patch):**
1. Installed ranger-admin from Build having changed of proposed patch.
2. Go to ranger-admin installation directory.
3. Run below given command to change 'admin' user password from 'admin' to
'admin123'
python changepasswordutil.py admin admin admin123
4. Started ranger-admin and tried to access ranger-admin home page/login page
5. On the login page of ranger-admin entered username 'admin' and password
'admin123'; clicked on 'Sign In' button to login page.
**Expected Behavior:**
'admin' user should get authenticated successfully and ranger-admin dashboard
page for 'admin' user should appear.
**Actual Behavior:**
'admin' user was authenticated successfully and after authentication page was
redirected to ranger-admin dashboard page.
Thanks,
Pradeep Agrawal