Return-Path: X-Original-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F312DB868 for ; Wed, 18 Jan 2012 18:43:01 +0000 (UTC) Received: (qmail 10670 invoked by uid 500); 18 Jan 2012 18:43:01 -0000 Delivered-To: apmail-incubator-accumulo-commits-archive@incubator.apache.org Received: (qmail 10637 invoked by uid 500); 18 Jan 2012 18:43:01 -0000 Mailing-List: contact accumulo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: accumulo-dev@incubator.apache.org Delivered-To: mailing list accumulo-commits@incubator.apache.org Received: (qmail 10630 invoked by uid 99); 18 Jan 2012 18:43:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jan 2012 18:43:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jan 2012 18:43:00 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2C1CE2388993; Wed, 18 Jan 2012 18:42:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1232994 - in /incubator/accumulo/trunk: ./ docs/examples/README.visibility src/server/ src/server/src/main/java/org/apache/accumulo/server/fate/Print.java src/server/src/main/java/org/apache/accumulo/server/fate/ZooStore.java Date: Wed, 18 Jan 2012 18:42:39 -0000 To: accumulo-commits@incubator.apache.org From: vines@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120118184240.2C1CE2388993@eris.apache.org> Author: vines Date: Wed Jan 18 18:42:39 2012 New Revision: 1232994 URL: http://svn.apache.org/viewvc?rev=1232994&view=rev Log: ACCUMULO-280 - merging constraint info ACCUMULO-317 - some of Keith's stuff is coming along for the ride Added: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/Print.java - copied unchanged from r1232992, incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/fate/Print.java Modified: incubator/accumulo/trunk/ (props changed) incubator/accumulo/trunk/docs/examples/README.visibility incubator/accumulo/trunk/src/server/ (props changed) incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/ZooStore.java Propchange: incubator/accumulo/trunk/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jan 18 18:42:39 2012 @@ -1,3 +1,3 @@ /incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611,1228195,1230180,1230736,1231043 /incubator/accumulo/branches/1.3.5rc:1209938 -/incubator/accumulo/branches/1.4:1201902-1232617 +/incubator/accumulo/branches/1.4:1201902-1232992 Modified: incubator/accumulo/trunk/docs/examples/README.visibility URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/docs/examples/README.visibility?rev=1232994&r1=1232993&r2=1232994&view=diff ============================================================================== --- incubator/accumulo/trunk/docs/examples/README.visibility (original) +++ incubator/accumulo/trunk/docs/examples/README.visibility Wed Jan 18 18:42:39 2012 @@ -109,3 +109,23 @@ The default authorizations for a scan ar row f3:q3 [(apple&carrot)|broccoli|spinach] v3 username@instance vistest> scan -s B username@instance vistest> + +If you want, you can limit a user to only be able to insert data which they can read themselves. +It can be set with the following constraint. + + username@instance vistest> user root + Enter password for user root: ****** + root@instance vistest> config -t vistest -s table.constraint.1=org.apache.accumulo.core.security.VisibilityConstraint + root@instance vistest> user username + Enter password for user username: ******** + username@instance vistest> insert row f4 q4 v4 -l spinach + Constraint Failures: + ConstraintViolationSummary(constrainClass:org.apache.accumulo.core.security.VisibilityConstraint, violationCode:2, violationDescription:User does not have authorization on column visibility, numberOfViolatingMutations:1) + username@instance vistest> insert row f4 q4 v4 -l spinach|broccoli + username@instance vistest> scan + row f1:q1 [A] v1 + row f2:q2 [A&B] v2 + row f3:q3 [(apple&carrot)|broccoli|spinach] v3 + row f4:q4 [spinach|broccoli] v4 + username@instance vistest> + \ No newline at end of file Propchange: incubator/accumulo/trunk/src/server/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jan 18 18:42:39 2012 @@ -1,3 +1,3 @@ -/incubator/accumulo/branches/1.3.5rc/src/server:1209938 /incubator/accumulo/branches/1.3/src/server:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611 -/incubator/accumulo/branches/1.4/src/server:1201902-1232617 +/incubator/accumulo/branches/1.3.5rc/src/server:1209938 +/incubator/accumulo/branches/1.4/src/server:1201902-1232992 Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/ZooStore.java URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/ZooStore.java?rev=1232994&r1=1232993&r2=1232994&view=diff ============================================================================== --- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/ZooStore.java (original) +++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/ZooStore.java Wed Jan 18 18:42:39 2012 @@ -409,4 +409,17 @@ public class ZooStore implements TSto throw new RuntimeException(e); } } + + public List list() { + try { + ArrayList l = new ArrayList(); + List transactions = zk.getChildren(path); + for (String txid : transactions) { + l.add(parseTid(txid)); + } + return l; + } catch (Exception e) { + throw new RuntimeException(e); + } + } }