[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-20 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14372304#comment-14372304
 ] 

Hudson commented on HBASE-13241:


SUCCESS: Integrated in HBase-0.98-on-Hadoop-1.1 #868 (See 
[https://builds.apache.org/job/HBase-0.98-on-Hadoop-1.1/868/])
HBASE-13241 Add tests for group level grants (matteo.bertozzi: rev 
3a420fd3f69cbadcbac33e8a6484af17dceb9a07)
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController2.java


 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Fix For: 2.0.0, 1.0.1, 1.1.0, 0.98.12

 Attachments: HBASE-13241-0.98.patch, HBASE-13241-v1.patch, 
 HBASE-13241-v2.patch, HBASE-13241-v3.patch, HBASE-13241-v4.patch, 
 HBASE-13241-v5.patch, HBASE-13241-v6.patch, HBASE-13241-v7.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-20 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14371695#comment-14371695
 ] 

Ashish Singhi commented on HBASE-13241:
---

[~mbertozzi] I have attached patch for 0.98 can we commit it.
Thanks

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Fix For: 2.0.0, 1.0.1, 1.1.0

 Attachments: HBASE-13241-0.98.patch, HBASE-13241-v1.patch, 
 HBASE-13241-v2.patch, HBASE-13241-v3.patch, HBASE-13241-v4.patch, 
 HBASE-13241-v5.patch, HBASE-13241-v6.patch, HBASE-13241-v7.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-20 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14372224#comment-14372224
 ] 

Hudson commented on HBASE-13241:


SUCCESS: Integrated in HBase-0.98 #914 (See 
[https://builds.apache.org/job/HBase-0.98/914/])
HBASE-13241 Add tests for group level grants (matteo.bertozzi: rev 
3a420fd3f69cbadcbac33e8a6484af17dceb9a07)
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController2.java


 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Fix For: 2.0.0, 1.0.1, 1.1.0, 0.98.12

 Attachments: HBASE-13241-0.98.patch, HBASE-13241-v1.patch, 
 HBASE-13241-v2.patch, HBASE-13241-v3.patch, HBASE-13241-v4.patch, 
 HBASE-13241-v5.patch, HBASE-13241-v6.patch, HBASE-13241-v7.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-19 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14370371#comment-14370371
 ] 

Hudson commented on HBASE-13241:


FAILURE: Integrated in HBase-TRUNK #6281 (See 
[https://builds.apache.org/job/HBase-TRUNK/6281/])
HBASE-13241 Add tests for group level grants (matteo.bertozzi: rev 
2bf904f216ab8315c37a65e4860f51c526a3b654)
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController2.java


 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Fix For: 2.0.0, 1.0.1, 1.1.0

 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241-v6.patch, HBASE-13241-v7.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-19 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14370430#comment-14370430
 ] 

Hudson commented on HBASE-13241:


FAILURE: Integrated in HBase-1.1 #306 (See 
[https://builds.apache.org/job/HBase-1.1/306/])
HBASE-13241 Add tests for group level grants (matteo.bertozzi: rev 
14fa34513e6d731b3b51b5ee6de7e784ccbb9678)
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController2.java


 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Fix For: 2.0.0, 1.0.1, 1.1.0

 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241-v6.patch, HBASE-13241-v7.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-19 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14368816#comment-14368816
 ] 

Ashish Singhi commented on HBASE-13241:
---

Thanks for reviewing.
Addressed the comments.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241-v6.patch, HBASE-13241-v7.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-19 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14368769#comment-14368769
 ] 

Ashish Singhi commented on HBASE-13241:
---

Attached patch addressing the concerns.
I have removed test which was just verifying grant and revoke permissions as it 
was not much value add.
In the new test I have two groups each having one user. The test verifies 
whether user from the group which has access is able to scan the table and 
retrieve the expected result and the user from other group which does not have 
access should not be able to scan the table.

Please review.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241-v6.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-19 Thread Matteo Bertozzi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14368792#comment-14368792
 ] 

