[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-17 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16131155#comment-16131155
 ] 

Hudson commented on HBASE-18437:


FAILURE: Integrated in Jenkins build HBASE-14070.HLC #233 (See 
[https://builds.apache.org/job/HBASE-14070.HLC/233/])
HBASE-18437 Revoke access permissions of a user from a table does not 
(apurtell: rev b0878184a31804a4bf061df7581964157b4849d5)
* (edit) 
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/Permission.java
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
* (edit) 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java


> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Fix For: 2.0.0, 3.0.0, 1.4.0, 1.3.2, 1.5.0
>
> Attachments: HBASE-18437.patch, HBASE-18437-v1.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-16 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128746#comment-16128746
 ] 

Hudson commented on HBASE-18437:


FAILURE: Integrated in Jenkins build HBase-Trunk_matrix #3542 (See 
[https://builds.apache.org/job/HBase-Trunk_matrix/3542/])
HBASE-18437 Revoke access permissions of a user from a table does not 
(apurtell: rev b0878184a31804a4bf061df7581964157b4849d5)
* (edit) 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
* (edit) 
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/Permission.java
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java


> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Fix For: 2.0.0, 3.0.0, 1.4.0, 1.3.2, 1.5.0
>
> Attachments: HBASE-18437.patch, HBASE-18437-v1.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-16 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128691#comment-16128691
 ] 

Hudson commented on HBASE-18437:


FAILURE: Integrated in Jenkins build HBase-2.0 #339 (See 
[https://builds.apache.org/job/HBase-2.0/339/])
HBASE-18437 Revoke access permissions of a user from a table does not 
(apurtell: rev 1f7873d305a50bcc78d2033cd5e2a3018baf5178)
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
* (edit) 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
* (edit) 
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/Permission.java


> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Fix For: 2.0.0, 3.0.0, 1.4.0, 1.3.2, 1.5.0
>
> Attachments: HBASE-18437.patch, HBASE-18437-v1.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-16 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128486#comment-16128486
 ] 

Hudson commented on HBASE-18437:


SUCCESS: Integrated in Jenkins build HBase-1.3-JDK8 #247 (See 
[https://builds.apache.org/job/HBase-1.3-JDK8/247/])
HBASE-18437 Revoke access permissions of a user from a table does not 
(apurtell: rev 7800fa152e3f5ecdd43391f9f2bb162bd33046c5)
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
* (edit) 
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/Permission.java
* (edit) 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java


> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Fix For: 2.0.0, 3.0.0, 1.4.0, 1.3.2, 1.5.0
>
> Attachments: HBASE-18437.patch, HBASE-18437-v1.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-16 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128480#comment-16128480
 ] 

Hudson commented on HBASE-18437:


FAILURE: Integrated in Jenkins build HBase-1.4 #861 (See 
[https://builds.apache.org/job/HBase-1.4/861/])
HBASE-18437 Revoke access permissions of a user from a table does not 
(apurtell: rev 5b27f6253ad7e561ee4a3b3491ec647be7c726b0)
* (edit) 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
* (edit) 
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/Permission.java
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java


> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Fix For: 2.0.0, 3.0.0, 1.4.0, 1.3.2, 1.5.0
>
> Attachments: HBASE-18437.patch, HBASE-18437-v1.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-16 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128435#comment-16128435
 ] 

Hudson commented on HBASE-18437:


FAILURE: Integrated in Jenkins build HBase-1.5 #8 (See 
[https://builds.apache.org/job/HBase-1.5/8/])
HBASE-18437 Revoke access permissions of a user from a table does not 
(apurtell: rev a49d43bfbf8f839ad897f36996bf75a1578d9397)
* (edit) 
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/Permission.java
* (edit) 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java


> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Fix For: 2.0.0, 3.0.0, 1.4.0, 1.3.2, 1.5.0
>
> Attachments: HBASE-18437.patch, HBASE-18437-v1.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-15 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128355#comment-16128355
 ] 

Hudson commented on HBASE-18437:


SUCCESS: Integrated in Jenkins build HBase-1.3-IT #169 (See 
[https://builds.apache.org/job/HBase-1.3-IT/169/])
HBASE-18437 Revoke access permissions of a user from a table does not 
(apurtell: rev 7800fa152e3f5ecdd43391f9f2bb162bd33046c5)
* (edit) 
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/Permission.java
* (edit) 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java


> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Fix For: 2.0.0, 3.0.0, 1.4.0, 1.3.2, 1.5.0
>
> Attachments: HBASE-18437.patch, HBASE-18437-v1.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-15 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128349#comment-16128349
 ] 

Hudson commented on HBASE-18437:


