accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r908216 [7/7] - in /websites/staging/accumulo/trunk/content: ./ 1.6/examples/
Date Tue, 06 May 2014 18:07:00 GMT
Added: websites/staging/accumulo/trunk/content/1.6/examples/visibility.html
==============================================================================
--- websites/staging/accumulo/trunk/content/1.6/examples/visibility.html (added)
+++ websites/staging/accumulo/trunk/content/1.6/examples/visibility.html Tue May  6 18:06:59
2014
@@ -0,0 +1,337 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <meta charset="utf-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1">
+  <link href="/css/bootstrap.min.css" rel="stylesheet">
+  <link href="/css/bootstrap-theme.min.css" rel="stylesheet">
+  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+  <!--[if lt IE 9]>
+    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
+    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
+  <![endif]-->
+  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
+  <script src="/js/bootstrap.min.js"></script>
+  <link href="/css/accumulo.css" rel="stylesheet" type="text/css">
+  <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
+  <title>Apache Accumulo Visibility, Authorizations, and Permissions Example</title>
+  
+  <script type="text/javascript">
+/*
+    var _gaq = _gaq || [];
+    _gaq.push(['_setAccount', 'UA-21103458-6']);
+    _gaq.push(['_setDomainName', 'apache.org']);
+    _gaq.push(['_setAllowLinker', true]);
+    _gaq.push(['_trackPageview']);
+
+    (function() {
+      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async =
true;
+      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') +
'.google-analytics.com/ga.js';
+      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+    })();
+*/
+  </script>
+
+
+</head>
+
+<body>
+<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
+<div class="container-fluid">
+  <div class="navbar-header">
+    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-items">
+      <span class="sr-only">Toggle navigation</span>
+      <span class="icon-bar"></span>
+      <span class="icon-bar"></span>
+      <span class="icon-bar"></span>
+    </button>
+    <a class="navbar-brand" href="/index.html">Accumulo</a>
+  </div>
+  <div class="collapse navbar-collapse" id="navbar-items">
+  <ul class="nav navbar-nav">
+    <li class="dropdown">
+      <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+        Project <span class="caret"></span>
+      </a>
+<ul class="dropdown-menu">
+<li id="nav_index"><a href="/index.html">Home</a></li>
+<li id="nav_downloads"><a href="/downloads">Downloads</a></li>
+<li id="nav_features"><a href="/notable_features.html">Features</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0"><i class="fa fa-external-link"></i>
License</a></li>
+</ul>
+</li>
+
+    <li class="dropdown">
+      <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+        Community <span class="caret"></span>
+      </a>
+<ul class="dropdown-menu">
+<li id="nav_getinvolved"><a href="/get_involved.html">Get Involved</a></li>
+<li id="nav_mailinglists"><a href="/mailing_list.html">Mailing Lists</a></li>
+<li id="nav_people"><a href="/people.html">People</a></li>
+<li class="divider"></li>
+<li class="dropdown-header">Governance</li>
+<li id="nav_bylaws"><a href="/bylaws.html">Bylaws</a></li>
+<li id="nav_consensusbuilding"><a href="/governance/consensusBuilding.html">Consensus
Building</a></li>
+<li id="nav_lazyconsensus"><a href="/governance/lazyConsensus.html">Lazy Consensus</a></li>
+<li id="nav_releasing"><a href="/governance/releasing.html">Releasing</a></li>
+<li id="nav_voting"><a href="/governance/voting.html">Voting</a></li>
+</ul>
+</li>
+
+    <li class="dropdown">
+      <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+        Development <span class="caret"></span>
+      </a>
+<ul class="dropdown-menu">
+<li id="nav_source"><a href="/source.html">Source &amp; Guide</a></li>
+<li id="nav_git"><a href="/git.html">Git WIP</a></li>
+<li id="nav_contrib"><a href="/contrib.html">Contrib Projects</a></li>
+<li id="nav_releasing"><a href="/releasing.html">Making Releases</a></li>
+<li><a href="https://issues.apache.org/jira/browse/accumulo"><i class="fa
fa-external-link"></i> Issues</a></li>
+<li><a href="https://builds.apache.org/view/A-D/view/Accumulo/"><i class="fa
fa-external-link"></i> Builds</a></li>
+</ul>
+</li>
+
+    <li class="dropdown">
+      <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+        Documentation <span class="caret"></span>
+      </a>
+<ul class="dropdown-menu">
+<!-- <li>Manual <a href="http://accumulo.apache.org/1.4/user_manual">1.4</a>
/ <a href="http://accumulo.apache.org/1.5/accumulo_user_manual.html">1.5</a></li>
-->
+<li class="dropdown-header">Manual</li>
+<li><a href="/1.4/user_manual">1.4</a></li>
+<li><a href="/1.5/accumulo_user_manual.html">1.5</a></li>
+<li class="divider"</li>
+<li class="dropdown-header">Javadoc</li>
+<li><a href="/1.4/apidocs">1.4</a></li>
+<li><a href="/1.5/apidocs">1.5</a></li>
+<li class="divider"</li>
+<li class="dropdown-header">Examples</li>
+<li id="nav_examples_1_4"><a href="/1.4/examples">1.4</a></li>
+<li id="nav_examples_1_5"><a href="/1.5/examples">1.5</a></li>
+<li class="divider"></li>
+<li id="nav_screenshots"><a href="/screenshots.html">Screenshots</a></li>
+<li id="nav_papers"><a href="/papers.html">Papers &amp; Other Links</a></li>
+<li id="nav_glossary"><a href="/glossary.html">Glossary</a></li>
+</ul>
+</li>
+
+    <li class="dropdown">
+      <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+        ASF Links <span class="caret"></span>
+      </a>
+<ul class="dropdown-menu">
+<li><a href="http://www.apache.org"><i class="fa fa-external-link"></i>
Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html"><i class="fa
fa-external-link"></i> Sponsorship</a></li>
+<li><a href="http://www.apache.org/security/"><i class="fa fa-external-link"></i>
Security</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html"><i class="fa fa-external-link"></i>
Thanks</a></li>
+</ul>
+</li>
+</ul>
+
+<form method="GET" action="http://search-hadoop.com/" class="navbar-form navbar-right"
role="search">
+  <div class="form-group">
+    <input type="text" name="q" class="form-control" placeholder="Search"/>
+    <input type="hidden" name="fc_project" value="Accumulo"/>
+  </div>
+  <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
+</form>
+  </div>
+
+</div>
+</nav>
+
+
+<div class="container-fluid">
+<div class="row">
+  <div class="col-md-2" id="sidebar">
+  <div style="text-align: center">
+    <a href="/index.html"><img id="logo" alt="Apache Accumulo &trade;" class="img-responsive"
src="/images/accumulo-logo.png"/></a>
+    <br>
+Latest 1.6 release: <strong>1.6.0</strong><br>
+Latest 1.5 release: <strong>1.5.1</strong><br>
+Latest 1.4 release: <strong>1.4.5</strong><br>
+    <br>
+    <a id="download-button-sidebar" class="btn btn-success btn-block" href="/downloads/"
role="button">Download</a>
+  </div>
+    <hr>
+<table class="table" id="sociallinks">
+<tr><td><img src="/images/Twitter_logo_blue.png" style="height: 1em"></td><td><a
href="https://twitter.com/apacheaccumulo">@ApacheAccumulo</a></td></tr>
+<tr><td><img src="/images/InBug-16px_0.png"></td><td><a
href="https://www.linkedin.com/groups/Apache-Accumulo-Professionals-4554913">Apache Accumulo
Professionals</a></td></tr>
+<tr><td><img src="/images/GitHub-Mark-32px.png" style="height: 1em"></td><td><a
href="https://github.com/apache/accumulo">apache / accumulo</a></td></tr>
+<tr><td><span class="glyphicon glyphicon-comment"></span></td><td><a
href="irc://chat.freenode.net/accumulo">#accumulo @ freenode</a></td></tr>
+</table>
+<hr>
+<a id="accumulo-summit-logo" href="http://accumulosummit.com/"><img alt="Accumulo
Summit" class="img-responsive" src="/images/accumulo-summit-2014.png"></a>
+  </div>
+  <div class="col-md-8 col-md-offset-1">
+<!--
+  <div id="bannertext">
+    <img id="logo" alt="Apache Accumulo &trade;" src="/images/accumulo-logo.png"/>
+  </div>
+-->
+
+  <div id="content">
+
+    <h1 class="title">Apache Accumulo Visibility, Authorizations, and Permissions Example</h1>
+
+    <h2 id="creating-a-new-user">Creating a new user</h2>
+<div class="codehilite"><pre><span class="n">root</span><span
class="p">@</span><span class="n">instance</span><span class="o">&gt;</span>
<span class="n">createuser</span> <span class="n">username</span>
+<span class="n">Enter</span> <span class="n">new</span> <span
class="n">password</span> <span class="k">for</span> <span class="s">&#39;username&#39;</span><span
class="p">:</span> <span class="o">********</span>
+<span class="n">Please</span> <span class="n">confirm</span> <span
class="n">new</span> <span class="n">password</span> <span class="k">for</span>
<span class="s">&#39;username&#39;</span><span class="p">:</span>
<span class="o">********</span>
+<span class="n">root</span><span class="p">@</span><span class="n">instance</span><span
class="o">&gt;</span> <span class="n">user</span> <span class="n">username</span>
+<span class="n">Enter</span> <span class="n">password</span> <span
class="k">for</span> <span class="n">user</span> <span class="n">username</span><span
class="p">:</span> <span class="o">********</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span><span
class="o">&gt;</span> <span class="n">createtable</span> <span
class="n">vistest</span>
+06 10<span class="p">:</span>48<span class="p">:</span>47<span
class="p">,</span>931 <span class="p">[</span><span class="n">shell</span><span
class="p">.</span><span class="n">Shell</span><span class="p">]</span>
<span class="n">ERROR</span><span class="p">:</span> <span class="n">org</span><span
class="p">.</span><span class="n">apache</span><span class="p">.</span><span
class="n">accumulo</span><span class="p">.</span><span class="n">core</span><span
class="p">.</span><span class="n">client</span><span class="p">.</span><span
class="n">AccumuloSecurityException</span><span class="p">:</span> <span
class="n">Error</span> <span class="n">PERMISSION_DENIED</span> <span
class="o">-</span> <span class="n">User</span> <span class="n">does</span>
<span class="n">not</span> <span class="n">have</span> <span class="n">permission</span>
<span class="n">to</span> <span class="n">perform</span> <span
class="n">this</span> <span class="n">action</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span><span
class="o">&gt;</span> <span class="n">userpermissions</span>
+<span class="n">System</span> <span class="n">permissions</span><span
class="p">:</span>
+
+<span class="n">Table</span> <span class="n">permissions</span> <span
class="p">(</span><span class="n">accumulo</span><span class="p">.</span><span
class="n">metadata</span><span class="p">):</span> <span class="n">Table</span><span
class="p">.</span><span class="n">READ</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span><span
class="o">&gt;</span>
+</pre></div>
+
+
+<p>A user does not by default have permission to create a table.</p>
+<h2 id="granting-permissions-to-a-user">Granting permissions to a user</h2>
+<div class="codehilite"><pre><span class="n">username</span><span
class="p">@</span><span class="n">instance</span><span class="o">&gt;</span>
<span class="n">user</span> <span class="n">root</span>
+<span class="n">Enter</span> <span class="n">password</span> <span
class="k">for</span> <span class="n">user</span> <span class="n">root</span><span
class="p">:</span> <span class="o">********</span>
+<span class="n">root</span><span class="p">@</span><span class="n">instance</span><span
class="o">&gt;</span> <span class="n">grant</span> <span class="o">-</span><span
class="n">s</span> <span class="n">System</span><span class="p">.</span><span
class="n">CREATE_TABLE</span> <span class="o">-</span><span class="n">u</span>
<span class="n">username</span>
+<span class="n">root</span><span class="p">@</span><span class="n">instance</span><span
class="o">&gt;</span> <span class="n">user</span> <span class="n">username</span>
+<span class="n">Enter</span> <span class="n">password</span> <span
class="k">for</span> <span class="n">user</span> <span class="n">username</span><span
class="p">:</span> <span class="o">********</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span><span
class="o">&gt;</span> <span class="n">createtable</span> <span
class="n">vistest</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span><span
class="o">&gt;</span> <span class="n">userpermissions</span>
+<span class="n">System</span> <span class="n">permissions</span><span
class="p">:</span> <span class="n">System</span><span class="p">.</span><span
class="n">CREATE_TABLE</span>
+
+<span class="n">Table</span> <span class="n">permissions</span> <span
class="p">(</span><span class="n">accumulo</span><span class="p">.</span><span
class="n">metadata</span><span class="p">):</span> <span class="n">Table</span><span
class="p">.</span><span class="n">READ</span>
+<span class="n">Table</span> <span class="n">permissions</span> <span
class="p">(</span><span class="n">vistest</span><span class="p">):</span>
<span class="n">Table</span><span class="p">.</span><span class="n">READ</span><span
class="p">,</span> <span class="n">Table</span><span class="p">.</span><span
class="n">WRITE</span><span class="p">,</span> <span class="n">Table</span><span
class="p">.</span><span class="n">BULK_IMPORT</span><span class="p">,</span>
<span class="n">Table</span><span class="p">.</span><span class="n">ALTER_TABLE</span><span
class="p">,</span> <span class="n">Table</span><span class="p">.</span><span
class="n">GRANT</span><span class="p">,</span> <span class="n">Table</span><span
class="p">.</span><span class="n">DROP_TABLE</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span>
+</pre></div>
+
+
+<h2 id="inserting-data-with-visibilities">Inserting data with visibilities</h2>
+<p>Visibilities are boolean AND (&amp;) and OR (|) combinations of authorization
+tokens. Authorization tokens are arbitrary strings taken from a restricted
+ASCII character set. Parentheses are required to specify order of operations
+in visibilities.</p>
+<div class="codehilite"><pre><span class="n">username</span><span
class="p">@</span><span class="n">instance</span> <span class="n">vistest</span><span
class="o">&gt;</span> <span class="n">insert</span> <span class="n">row</span>
<span class="n">f1</span> <span class="n">q1</span> <span class="n">v1</span>
<span class="o">-</span><span class="n">l</span> <span class="n">A</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">insert</span> <span class="n">row</span> <span class="n">f2</span>
<span class="n">q2</span> <span class="n">v2</span> <span class="o">-</span><span
class="n">l</span> <span class="n">A</span><span class="o">&amp;</span><span
class="n">B</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">insert</span> <span class="n">row</span> <span class="n">f3</span>
<span class="n">q3</span> <span class="n">v3</span> <span class="o">-</span><span
class="n">l</span> <span class="n">apple</span><span class="o">&amp;</span><span
class="n">carrot</span><span class="o">|</span><span class="n">broccoli</span><span
class="o">|</span><span class="n">spinach</span>
+06 11<span class="p">:</span>19<span class="p">:</span>01<span
class="p">,</span>432 <span class="p">[</span><span class="n">shell</span><span
class="p">.</span><span class="n">Shell</span><span class="p">]</span>
<span class="n">ERROR</span><span class="p">:</span> <span class="n">org</span><span
class="p">.</span><span class="n">apache</span><span class="p">.</span><span
class="n">accumulo</span><span class="p">.</span><span class="n">core</span><span
class="p">.</span><span class="n">util</span><span class="p">.</span><span
class="n">BadArgumentException</span><span class="p">:</span> <span
class="n">cannot</span> <span class="n">mix</span> <span class="o">|</span>
<span class="n">and</span> <span class="o">&amp;</span> <span
class="n">near</span> <span class="n">index</span> 12
+<span class="n">apple</span><span class="o">&amp;</span><span
class="n">carrot</span><span class="o">|</span><span class="n">broccoli</span><span
class="o">|</span><span class="n">spinach</span>
+            ^
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">insert</span> <span class="n">row</span> <span class="n">f3</span>
<span class="n">q3</span> <span class="n">v3</span> <span class="o">-</span><span
class="n">l</span> <span class="p">(</span><span class="n">apple</span><span
class="o">&amp;</span><span class="n">carrot</span><span class="p">)</span><span
class="o">|</span><span class="n">broccoli</span><span class="o">|</span><span
class="n">spinach</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span>
+</pre></div>
+
+
+<h2 id="scanning-with-authorizations">Scanning with authorizations</h2>
+<p>Authorizations are sets of authorization tokens. Each Accumulo user has
+authorizations and each Accumulo scan has authorizations. Scan authorizations
+are only allowed to be a subset of the user's authorizations. By default, a
+user's authorizations set is empty.</p>
+<div class="codehilite"><pre><span class="n">username</span><span
class="p">@</span><span class="n">instance</span> <span class="n">vistest</span><span
class="o">&gt;</span> <span class="n">scan</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">scan</span> <span class="o">-</span><span class="n">s</span>
<span class="n">A</span>
+06 11<span class="p">:</span>43<span class="p">:</span>14<span
class="p">,</span>951 <span class="p">[</span><span class="n">shell</span><span
class="p">.</span><span class="n">Shell</span><span class="p">]</span>
<span class="n">ERROR</span><span class="p">:</span> <span class="n">java</span><span
class="p">.</span><span class="n">lang</span><span class="p">.</span><span
class="n">RuntimeException</span><span class="p">:</span> <span class="n">org</span><span
class="p">.</span><span class="n">apache</span><span class="p">.</span><span
class="n">accumulo</span><span class="p">.</span><span class="n">core</span><span
class="p">.</span><span class="n">client</span><span class="p">.</span><span
class="n">AccumuloSecurityException</span><span class="p">:</span> <span
class="n">Error</span> <span class="n">BAD_AUTHORIZATIONS</span> <span
class="o">-</span> <span class="n">The</span> <span class="n">user</span>
<span class="n">does</span> <span class="n">not</span> <span class="n">have</s
 pan> <span class="n">the</span> <span class="n">specified</span>