Matteo Bertozzi commented on HBASE-13241:
-

a couple of things:

replace waitTableEnabled() with waitUntilAllRegionsAssigned()

since you have multiple and different actions/checks grouped in a single test. 
add a message to the assert. assert(msg, cond), at least it will be easy to 
identify what may be the problem without looking at the code. otherwise the 
failure will look like this
{noformat}
java.lang.AssertionError: null
at org.junit.Assert.fail(Assert.java:86)
at 
org.apache.hadoop.hbase.security.access.TestAccessController2$7.run(TestAccessController2.java:362)
at 
org.apache.hadoop.hbase.security.access.TestAccessController2$7.run(TestAccessController2.java:354)
...
at 
org.apache.hadoop.hbase.security.access.SecureTestUtil.verifyAllowed(SecureTestUtil.java:160)
at 
org.apache.hadoop.hbase.security.access.TestAccessController2.testPostGrantAndRevokeScanAction(TestAccessController2.java:424)
{noformat}

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241-v6.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-19 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14368892#comment-14368892
 ] 

Hadoop QA commented on HBASE-13241:
---

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12705545/HBASE-13241-v6.patch
  against master branch at commit 535ebbfde9e424fab27f79bfa6b40964c4918fc6.
  ATTACHMENT ID: 12705545

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 4 new 
or modified tests.

{color:green}+1 hadoop versions{color}. The patch compiles with all 
supported hadoop versions (2.4.1 2.5.2 2.6.0)

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 checkstyle{color}.  The applied patch does not increase the 
total number of checkstyle errors

{color:red}-1 findbugs{color}.  The patch appears to introduce 1 new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

{color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Checkstyle Errors: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//artifact/patchprocess/checkstyle-aggregate.html

  Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13312//console

This message is automatically generated.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241-v6.patch, HBASE-13241-v7.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-19 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14370428#comment-14370428
 ] 

Hudson commented on HBASE-13241:


FAILURE: Integrated in HBase-1.0 #815 (See 
[https://builds.apache.org/job/HBase-1.0/815/])
HBASE-13241 Add tests for group level grants (matteo.bertozzi: rev 
aceb4e804ddeebfbc769c1685b7846e59f2eb6e8)
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController2.java


 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Fix For: 2.0.0, 1.0.1, 1.1.0

 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241-v6.patch, HBASE-13241-v7.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-19 Thread Srikanth Srungarapu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14370105#comment-14370105
 ] 

Srikanth Srungarapu commented on HBASE-13241:
-

Patch looks great to me. +1(non-binding). 

If interested, we can create a follow on jira, which introduces helper method 
convertToGroup which abstracts out the logic for appending '@' symbol to 
groupname.

[~ashish singhi] Thanks for putting up with me :)

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241-v6.patch, HBASE-13241-v7.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-19 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14369640#comment-14369640
 ] 

Ashish Singhi commented on HBASE-13241:
---

Findbug warning is not related to this patch and will be fixed as part of 
HBASE-13199

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241-v6.patch, HBASE-13241-v7.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-18 Thread Matteo Bertozzi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14366897#comment-14366897
 ] 

Matteo Bertozzi commented on HBASE-13241:
-

I see only in one place the assert on the scan result
{code}
+ Scan s1 = new Scan();
+ try (ResultScanner scanner1 = table.getScanner(s1);) {
+   Result[] next1 = scanner1.next(5);
+   assertTrue(next1.length == 3);
+ }
{code}

all the other checks seem to just verify if the AccessDeniedException was 
received or not, so verifyAllowed()/verifyDenied() should be enough. if not 
why? what is the difference with the other scanAction we have already?
{code}
+ try (ResultScanner scanner1 = table.getScanner(s1);) {
+   fail(Access should be denied as the user  + USER1_TESTGROUP_QUALIFIER
+   +  read privilege has been revoked on column family qualifier 
+   + Bytes.toString(TEST_FAMILY) + ':' + Bytes.toString(Q1));
+ } catch (AccessDeniedException ignore) {
+ }
{code}



 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-18 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14366957#comment-14366957
 ] 

