You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2021/01/25 16:26:11 UTC
[accumulo-website] branch main updated: Update Authorizations.md
and People.md (#260)
This is an automated email from the ASF dual-hosted git repository.
mmiller pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo-website.git
The following commit(s) were added to refs/heads/main by this push:
new 52301d9 Update Authorizations.md and People.md (#260)
52301d9 is described below
commit 52301d9e789512d575625839f04147764dc40573
Author: slackwinner <50...@users.noreply.github.com>
AuthorDate: Mon Jan 25 11:25:58 2021 -0500
Update Authorizations.md and People.md (#260)
* Applied a few minor changes in Authorizations.md file to fix formatting issue on Accumulo website. In addition, added my name to the people.md to receive credit for #255.
---
pages/people.md | 1 +
tour/authorizations.md | 15 ++++++++-------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/pages/people.md b/pages/people.md
index 65af7ad..e61afb6 100644
--- a/pages/people.md
+++ b/pages/people.md
@@ -85,6 +85,7 @@ GitHub also has a [contributor list][github-contributors] based on commits.
| Christian Rohling | [Endgame][ENDGAME] | [ET][ET] |
| Craig Scheiderer | [Arctic Slope Regional Corp.][ASRC] | [ET][ET] |
| Damon Brown | [Tetra Concepts LLC][TETRA] | [ET][ET] |
+| Dane Magbuhos | | [ET][ET] |
| Dave Wang | [Cloudera][CLOUDERA] | [PT][PT] |
| David M. Lyle | | |
| David Protzman | | |
diff --git a/tour/authorizations.md b/tour/authorizations.md
index 99383da..f21e7aa 100644
--- a/tour/authorizations.md
+++ b/tour/authorizations.md
@@ -16,7 +16,8 @@ For example:
We now want to secure our secret identities of the heroes so that only users with the proper authorizations can read their names.
-1. Using the code from the previous exercise, add the following to the beginning of the _exercise_ method.
+1\. Using the code from the previous exercise, add the following to the beginning of the _exercise_ method.
+
```java
// Create a "secretId" authorization & visibility
final String secretId = "secretId";
@@ -28,25 +29,25 @@ We now want to secure our secret identities of the heroes so that only users wit
client.securityOperations().changeUserAuthorizations("commissioner", auths);
client.securityOperations().grantTablePermission("commissioner", "GothamPD", TablePermission.READ);
```
-
-2. The [Mutation] API allows you to set the `secretId` visibility on a column. Find the proper method for setting a column visibility in
+2\. The [Mutation] API allows you to set the `secretId` visibility on a column. Find the proper method for setting a column visibility in
the Mutation API and modify the code so the `colVis` variable created above secures the "name" columns.
-3. Build and run. What data do you see?
+3\. Build and run. What data do you see?
* You should see all of the data except the secret identities of Batman and Robin. This is because the `Scanner` was created from the root user which doesn't have the `secretId` authorization.
* Replace the `Authorizations.EMPTY` in the Scanner with the `auths` variable created above and run it again.
* This should result in an error since the root user doesn't have the authorizations we tried to pass to the Scanner.
-4. Use the following to create a client for the "commissioner" using the [Accumulo] entry point.
+4\. Use the following to create a client for the "commissioner" using the [Accumulo] entry point.
+
```java
try (AccumuloClient commishClient = Accumulo.newClient().from(client.properties()).as("commissioner", "gordonrocks").build()) {
// Insert your code here
}
```
+5\. Using the commissioner client, create a Scanner with the authorizations needed to view the secret identities.
-5. Using the commissioner client, create a Scanner with the authorizations needed to view the secret identities.
+6\. Build and run. You should see all the rows in the GothamPD table printed, including these secured key/value pairs:
-6. Build and run. You should see all the rows in the GothamPD table printed, including these secured key/value pairs:
```commandline
Key : id0001 hero:name [secretId] 1511900180231 false Value : Bruce Wayne
Key : id0002 hero:name [secretId] 1511900180231 false Value : Dick Grayson