<span class="n">authorizations</span> <span class="n">assigned</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span>
+</pre></div>
+
+
+<h2 id="setting-authorizations-for-a-user">Setting authorizations for a user</h2>
+<div class="codehilite"><pre><span class="n">username</span><span
class="p">@</span><span class="n">instance</span> <span class="n">vistest</span><span
class="o">&gt;</span> <span class="n">setauths</span> <span class="o">-</span><span
class="n">s</span> <span class="n">A</span>
+06 11<span class="p">:</span>53<span class="p">:</span>42<span
class="p">,</span>056 <span class="p">[</span><span class="n">shell</span><span
class="p">.</span><span class="n">Shell</span><span class="p">]</span>
<span class="n">ERROR</span><span class="p">:</span> <span class="n">org</span><span
class="p">.</span><span class="n">apache</span><span class="p">.</span><span
class="n">accumulo</span><span class="p">.</span><span class="n">core</span><span
class="p">.</span><span class="n">client</span><span class="p">.</span><span
class="n">AccumuloSecurityException</span><span class="p">:</span> <span
class="n">Error</span> <span class="n">PERMISSION_DENIED</span> <span
class="o">-</span> <span class="n">User</span> <span class="n">does</span>
<span class="n">not</span> <span class="n">have</span> <span class="n">permission</span>
<span class="n">to</span> <span class="n">perform</span> <span
class="n">this</span> <span class="n">action</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span>
+</pre></div>
+
+
+<p>A user cannot set authorizations unless the user has the System.ALTER_USER permission.
+The root user has this permission.</p>
+<div class="codehilite"><pre><span class="n">username</span><span
class="p">@</span><span class="n">instance</span> <span class="n">vistest</span><span
class="o">&gt;</span> <span class="n">user</span> <span class="n">root</span>
+<span class="n">Enter</span> <span class="n">password</span> <span
class="k">for</span> <span class="n">user</span> <span class="n">root</span><span
class="p">:</span> <span class="o">********</span>
+<span class="n">root</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">setauths</span> <span class="o">-</span><span class="n">s</span>
<span class="n">A</span> <span class="o">-</span><span class="n">u</span>
<span class="n">username</span>
+<span class="n">root</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">user</span> <span class="n">username</span>
+<span class="n">Enter</span> <span class="n">password</span> <span
class="k">for</span> <span class="n">user</span> <span class="n">username</span><span
class="p">:</span> <span class="o">********</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">scan</span> <span class="o">-</span><span class="n">s</span>
<span class="n">A</span>
+<span class="n">row</span> <span class="n">f1</span><span class="p">:</span><span
class="n">q1</span> <span class="p">[</span><span class="n">A</span><span
class="p">]</span>    <span class="n">v1</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">scan</span>
+<span class="n">row</span> <span class="n">f1</span><span class="p">:</span><span
class="n">q1</span> <span class="p">[</span><span class="n">A</span><span
class="p">]</span>    <span class="n">v1</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span>
+</pre></div>
+
+
+<p>The default authorizations for a scan are the user's entire set of authorizations.</p>
+<div class="codehilite"><pre><span class="n">username</span><span
class="p">@</span><span class="n">instance</span> <span class="n">vistest</span><span
class="o">&gt;</span> <span class="n">user</span> <span class="n">root</span>
+<span class="n">Enter</span> <span class="n">password</span> <span
class="k">for</span> <span class="n">user</span> <span class="n">root</span><span
class="p">:</span> <span class="o">********</span>
+<span class="n">root</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">setauths</span> <span class="o">-</span><span class="n">s</span>
<span class="n">A</span><span class="p">,</span><span class="n">B</span><span
class="p">,</span><span class="n">broccoli</span> <span class="o">-</span><span
class="n">u</span> <span class="n">username</span>
+<span class="n">root</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">user</span> <span class="n">username</span>
+<span class="n">Enter</span> <span class="n">password</span> <span
class="k">for</span> <span class="n">user</span> <span class="n">username</span><span
class="p">:</span> <span class="o">********</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">scan</span>
+<span class="n">row</span> <span class="n">f1</span><span class="p">:</span><span
class="n">q1</span> <span class="p">[</span><span class="n">A</span><span
class="p">]</span>    <span class="n">v1</span>
+<span class="n">row</span> <span class="n">f2</span><span class="p">:</span><span
class="n">q2</span> <span class="p">[</span><span class="n">A</span><span
class="o">&amp;</span><span class="n">B</span><span class="p">]</span>
   <span class="n">v2</span>