Ashish Singhi commented on HBASE-13241:
---

Thanks [~mbertozzi] for taking a look.
bq. I see only in one place the assert on the scan result
We have it at three different places with different values expected.
1. {code}
+ Scan s1 = new Scan();
+  try (ResultScanner scanner1 = table.getScanner(s1);) {
+Result[] next1 = scanner1.next(5);
+assertTrue(next1.length == 3);
+  }
{code}
2. {code}
+ Scan s1 = new Scan();
+  try (ResultScanner scanner1 = table.getScanner(s1);) {
+Result[] next1 = scanner1.next(5);
+assertTrue(next1.length == 2);
+  }
{code}
 3. {code}
+ Scan s1 = new Scan();
+  try (ResultScanner scanner1 = table.getScanner(s1);) {
+Result[] next1 = scanner1.next(5);
+assertTrue(next1.length == 1);
+  }
{code}

bq. all the other checks seem to just verify if the AccessDeniedException was 
received or not, so verifyAllowed()/verifyDenied() should be enough. if not why?
I tried that way when [~srikanth235] offline suggested me, but here at each 
level we have different results.
Like when we grant a group, table level access then a user from it can perform 
scan at family level also but its not the same when we grant a group, access at 
qualifier level. So I will have to create so many actions for it to have it in 
one test which I did some what in my first patch but [~busbey] had some other 
thought and I felt it was reasonable, so I broke this test at different levels. 
Also verifyAllowed() and verifyDenied() internally uses user.runAs api.

bq. what is the difference with the other scanAction we have already?
If you are pointing at scanAction in TestAccessController#testRead then here we 
are not asserting scan result, we are checking whether user with READ access 
are able to scan the table or not.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-18 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14366796#comment-14366796
 ] 

Hadoop QA commented on HBASE-13241:
---

{color:green}+1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12705281/HBASE-13241-v5.patch
  against master branch at commit f9a17edc252a88c5a1a2c7764e3f9f65623e0ced.
  ATTACHMENT ID: 12705281

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 4 new 
or modified tests.

{color:green}+1 hadoop versions{color}. The patch compiles with all 
supported hadoop versions (2.4.1 2.5.2 2.6.0)

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 checkstyle{color}.  The applied patch does not increase the 
total number of checkstyle errors

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

{color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html
Checkstyle Errors: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//artifact/patchprocess/checkstyle-aggregate.html

  Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13292//console

This message is automatically generated.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-18 Thread Matteo Bertozzi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14367274#comment-14367274
 ] 

Matteo Bertozzi commented on HBASE-13241:
-

ok, let's look at it in a different way.
when you look at the other tests written with verifyAllowed()/verifyDenied() it 
is clear what the behavior is without even looking at the action implementation.
when you have everything in a single block like the 
USER1_TESTGROUP_QUALIFIER.runAs(), you have to look at the code and figure out 
what is doing. and then there is the question, why are we testing for denied 
just for a single user? what about the others..
yes, it may result in more code, because you have to break down in more 
actions. but in my opinion it is easier to read and extend. also for someone 
that want to add a new test is easier to decide what to do, if every test is 
using verifyAllowed/denied I should do that too.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-18 Thread Srikanth Srungarapu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14367291#comment-14367291
 ] 

Srikanth Srungarapu commented on HBASE-13241:
-

Completely agree with Matteo. Similar concerns when I posted my previous 
comment. Let's do one thing. I'll try to create a sample patch for only 
verifying at qualifier level (will get feedback from Sean and Matteo too), and 
attach it here. If you like it too, you can build upon it. What say, [~ashish 
singhi]?

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-18 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14367427#comment-14367427
 ] 

Ashish Singhi commented on HBASE-13241:
---

Thanks Matteo for the detailed explanation and Srikanth for the offer. 
If everyone is ok with what Matteo says I will prepare a patch by tomorrow 
morning as per IST. 
Thanks again. 

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-18 Thread Srikanth Srungarapu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14367631#comment-14367631
 ] 