FAILURE: Integrated in Jenkins build HBase-1.3-JDK7 #234 (See 
[https://builds.apache.org/job/HBase-1.3-JDK7/234/])
HBASE-18437 Revoke access permissions of a user from a table does not 
(apurtell: rev 7800fa152e3f5ecdd43391f9f2bb162bd33046c5)
* (edit) 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
* (edit) 
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/Permission.java
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java


> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Fix For: 2.0.0, 3.0.0, 1.4.0, 1.3.2, 1.5.0
>
> Attachments: HBASE-18437.patch, HBASE-18437-v1.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-11 Thread Ted Yu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123182#comment-16123182
 ] 

Ted Yu commented on HBASE-18437:


lgtm

> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Attachments: HBASE-18437.patch, HBASE-18437-v1.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-11 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123180#comment-16123180
 ] 

Hadoop QA commented on HBASE-18437:
---

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 15m 
11s{color} | {color:blue} Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} hbaseanti {color} | {color:green}  0m  
0s{color} | {color:green} Patch does not have any anti-patterns. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
36s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  4m 
31s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m 
16s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  1m 
 2s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green}  0m 
33s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  5m 
35s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
59s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
20s{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
21s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m 
12s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m 
12s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
58s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green}  0m 
38s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 
38m 15s{color} | {color:green} Patch does not cause any errors with Hadoop 
2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3 or 3.0.0-alpha4. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  5m 
28s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
1s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  3m  
9s{color} | {color:green} hbase-client in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}129m 
19s{color} | {color:green} hbase-server in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
35s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black}212m 43s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=1.11.2 Server=1.11.2 Image:yetus/hbase:bdc94b1 |
| JIRA Issue | HBASE-18437 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12881409/HBASE-18437-v1.patch |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  hadoopcheck  
hbaseanti  checkstyle  compile  |
| uname | Linux cb72b755358e 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 
14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/component/dev-support/hbase-personality.sh
 |
| git revision | master / 679f34e |
| Default Java | 1.8.0_144 |
| findbugs | v3.1.0-RC3 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HBASE-Build/8032/testReport/ |
| modules | C: hbase-client hbase-server U: . |
| Console output | 
https://builds.apache.org/job/PreCommit-HBASE-Build/8032/console |
| Powered by | Apache Yetus 0.4.0   http://yetus.apache.org |


This message was automatically generated.



> Revoke access permissions of

[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-10 Thread Andrew Purtell (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16122075#comment-16122075
 ] 

Andrew Purtell commented on HBASE-18437:


Ok, so it looks like some quick work to add comments is all that remains, then 
I will be happy to commit this.

> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Attachments: HBASE-18437.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-08 Thread Anoop Sam John (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119432#comment-16119432
 ] 

Anoop Sam John commented on HBASE-18437:


Pls add some comments around these code lines usages that the query will return 
what results and we pick up auth for the table for the user.

> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Attachments: HBASE-18437.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-07 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16117755#comment-16117755
 ] 

Ashish Singhi commented on HBASE-18437:
---

bq. The permsList is obtained for this user and why again user check? Sorry not 
getting. Or u have to check the table details?
The permlist is obtained for acl table, the row key in acl table is the 
tablename, it will return all the global user names.
Below is the acl table scan output for better understanding,
{noformat}
hbase(main):011:0> scan 'hbase:acl'
ROW  COLUMN+CELL
 hbase:acl   column=l:ashish, 
timestamp=1502156949293, value=RWXCA
 hbase:acl   column=l:singhi, 
timestamp=1502159481193, value=RW
 t1  column=l:hbase, 
timestamp=1501849980130, value=RWXCA
 t12 column=l:hbase, 
timestamp=1502156979137, value=RWXCA
3 row(s) in 0.0140 seconds
{noformat}

> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Attachments: HBASE-18437.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-07 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16117750#comment-16117750
 ] 

Ashish Singhi commented on HBASE-18437:
---

I will try to give a patch by tonight (China time) if not able to then anyone 
can feel free assign the jira to them self and take it forward.

> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Attachments: HBASE-18437.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-08-07 Thread Andrew Purtell (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16117679#comment-16117679
 ] 

Andrew Purtell commented on HBASE-18437:


[~ashish singhi] [~anoop.hbase] This looks almost ready to go. What do you 
think about finishing it? Or should someone else take it up to finish it?

> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Attachments: HBASE-18437.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-07-28 Thread Anoop Sam John (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16104826#comment-16104826
 ] 

Anoop Sam John commented on HBASE-18437:


