You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by pengjianhua <pe...@zte.com.cn> on 2017/07/06 08:26:02 UTC
Review Request 60680: Unable to login to Hadoop environment after
opened Kerberos.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60680/
-----------------------------------------------------------
Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy, and Qiang Zhang.
Bugs: RANGER-1677
https://issues.apache.org/jira/browse/RANGER-1677
Repository: ranger
Description
-------
The BaseClient class used following code to login user.
String encryptedPwd = configHolder.getPassword();
String password = PasswordUtils.decryptPassword(encryptedPwd);
if ( configHolder.isKerberosAuthentication() )
{ LOG.info("Init Login: using username/password"); loginSubject = SecureClientLogin.loginUserWithPassword(userName, password); }
else
{ LOG.info("Init Login: security not enabled, using username"); loginSubject = SecureClientLogin.login(userName); }
But the encrypt function was removed by RANGER-1571 in HadoopConfigHolder class.
String plainTextPwd = prop.getProperty(RANGER_LOGIN_PASSWORD);
try { - password = PasswordUtils.encryptPassword(plainTextPwd); - }
catch (IOException e)
{ - throw new HadoopException("Unable to initialize login info", e); - }
-
+ password = prop.getProperty(RANGER_LOGIN_PASSWORD);
Diffs
-----
agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java fd925aa
Diff: https://reviews.apache.org/r/60680/diff/1/
Testing
-------
Thanks,
pengjianhua
Re: Review Request 60680: Unable to login to Hadoop environment after
opened Kerberos.
Posted by Qiang Zhang <zh...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60680/#review179770
-----------------------------------------------------------
Ship it!
Ship It!
- Qiang Zhang
On 七月 6, 2017, 8:26 a.m., pengjianhua wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60680/
> -----------------------------------------------------------
>
> (Updated 七月 6, 2017, 8:26 a.m.)
>
>
> Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy, and Qiang Zhang.
>
>
> Bugs: RANGER-1677
> https://issues.apache.org/jira/browse/RANGER-1677
>
>
> Repository: ranger
>
>
> Description
> -------
>
> The BaseClient class used following code to login user.
> String encryptedPwd = configHolder.getPassword();
> String password = PasswordUtils.decryptPassword(encryptedPwd);
> if ( configHolder.isKerberosAuthentication() )
> { LOG.info("Init Login: using username/password"); loginSubject = SecureClientLogin.loginUserWithPassword(userName, password); }
> else
> { LOG.info("Init Login: security not enabled, using username"); loginSubject = SecureClientLogin.login(userName); }
> But the encrypt function was removed by RANGER-1571 in HadoopConfigHolder class.
> String plainTextPwd = prop.getProperty(RANGER_LOGIN_PASSWORD);
> try { - password = PasswordUtils.encryptPassword(plainTextPwd); - }
> catch (IOException e)
> { - throw new HadoopException("Unable to initialize login info", e); - }
> -
> + password = prop.getProperty(RANGER_LOGIN_PASSWORD);
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java fd925aa
>
>
> Diff: https://reviews.apache.org/r/60680/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> pengjianhua
>
>
Re: Review Request 60680: Unable to login to Hadoop environment after
opened Kerberos.
Posted by bhavik patel <bh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60680/#review179861
-----------------------------------------------------------
agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java
Line 309 (original), 310 (patched)
<https://reviews.apache.org/r/60680/#comment254759>
The line "password = prop.getProperty(RANGER_LOGIN_PASSWORD);" the password is already returned in encrypted format and the 'plugins test connection' is working fine.
After testing with the attached patch the test-connection for the plugins is failing, can you please revisit and check if this patch is required?
- bhavik patel
On July 6, 2017, 8:26 a.m., pengjianhua wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60680/
> -----------------------------------------------------------
>
> (Updated July 6, 2017, 8:26 a.m.)
>
>
> Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy, and Qiang Zhang.
>
>
> Bugs: RANGER-1677
> https://issues.apache.org/jira/browse/RANGER-1677
>
>
> Repository: ranger
>
>
> Description
> -------
>
> The BaseClient class used following code to login user.
> String encryptedPwd = configHolder.getPassword();
> String password = PasswordUtils.decryptPassword(encryptedPwd);
> if ( configHolder.isKerberosAuthentication() )
> { LOG.info("Init Login: using username/password"); loginSubject = SecureClientLogin.loginUserWithPassword(userName, password); }
> else
> { LOG.info("Init Login: security not enabled, using username"); loginSubject = SecureClientLogin.login(userName); }
> But the encrypt function was removed by RANGER-1571 in HadoopConfigHolder class.
> String plainTextPwd = prop.getProperty(RANGER_LOGIN_PASSWORD);
> try { - password = PasswordUtils.encryptPassword(plainTextPwd); - }
> catch (IOException e)
> { - throw new HadoopException("Unable to initialize login info", e); - }
> -
> + password = prop.getProperty(RANGER_LOGIN_PASSWORD);
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java fd925aa
>
>
> Diff: https://reviews.apache.org/r/60680/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> pengjianhua
>
>