Srikanth Srungarapu commented on HBASE-13241:
-

bq. If everyone is ok with what Matteo says I will prepare a patch by tomorrow 
morning as per IST. 
Sure, go for it.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241-v5.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-17 Thread Srikanth Srungarapu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14365269#comment-14365269
 ] 

Srikanth Srungarapu commented on HBASE-13241:
-

[~ashish singhi] Thanks for so much for taking care of adding coverage for 
groups, which is a missing piece in the security testing. I'm desperate to give 
+1 on this as you can see from our offline communication. Had a little chat 
with [~mbertozzi] on v4, and I'm afraid that I couldn't let this pass through.
* Please avoid checking whether grants are possible and verification of the 
scans in one test. 
* Please avoid doing things like USER1_TESTGROUP_TABLE.runAs. As you can see 
from the existing testing infrastructure, we generally create an action and use 
it with verifyAllowed and verifyDenied.
* In short, as already suggested, I'm looking for something similar to 
TestAccessController#testGrantRevoke for verifying whether groups belonging to 
proper groups can grant and 
TestAccessController#testPostGrantRevokeAtQualifierLevel for verifying whether 
scans work assuming grants were already involved.
* But if you have something in mind about why we can't do this, please let us 
know.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-17 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14365045#comment-14365045
 ] 

Ashish Singhi commented on HBASE-13241:
---

I have added the new tests in TestAccessController2 class.
Added tests for grant and revoke operations for a scan operation on the table.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-17 Thread Ted Yu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14365133#comment-14365133
 ] 

Ted Yu commented on HBASE-13241:


TestAccessController2 passed in the on-going QA run

+1 from me.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-17 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14365167#comment-14365167
 ] 

Hadoop QA commented on HBASE-13241:
---

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12705074/HBASE-13241-v4.patch
  against master branch at commit 2b08653a79a8ed0ae8501a110b79f9ea23e808d4.
  ATTACHMENT ID: 12705074

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 4 new 
or modified tests.

{color:green}+1 hadoop versions{color}. The patch compiles with all 
supported hadoop versions (2.4.1 2.5.2 2.6.0)

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 checkstyle{color}.  The applied patch does not increase the 
total number of checkstyle errors

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
++  does not have read privilege on column family  + 
Bytes.toString(TEST_FAMILY_2));
++  does not have read privilege on column family  + 
Bytes.toString(TEST_FAMILY_2));

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

{color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Checkstyle Errors: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//artifact/patchprocess/checkstyle-aggregate.html

  Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13282//console

This message is automatically generated.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-17 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14365516#comment-14365516
 ] 

Ashish Singhi commented on HBASE-13241:
---

Thanks Ted for looking into it.

Thanks Srikanth for your comments.

bq. Please avoid checking whether grants are possible and verification of the 
scans in one test.
To verify scan, I will have to grant permission to a entity in the table which 
I will already do it as part of grant check. So wouldn't it duplicate the code ?

bq. Please avoid doing things like USER1_TESTGROUP_TABLE.runAs. As you can see 
from the existing testing infrastructure, we generally create an action and use 
it with verifyAllowed and verifyDenied.
I thought of doing it in that way, but in that case I will not be able to 
assert the result of scan operation output and this what is mainly required to 
test HBASE-13239

bq. In short, as already suggested, I'm looking for something similar to 
TestAccessController#testGrantRevoke for verifying whether groups belonging to 
proper groups can grant and 
TestAccessController#testPostGrantRevokeAtQualifierLevel for verifying whether 
scans work assuming grants were already involved.
As I told in my first response this will lead to duplication of code if I break 
veryification of grants/revokes whether it is possible or not and assertion of 
scan result.

As [~busbey] asked 
[here|https://issues.apache.org/jira/browse/HBASE-13241?focusedCommentId=14361909page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14361909]
 I have broke the tests at table, column family and qualifier level and added 
tests to verify scan result.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241-v4.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-16 Thread Srikanth Srungarapu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14364276#comment-14364276
 ] 

