Obtaining readperm
and writeperm
on
Fields
In this scenario, you want to perform an operation on a field, and the operation requires that you have readperm and writeperm permissions on that field. How you obtain these permissions depends on whether the field is in the default column family or a non-default column family.
If the field is in the default column family
In the document below, you want to perform an operation on field c
, which
is in the default column family. The operation requires you to have
readperm
and writeperm
on field c
.
- Case 1: You have
readperm
andwriteperm
on the default column family - In this case, field
c
inherits these permissions, assuming that the permissions were not denied on fielda
orb
.If you do not have
readperm
andwriteperm
on fielda
orb
, you needtraverseperm
on the field that denied you those permissions. You also needreadperm
andwriteperm
explicitly granted to you on fieldc
. You could be granted these permissions with themaprcli table cf colperm set
command, as in these examples:maprcli table cf colperm set -path <path to JSON table> -cfname default -name a.b -traverseperm u:<user ID> | <existing ACE for this field> maprcli table cf colperm set -path <path to JSON table> -cfname default -name a.b.c -readperm u:<user ID> | <existing ACE for this field> -writeperm u:<user ID> | <existing ACE for this field>
- Case 2: You do not have
readperm
andwriteperm
on the default column family - In this case, you need the
traverseperm
permission on the default column family. Fieldsa
andb
inherit this permission. You also needreadperm
andwriteperm
on fieldc
.You could be granted these permissions with commands similar to these:
maprcli table cf edit -path <path to JSON table> -cfname default -traverseperm u:<user ID> | <existing ACE for this field> maprcli table cf colperm set -path <path to JSON table> -cfname default -name a.b.c -readperm u:<user ID> | <existing ACE for this field> -writeperm u:<user ID> | <existing ACE for this field>
If the field is in a non-default column family
In the following document, you want to perform an operation on field c
,
which is in the column family cf1
that is defined at field
b
with the path a.b
.
- Case 1: You do not have
readperm
andwriteperm
on fieldb
- You need
traverseperm
on fieldb
and bothreadperm
andwriteperm
on fieldc
. You can be granted these permissions with commands similar to these:/opt/mapr/bin/maprcli table cf edit -path <path to JSON table> -cfname cf1 -traverseperm u:<user ID> | <existing ACE for this field> maprcli table cf colperm set -path <path to JSON table> -cfname cf1 -name a.b.c -readperm u:<user ID> | <existing ACE for this field> -writeperm u:<user ID> | <existing ACE for this field>
- Case 2: You do have
readperm
andwriteperm
on fieldb
- You do not need any further permissions. Field
c
inherits yourreadperm
andwriteperm
permissions from fieldb
.