otdfctl policy attributes create
create - Create an attribute definition
Synopsis
otdfctl policy attributes create [flags]
Description
Under a namespace, create an attribute with a rule. An attribute definition name
is normalized to lower case
and may contain hyphens and underscores between other alphanumeric characters.
Rules
ANY_OF
If an Attribute is defined with logical rule ANY_OF
, an Entity who is mapped to any
of the associated Values of the Attribute
on TDF'd Resource Data will be Entitled to take the actions in the mapping.
ALL_OF
If an Attribute is defined with logical rule ALL_OF
, an Entity must be mapped to all
of the associated Values of the Attribute
on TDF'd Resource Data to be Entitled to take the actions in the mapping.
HIERARCHY
If an Attribute is defined with logical rule HIERARCHY
, an Entity must be mapped to the same level Value or a level above in hierarchy
compared to a given Value on TDF'd Resource Data. Hierarchical values are considered highest at index 0 and lowest at the last index. Actions
propagate down through the hierarchy, so a mapping of a read
action on the highest level Value on the Attribute will entitle the action
to each hierarchically lower value, and so on.
For more general information about attributes, see the attributes
subcommand.
Example
otdfctl policy attributes create --namespace 3d25d33e-2469-4990-a9ed-fdd13ce74436 --name myattribute --rule ANY_OF
Options
-n
,--name <name>
- Name of the attribute (required:
true
)
-r
,--rule <rule>
- Rule of the attribute (required:
true
)
-v
,--value <value>
- Value of the attribute (i.e. 'value1') (required:
true
)
-s
,--namespace <namespace>
- Namespace ID of the attribute (required:
true
)
-l
,--label <label>
- Optional metadata 'labels' in the format: key=value (required:
false
)
Aliases
new
, add
, c