Srikanth Srungarapu commented on HBASE-13241:
-

Just a thought. Can we add the new test to TestAccessController2 instead of 
creating a new test class?

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-16 Thread Andrew Purtell (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14363870#comment-14363870
 ] 

Andrew Purtell commented on HBASE-13241:


There is TestAccessController2 where we already started splitting out 
AccessController tests out of TestAccessController. 
+1 to not adding more units to TestAccessController in general.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-15 Thread Ted Yu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362401#comment-14362401
 ] 

Ted Yu commented on HBASE-13241:


bq. TestAccessController is already a heavy test class having 57 test cases.
From trunk build #6261:
{code}
Tests run: 57, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 83.364 sec - 
in org.apache.hadoop.hbase.security.access.TestAccessController
{code}
I am fine with creating new test class for verifying user group access control.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-15 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362267#comment-14362267
 ] 

Ashish Singhi commented on HBASE-13241:
---

Removed TestAccessController change. It looks like after changing it to 
TEST_TABLE.getNameSpaceAsString() in below code test cases started failing.
{code}
assertEquals(0, AccessControlLists.getNamespacePermissions(conf, 
TEST_TABLE.getTableName().getNameAsString()).size());
{code}
Need to take a closer look to find out the reason and this can be done in a 
separate jira IMHO.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-15 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362263#comment-14362263
 ] 

Ashish Singhi commented on HBASE-13241:
---

bq. Per my understanding, what the following statement does is it tries to 
check whether the users SUPERUSER, USER1_TESTGROUP_TABLE, USER2_TESTGROUP_TABLE 
were able to perform grantActionAtTableLevel action which is granting 
permissions to group. Please try looking at 
TestAccessController#testGrantRevoke for more background. So, my guess we don't 
need these statements as we're concerned about whether scan works for the users 
having proper actions.
*TestAccessController#testGrantRevoke* is granting permission to a user and 
testing for that user.
Where as *TestAccessControllerWithGroups#testGrantAtTableLevel* is granting 
permission to a group and testing for the users in that group. I did not find 
any test case for that and is this what the jira description says to test group 
level grants and this at table level.
Or is there any already existing test case where we grant permission to a group 
and test for the required permissions for the user in that group ?

bq. My suggestion is instead of adding a new test class which spins up a new 
cluster, we can make use of existing 
TestAccessController#testPostGrantRevokeAtQualifierLevel by adding new groups 
with users in them and add them to verifyAllowed, verifyDenied appropriately. 
What do you think?
*TestAccessController* is already a heavy test class having 57 test cases. So I 
thought of making a new one in which we can try to cover all the operation 
applicable for group level like revoke and e.t.c. For now its only for grant as 
per the jira scope.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-15 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362270#comment-14362270
 ] 

Ashish Singhi commented on HBASE-13241:
---

bq. Need to take a closer look to find out the reason and this can be done in a 
separate jira IMHO.
Created HBASE-13246 to handle this.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-15 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362311#comment-14362311
 ] 

Hadoop QA commented on HBASE-13241:
---

{color:green}+1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12704645/HBASE-13241-v3.patch
  against master branch at commit 01bc979ea29e9282786de13c1cb8cbc107e92e9f.
  ATTACHMENT ID: 12704645

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 4 new 
or modified tests.

{color:green}+1 hadoop versions{color}. The patch compiles with all 
supported hadoop versions (2.4.1 2.5.2 2.6.0)

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 checkstyle{color}.  The applied patch does not increase the 
total number of checkstyle errors

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

{color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Checkstyle Errors: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//artifact/patchprocess/checkstyle-aggregate.html

  Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13250//console

This message is automatically generated.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241-v3.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Ted Yu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14361997#comment-14361997
 ] 

Ted Yu commented on HBASE-13241:


[~ashish singhi]:
Thanks for working over the weekend.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14361982#comment-14361982
 ] 