+<span class="n">row</span> <span class="n">f3</span><span class="p">:</span><span
class="n">q3</span> <span class="p">[(</span><span class="n">apple</span><span
class="o">&amp;</span><span class="n">carrot</span><span class="p">)</span><span
class="o">|</span><span class="n">broccoli</span><span class="o">|</span><span
class="n">spinach</span><span class="p">]</span>    <span class="n">v3</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">scan</span> <span class="o">-</span><span class="n">s</span>
<span class="n">B</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span>
+</pre></div>
+
+
+<p>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.</p>
+<div class="codehilite"><pre><span class="n">username</span><span
class="p">@</span><span class="n">instance</span> <span class="n">vistest</span><span
class="o">&gt;</span> <span class="n">user</span> <span class="n">root</span>
+<span class="n">Enter</span> <span class="n">password</span> <span
class="k">for</span> <span class="n">user</span> <span class="n">root</span><span
class="p">:</span> <span class="o">******</span>
+<span class="n">root</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">config</span> <span class="o">-</span><span class="n">t</span>
<span class="n">vistest</span> <span class="o">-</span><span class="n">s</span>
<span class="n">table</span><span class="p">.</span><span class="n">constraint</span><span
class="p">.</span>1<span class="p">=</span><span class="n">org</span><span
class="p">.</span><span class="n">apache</span><span class="p">.</span><span
class="n">accumulo</span><span class="p">.</span><span class="n">core</span><span
class="p">.</span><span class="n">security</span><span class="p">.</span><span
class="n">VisibilityConstraint</span>
+<span class="n">root</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">user</span> <span class="n">username</span>
+<span class="n">Enter</span> <span class="n">password</span> <span
class="k">for</span> <span class="n">user</span> <span class="n">username</span><span
class="p">:</span> <span class="o">********</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">insert</span> <span class="n">row</span> <span class="n">f4</span>
<span class="n">q4</span> <span class="n">v4</span> <span class="o">-</span><span
class="n">l</span> <span class="n">spinach</span>
+    <span class="n">Constraint</span> <span class="n">Failures</span><span
class="p">:</span>
+        <span class="n">ConstraintViolationSummary</span><span class="p">(</span><span
class="n">constrainClass</span><span class="p">:</span><span class="n">org</span><span
class="p">.</span><span class="n">apache</span><span class="p">.</span><span
class="n">accumulo</span><span class="p">.</span><span class="n">core</span><span
class="p">.</span><span class="n">security</span><span class="p">.</span><span
class="n">VisibilityConstraint</span><span class="p">,</span> <span
class="n">violationCode</span><span class="p">:</span>2<span class="p">,</span>
<span class="n">violationDescription</span><span class="p">:</span><span
class="n">User</span> <span class="n">does</span> <span class="n">not</span>
<span class="n">have</span> <span class="n">authorization</span> <span
class="n">on</span> <span class="n">column</span> <span class="n">visibility</span><span
class="p">,</span> <span class="n">numberOfViolatingMutations</span><span
class="p">:</span>1<span class="p">)</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">insert</span> <span class="n">row</span> <span class="n">f4</span>
<span class="n">q4</span> <span class="n">v4</span> <span class="o">-</span><span
class="n">l</span> <span class="n">spinach</span><span class="o">|</span><span
class="n">broccoli</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span> <span
class="n">scan</span>
+<span class="n">row</span> <span class="n">f1</span><span class="p">:</span><span
class="n">q1</span> <span class="p">[</span><span class="n">A</span><span
class="p">]</span>    <span class="n">v1</span>
+<span class="n">row</span> <span class="n">f2</span><span class="p">:</span><span
class="n">q2</span> <span class="p">[</span><span class="n">A</span><span
class="o">&amp;</span><span class="n">B</span><span class="p">]</span>
   <span class="n">v2</span>
