You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Bryan Bende <bb...@gmail.com> on 2016/05/09 19:51:01 UTC

Review Request 47133: RANGER-978 Usersync: Remove creation of default email address

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

Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.


Repository: ranger


Description
-------

Removing one line that was populating an email address in the usersync and setting it to user@HOSTNAME.


Diffs
-----

  ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java 068c9df 

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


Testing
-------

Tested full build and ran usersync to verify email addresses were not populated.


Thanks,

Bryan Bende


Re: Review Request 47133: RANGER-978 Usersync: Remove creation of default email address

Posted by Bryan Bende <bb...@gmail.com>.

> On May 12, 2016, 3:58 p.m., Sailaja Polavarapu wrote:
> > Currently in ranger admin side we are generating random GUID for email address if it is empty (src/main/java/org/apache/ranger/biz/UserMgr.java). Along with the change in usersync, I believe we also need to remove the code to generate random GUID for empty email address. Can you please make those changes as well?

Thanks Sailaja, I am looking into this. After removing the GUI generation in UserMgr I received an exception when creating a new user from the UI:

Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '' for key 'x_portal_user_UK_email'
Error Code: 1062
Call: INSERT INTO x_portal_user (ADDED_BY_ID, CREATE_TIME, EMAIL, FIRST_NAME, LAST_NAME, LOGIN_ID, NOTES, PASSWORD, PUB_SCR_NAME, STATUS, UPDATE_TIME, UPD_BY_ID, USER_SRC) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
	bind => [13 parameters bound]
Query: InsertObjectQuery(XXPortalUser={XXDBBase={createTime={Thu May 12 21:20:11 EDT 2016} updateTime={Thu May 12 21:20:11 EDT 2016} addedByUserId={1} updatedByUserId={1} }firstName={Bryan} lastName={} publicScreenName={bbende} loginId={bbende} password={***length=32***} emailAddress={} status={1} userSource={0} notes={null} })
	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
    
I'll keep looking at it, but really the intent of this JIRA I think was to not generate the default email address in the file-based usersync where it was generating "user@hostname".


- Bryan


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


On May 13, 2016, 1:06 p.m., Bryan Bende wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47133/
> -----------------------------------------------------------
> 
> (Updated May 13, 2016, 1:06 p.m.)
> 
> 
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-978
>     https://issues.apache.org/jira/browse/RANGER-978
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Removing one line that was populating an email address in the usersync and setting it to user@HOSTNAME.
> 
> 
> Diffs
> -----
> 
>   ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java 068c9df 
> 
> Diff: https://reviews.apache.org/r/47133/diff/
> 
> 
> Testing
> -------
> 
> Tested full build and ran usersync to verify email addresses were not populated.
> 
> 
> Thanks,
> 
> Bryan Bende
> 
>


Re: Review Request 47133: RANGER-978 Usersync: Remove creation of default email address

Posted by Sailaja Polavarapu <sp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47133/#review132931
-----------------------------------------------------------



Currently in ranger admin side we are generating random GUID for email address if it is empty (src/main/java/org/apache/ranger/biz/UserMgr.java). Along with the change in usersync, I believe we also need to remove the code to generate random GUID for empty email address. Can you please make those changes as well?

- Sailaja Polavarapu


On May 9, 2016, 7:51 p.m., Bryan Bende wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47133/
> -----------------------------------------------------------
> 
> (Updated May 9, 2016, 7:51 p.m.)
> 
> 
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Removing one line that was populating an email address in the usersync and setting it to user@HOSTNAME.
> 
> 
> Diffs
> -----
> 
>   ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java 068c9df 
> 
> Diff: https://reviews.apache.org/r/47133/diff/
> 
> 
> Testing
> -------
> 
> Tested full build and ran usersync to verify email addresses were not populated.
> 
> 
> Thanks,
> 
> Bryan Bende
> 
>


Re: Review Request 47133: RANGER-978 Usersync: Remove creation of default email address

Posted by Velmurugan Periasamy <vp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47133/#review133365
-----------------------------------------------------------


Ship it!




Ship It!

- Velmurugan Periasamy


On May 13, 2016, 2:24 p.m., Bryan Bende wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47133/
> -----------------------------------------------------------
> 
> (Updated May 13, 2016, 2:24 p.m.)
> 
> 
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-978
>     https://issues.apache.org/jira/browse/RANGER-978
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Removing one line that was populating an email address in the usersync and setting it to user@HOSTNAME.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/UserMgr.java bd7608d 
>   ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java 068c9df 
> 
> Diff: https://reviews.apache.org/r/47133/diff/
> 
> 
> Testing
> -------
> 
> Tested full build and ran usersync to verify email addresses were not populated.
> 
> 
> Thanks,
> 
> Bryan Bende
> 
>


Re: Review Request 47133: RANGER-978 Usersync: Remove creation of default email address

Posted by Bryan Bende <bb...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47133/
-----------------------------------------------------------

(Updated May 13, 2016, 2:24 p.m.)


Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.


Changes
-------

New patch that removes GUI generation in UserMgr and instead sets email address to null when it is empty to ensure we can insert into the DB.


Bugs: RANGER-978
    https://issues.apache.org/jira/browse/RANGER-978


Repository: ranger


Description
-------

Removing one line that was populating an email address in the usersync and setting it to user@HOSTNAME.


Diffs (updated)
-----

  security-admin/src/main/java/org/apache/ranger/biz/UserMgr.java bd7608d 
  ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java 068c9df 

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


Testing
-------

Tested full build and ran usersync to verify email addresses were not populated.


Thanks,

Bryan Bende


Re: Review Request 47133: RANGER-978 Usersync: Remove creation of default email address

Posted by Bryan Bende <bb...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47133/
-----------------------------------------------------------

(Updated May 13, 2016, 1:06 p.m.)


Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.


Bugs: RANGER-978
    https://issues.apache.org/jira/browse/RANGER-978


Repository: ranger


Description
-------

Removing one line that was populating an email address in the usersync and setting it to user@HOSTNAME.


Diffs
-----

  ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java 068c9df 

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


Testing
-------

Tested full build and ran usersync to verify email addresses were not populated.


Thanks,

Bryan Bende


Re: Review Request 47133: RANGER-978 Usersync: Remove creation of default email address

Posted by Velmurugan Periasamy <vp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47133/#review133032
-----------------------------------------------------------



Can you please include branch and Apache bug info also?

- Velmurugan Periasamy


On May 9, 2016, 7:51 p.m., Bryan Bende wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47133/
> -----------------------------------------------------------
> 
> (Updated May 9, 2016, 7:51 p.m.)
> 
> 
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Removing one line that was populating an email address in the usersync and setting it to user@HOSTNAME.
> 
> 
> Diffs
> -----
> 
>   ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java 068c9df 
> 
> Diff: https://reviews.apache.org/r/47133/diff/
> 
> 
> Testing
> -------
> 
> Tested full build and ran usersync to verify email addresses were not populated.
> 
> 
> Thanks,
> 
> Bryan Bende
> 
>