Hadoop QA commented on HBASE-13241:
---

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12704605/HBASE-13241.patch
  against master branch at commit 72855c584e53173471c44a284ef2e839b6f31564.
  ATTACHMENT ID: 12704605

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 4 new 
or modified tests.

{color:green}+1 hadoop versions{color}. The patch compiles with all 
supported hadoop versions (2.4.1 2.5.2 2.6.0)

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 checkstyle{color}.  The applied patch does not increase the 
total number of checkstyle errors

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

{color:green}+1 core tests{color}.  The patch passed unit tests in .

 {color:red}-1 core zombie tests{color}.  There are 1 zombie test(s):   
at 
org.apache.camel.test.junit4.CamelTestSupport.doStopCamelContext(CamelTestSupport.java:450)
at 
org.apache.camel.test.junit4.CamelTestSupport.tearDown(CamelTestSupport.java:351)

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html
Checkstyle Errors: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//artifact/patchprocess/checkstyle-aggregate.html

  Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13246//console

This message is automatically generated.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Srikanth Srungarapu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14361995#comment-14361995
 ] 

Srikanth Srungarapu commented on HBASE-13241:
-

A few concerns:
* Shouldn't be we use TEST_TABLE.getNameSpaceAsString()?
{code}
+assertEquals(0, AccessControlLists.getNamespacePermissions(conf, 
TEST_TABLE.getNameAsString())
+.size());
{code}
* It would be better if we can also check that scan fails for unauthorized 
users.
* Couldn't understand why this should pass for USER1_TESTGROUP_TABLE? Are we 
giving this user any special perms during set up? May be, I'm missing something 
here.
{code}
+verifyAllowed(grantActionAtTableLevel, SUPERUSER, USER1_TESTGROUP_TABLE, 
USER2_TESTGROUP_TABLE);
{code}

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362002#comment-14362002
 ] 

Ashish Singhi commented on HBASE-13241:
---

Thanks Srikanth for the comments.
bq. Shouldn't be we use TEST_TABLE.getNameSpaceAsString()?
Typical copy paste error, copied it from TestAccesController class. Will 
correct at both the places.

bq. It would be better if we can also check that scan fails for unauthorized 
users.
Will address in the next patch.

bq. Couldn't understand why this should pass for USER1_TESTGROUP_TABLE? Are we 
giving this user any special perms during set up? May be, I'm missing something 
here.
USER1_TESTGROUP_TABLE belongs to TESTGROUP_TABLE group
{noformat}
+USER1_TESTGROUP_TABLE =
+User.createUserForTesting(conf, test_table1, new String[] { 
TESTGROUP_TABLE });
{noformat}
 and we are granting required (ADMIN and READ) permsissions to it in 
{{testGrantAtTableLevel}} method. Hence it passes.
{noformat}
+  ProtobufUtil.grant(protocol, '@' + TESTGROUP_TABLE, TEST_TABLE, 
null, null, Action.ADMIN,
+Action.READ);
{noformat}

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362034#comment-14362034
 ] 

Ashish Singhi commented on HBASE-13241:
---

[~tedyu], It's my pleasure working here.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362053#comment-14362053
 ] 

Hadoop QA commented on HBASE-13241:
---

{color:green}+1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12704615/HBASE-13241-v1.patch
  against master branch at commit 72855c584e53173471c44a284ef2e839b6f31564.
  ATTACHMENT ID: 12704615

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 4 new 
or modified tests.

{color:green}+1 hadoop versions{color}. The patch compiles with all 
supported hadoop versions (2.4.1 2.5.2 2.6.0)

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 checkstyle{color}.  The applied patch does not increase the 
total number of checkstyle errors

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

{color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Checkstyle Errors: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//artifact/patchprocess/checkstyle-aggregate.html

  Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13247//console

This message is automatically generated.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14361990#comment-14361990
 ] 

Ashish Singhi commented on HBASE-13241:
---

Addressed the review comments.
{{testGrantAtQualifierLevel}} should fail without HBASE-13239 fix.

Thanks

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362095#comment-14362095
 ] 