+<span class="n">row</span> <span class="n">f3</span><span class="p">:</span><span
class="n">q3</span> <span class="p">[(</span><span class="n">apple</span><span
class="o">&amp;</span><span class="n">carrot</span><span class="p">)</span><span
class="o">|</span><span class="n">broccoli</span><span class="o">|</span><span
class="n">spinach</span><span class="p">]</span>    <span class="n">v3</span>
+<span class="n">row</span> <span class="n">f4</span><span class="p">:</span><span
class="n">q4</span> <span class="p">[</span><span class="n">spinach</span><span
class="o">|</span><span class="n">broccoli</span><span class="p">]</span>
   <span class="n">v4</span>
+<span class="n">username</span><span class="p">@</span><span class="n">instance</span>
<span class="n">vistest</span><span class="o">&gt;</span>
+</pre></div>
+  </div>
+
+  <div id="footer">
+    <a alt="Apache Software Foundation" href="http://www.apache.org">
+      <img id="asf-logo" alt="Apache Software Foundation" src="/images/feather-small.gif"
width="100">
+    </a>
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011-2014 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
2.0</a>.
+        Apache Accumulo, Accumulo, Apache, the Apache feather logo, and the Apache Accumulo
+        project logo are trademarks of the <a href="http://www.apache.org">Apache Software
Foundation</a>.<br />
+        Site created with <a href="http://getbootstrap.com/">Bootstrap</a> including
icons from <a href="http://glyphicons.com/">GLYPHICONS</a> and <a href="http://fontawesome.io/">Font
Awesome</a>.
+      </p>
+    </div> 
+  </div>
+  </div>
+
+</div>
+</div>
+
+<script type="text/javascript">
+
+</script>
+</body>
+</html>



Mime
View raw message