bq.if 
(Bytes.toString(perm.getUser()).equals(Bytes.toString(userPerm.getUser( {
The permsList is obtained for this user and why again user check? Sorry not 
getting.  Or u have to check the table details?
bq.perm.setActions(leftActions.toArray(new 
Permission.Action[leftActions.size()]));
Should we create new UserPermission instance than adding this setter? Seems 
like as per design the actions has to be final (Even though it is not marked so)

> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Attachments: HBASE-18437.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-07-27 Thread Ted Yu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16103086#comment-16103086
 ] 

Ted Yu commented on HBASE-18437:


lgtm
{code}
+  List leftActions = new ArrayList<>();
{code}
leftActions -> remainingActions



> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Attachments: HBASE-18437.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-07-27 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16103053#comment-16103053
 ] 

Ashish Singhi commented on HBASE-18437:
---

Can some one review this ?

> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Attachments: HBASE-18437.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-07-25 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16100866#comment-16100866
 ] 

Hadoop QA commented on HBASE-18437:
---

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
15s{color} | {color:blue} Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} hbaseanti {color} | {color:green}  0m  
0s{color} | {color:green} Patch does not have any anti-patterns. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  1m  
1s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  4m 
37s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m 
22s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  1m 
 4s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green}  0m 
42s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  5m 
31s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
9s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
21s{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
27s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m 
18s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m 
18s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  1m 
 1s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green}  0m 
34s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 
41m 12s{color} | {color:green} Patch does not cause any errors with Hadoop 
2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3 or 3.0.0-alpha4. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  6m 
24s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
7s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  3m 
15s{color} | {color:green} hbase-client in the patch passed. {color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red}134m 33s{color} 
| {color:red} hbase-server in the patch failed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
40s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black}208m 16s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| Timed out junit tests | 
org.apache.hadoop.hbase.replication.TestReplicationStatus |
|   | org.apache.hadoop.hbase.replication.TestReplicationSyncUpTool |
|   | org.apache.hadoop.hbase.replication.TestReplicationKillMasterRSCompressed 
|
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=1.11.2 Server=1.11.2 Image:yetus/hbase:bdc94b1 |
| JIRA Issue | HBASE-18437 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12878811/HBASE-18437.patch |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  hadoopcheck  
hbaseanti  checkstyle  compile  |
| uname | Linux 43eaa9173829 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 
14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/component/dev-support/hbase-personality.sh
 |
| git revision | master / c891642 |
| Default Java | 1.8.0_131 |
| findbugs | v3.1.0-RC3 |
| unit | 
https://builds.apache.org/job/PreCommit-HBASE-Build/7782/artifact/patchprocess/patch-unit-hbase-ser

[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-07-25 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16100153#comment-16100153
 ] 

Ashish Singhi commented on HBASE-18437:
---

[~anoop.hbase], yes and that is how I have handled in the patch.

> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
> Attachments: HBASE-18437.patch
>
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-18437) Revoke access permissions of a user from a table does not work as expected

2017-07-23 Thread Anoop Sam John (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16097942#comment-16097942
 ] 

Anoop Sam John commented on HBASE-18437:


Seems like the Actions passed in the revoke API is not at all considered in 
server side. Its been PBed to server.  There just creating a Delete and that 
will end up deleting the table's user permission cells.  Here as passing only 
one action, it is supposed to upsert a new cell (RK : TableName, CF : fixedCF, 
Qualifier :User) with remaining permission(s)

> Revoke access permissions of a user from a table does not work as expected
> --
>
> Key: HBASE-18437
> URL: https://issues.apache.org/jira/browse/HBASE-18437
> Project: HBase
>  Issue Type: Bug
>  Components: security
>Affects Versions: 1.1.12
>Reporter: Ashish Singhi
>Assignee: Ashish Singhi
>
> A table for which a user was granted 'RW' permission. Now when we want to 
> revoke its 'W' permission only, code removes the user itself from that table 
> permissions.
> Below is the test code which reproduces the issue.
> {noformat}
> @Test(timeout = 18)
>   public void testRevokeOnlySomePerms() throws Throwable {
> TableName name = TableName.valueOf("testAgain");
> HTableDescriptor htd = new HTableDescriptor(name);
> HColumnDescriptor hcd = new HColumnDescriptor("cf");
> htd.addFamily(hcd);
> createTable(TEST_UTIL, htd);
> TEST_UTIL.waitUntilAllRegionsAssigned(name);
> try (Connection conn = ConnectionFactory.createConnection(conf)) {
>   AccessControlClient.grant(conn, name, USER_RO.getShortName(), null, 
> null, Action.READ, Action.WRITE);
>   ListMultimap tablePermissions = 
> AccessControlLists.getTablePermissions(conf, name);
>   // hbase user and USER_RO has permis
>   assertEquals(2, tablePermissions.size());
>   AccessControlClient.revoke(conn, name, USER_RO.getShortName(), null, 
> null, Action.WRITE);
>   tablePermissions = AccessControlLists.getTablePermissions(conf, name);
>   List userPerm = 
> tablePermissions.get(USER_RO.getShortName());
>   assertEquals(1, userPerm.size());
> } finally {
>   deleteTable(TEST_UTIL, name);
> }
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)