Hadoop QA commented on HBASE-13241:
---

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12704621/HBASE-13241-v2.patch
  against master branch at commit 72855c584e53173471c44a284ef2e839b6f31564.
  ATTACHMENT ID: 12704621

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 8 new 
or modified tests.

{color:green}+1 hadoop versions{color}. The patch compiles with all 
supported hadoop versions (2.4.1 2.5.2 2.6.0)

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 checkstyle{color}.  The applied patch does not increase the 
total number of checkstyle errors

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
   
org.apache.hadoop.hbase.security.access.TestAccessController
  
org.apache.hadoop.hbase.security.access.TestAccessControllerWithGroups

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html
Checkstyle Errors: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//artifact/patchprocess/checkstyle-aggregate.html

  Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/13248//console

This message is automatically generated.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Ted Yu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362097#comment-14362097
 ] 

Ted Yu commented on HBASE-13241:


In the latest QA run, I saw:
{code}
testGrantAtQualifierLevel(org.apache.hadoop.hbase.security.access.TestAccessControllerWithGroups)
  Time elapsed: 2.201 sec   FAILURE!
java.lang.AssertionError: null
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at 
org.apache.hadoop.hbase.security.access.TestAccessControllerWithGroups$6.run(TestAccessControllerWithGroups.java:328)
at 
org.apache.hadoop.hbase.security.access.TestAccessControllerWithGroups$6.run(TestAccessControllerWithGroups.java:320)
{code}
With fix from HBASE-13239, the test passes.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Srikanth Srungarapu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362239#comment-14362239
 ] 

Srikanth Srungarapu commented on HBASE-13241:
-

A few comments.
- Per my understanding, what the following statement does is it tries to check 
whether the users SUPERUSER, USER1_TESTGROUP_TABLE, USER2_TESTGROUP_TABLE were 
able to perform grantActionAtTableLevel action which is granting permissions to 
group. Please try looking at *TestAccessController#testGrantRevoke* for more 
background. So, my guess we don't need these statements as we're concerned 
about whether scan works for the users having proper actions.
{code}
+verifyAllowed(grantActionAtTableLevel, SUPERUSER, USER1_TESTGROUP_TABLE, 
USER2_TESTGROUP_TABLE);
{code}
- My suggestion is instead of adding a new test class which spins up a new 
cluster, we can make use of existing 
*TestAccessController#testPostGrantRevokeAtQualifierLevel* by adding new groups 
with users in them and add them to verifyAllowed, verifyDenied appropriately. 
What do you think?

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security, test
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241-v1.patch, HBASE-13241-v2.patch, 
 HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Sean Busbey (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14361909#comment-14361909
 ] 

Sean Busbey commented on HBASE-13241:
-

I tried running this locally without the patch for HBASE-13239 and it passed. 
looking at the tests, it looks like we only verify that the GRANT action will 
succeed and not that the access represented in the grant is enforced.

* Could you break this into individual tests instead of one that covers 
everything?
* Could you add tests that attempt to retrieve results based on the given grant 
level?

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Ashish Singhi (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14361891#comment-14361891
 ] 

Ashish Singhi commented on HBASE-13241:
---

Will move this jira to patch available state after HBASE-13239 is pushed as it 
depends on that fix.

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-13241) Add tests for group level grants

2015-03-14 Thread Sean Busbey (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-13241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14361901#comment-14361901
 ] 

Sean Busbey commented on HBASE-13241:
-

I'm going to send this to QA now, because I'd like to push both commits 
together. (and confirmation that the test shows HBASE-13239 as broken would be 
nice)

 Add tests for group level grants
 

 Key: HBASE-13241
 URL: https://issues.apache.org/jira/browse/HBASE-13241
 Project: HBase
  Issue Type: Improvement
  Components: security
Reporter: Sean Busbey
Assignee: Ashish Singhi
Priority: Critical
 Attachments: HBASE-13241.patch


 We need to have tests for group-level grants for various scopes. ref: 
 HBASE-13239



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)