-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR(ACP-DOCS): Generate CLI Docs With Identity
- Loading branch information
1 parent
48cd5cd
commit 83a1ae4
Showing
11 changed files
with
240 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
## defradb client acp | ||
|
||
Interact with the access control system of a DefraDB node | ||
|
||
### Synopsis | ||
|
||
Interact with the access control system of a DefraDB node | ||
|
||
Learn more about [ACP](/acp/README.md) | ||
|
||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for acp | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--allowed-origins stringArray List of origins to allow for CORS requests | ||
--log-format string Log format to use. Options are text or json (default "text") | ||
--log-level string Log level to use. Options are debug, info, error, fatal (default "info") | ||
--log-output string Log output path. Options are stderr or stdout. (default "stderr") | ||
--log-overrides string Logger config overrides. Format <name>,<key>=<val>,...;<name>,... | ||
--log-source Include source location in logs | ||
--log-stacktrace Include stacktrace in error and fatal logs | ||
--max-txn-retries int Specify the maximum number of retries per transaction (default 5) | ||
--no-p2p Disable the peer-to-peer network synchronization system | ||
--p2paddr strings Listen addresses for the p2p network (formatted as a libp2p MultiAddr) (default [/ip4/127.0.0.1/tcp/9171]) | ||
--peers stringArray List of peers to connect to | ||
--privkeypath string Path to the private key for tls | ||
--pubkeypath string Path to the public key for tls | ||
--rootdir string Directory for persistent data (default: $HOME/.defradb) | ||
--store string Specify the datastore to use (supported: badger, memory) (default "badger") | ||
--tx uint Transaction ID | ||
--url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") | ||
--valuelogfilesize int Specify the datastore value log file size (in bytes). In memory size will be 2*valuelogfilesize (default 1073741824) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [defradb client](defradb_client.md) - Interact with a DefraDB node | ||
* [defradb client acp policy](defradb_client_acp_policy.md) - Interact with the acp policy features of DefraDB instance | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## defradb client acp policy | ||
|
||
Interact with the acp policy features of DefraDB instance | ||
|
||
### Synopsis | ||
|
||
Interact with the acp policy features of DefraDB instance | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for policy | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--allowed-origins stringArray List of origins to allow for CORS requests | ||
--log-format string Log format to use. Options are text or json (default "text") | ||
--log-level string Log level to use. Options are debug, info, error, fatal (default "info") | ||
--log-output string Log output path. Options are stderr or stdout. (default "stderr") | ||
--log-overrides string Logger config overrides. Format <name>,<key>=<val>,...;<name>,... | ||
--log-source Include source location in logs | ||
--log-stacktrace Include stacktrace in error and fatal logs | ||
--max-txn-retries int Specify the maximum number of retries per transaction (default 5) | ||
--no-p2p Disable the peer-to-peer network synchronization system | ||
--p2paddr strings Listen addresses for the p2p network (formatted as a libp2p MultiAddr) (default [/ip4/127.0.0.1/tcp/9171]) | ||
--peers stringArray List of peers to connect to | ||
--privkeypath string Path to the private key for tls | ||
--pubkeypath string Path to the public key for tls | ||
--rootdir string Directory for persistent data (default: $HOME/.defradb) | ||
--store string Specify the datastore to use (supported: badger, memory) (default "badger") | ||
--tx uint Transaction ID | ||
--url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") | ||
--valuelogfilesize int Specify the datastore value log file size (in bytes). In memory size will be 2*valuelogfilesize (default 1073741824) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [defradb client acp](defradb_client_acp.md) - Interact with the access control system of a DefraDB node | ||
* [defradb client acp policy add](defradb_client_acp_policy_add.md) - Add new policy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
## defradb client acp policy add | ||
|
||
Add new policy | ||
|
||
### Synopsis | ||
|
||
Add new policy | ||
|
||
Notes: | ||
- Can not add a policy without specifying an identity. | ||
- ACP must be available (i.e. ACP can not be disabled). | ||
- A non-DPI policy will be accepted (will be registered with acp system). | ||
- But only a valid DPI policyID & resource can be specified on a schema. | ||
- DPI validation happens when attempting to add a schema with '@policy'. | ||
- Learn more about [ACP & DPI Rules](/acp/README.md) | ||
|
||
Example: add from an argument string: | ||
defradb client acp policy add -i cosmos1f2djr7dl9vhrk3twt3xwqp09nhtzec9mdkf70j ' | ||
description: A Valid DefraDB Policy Interface | ||
|
||
actor: | ||
name: actor | ||
|
||
resources: | ||
users: | ||
permissions: | ||
read: | ||
expr: owner + reader | ||
write: | ||
expr: owner | ||
|
||
relations: | ||
owner: | ||
types: | ||
- actor | ||
reader: | ||
types: | ||
- actor | ||
' | ||
|
||
Example: add from file: | ||
defradb client acp policy add -i cosmos17r39df0hdcrgnmmw4mvu7qgk5nu888c7uvv37y -f policy.yml | ||
|
||
Example: add from file, verbose flags: | ||
defradb client acp policy add --identity cosmos1kpw734v54g0t0d8tcye8ee5jc3gld0tcr2q473 --file policy.yml | ||
|
||
Example: add from stdin: | ||
cat policy.yml | defradb client acp policy add - | ||
|
||
|
||
|
||
``` | ||
defradb client acp policy add [-i --identity] [policy] [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-f, --file string File to load a policy from | ||
-h, --help help for add | ||
-i, --identity string [Required] Identity of the creator | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--allowed-origins stringArray List of origins to allow for CORS requests | ||
--log-format string Log format to use. Options are text or json (default "text") | ||
--log-level string Log level to use. Options are debug, info, error, fatal (default "info") | ||
--log-output string Log output path. Options are stderr or stdout. (default "stderr") | ||
--log-overrides string Logger config overrides. Format <name>,<key>=<val>,...;<name>,... | ||
--log-source Include source location in logs | ||
--log-stacktrace Include stacktrace in error and fatal logs | ||
--max-txn-retries int Specify the maximum number of retries per transaction (default 5) | ||
--no-p2p Disable the peer-to-peer network synchronization system | ||
--p2paddr strings Listen addresses for the p2p network (formatted as a libp2p MultiAddr) (default [/ip4/127.0.0.1/tcp/9171]) | ||
--peers stringArray List of peers to connect to | ||
--privkeypath string Path to the private key for tls | ||
--pubkeypath string Path to the public key for tls | ||
--rootdir string Directory for persistent data (default: $HOME/.defradb) | ||
--store string Specify the datastore to use (supported: badger, memory) (default "badger") | ||
--tx uint Transaction ID | ||
--url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") | ||
--valuelogfilesize int Specify the datastore value log file size (in bytes). In memory size will be 2*valuelogfilesize (default 1073741824) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [defradb client acp policy](defradb_client_acp_policy.md) - Interact with the acp policy features of DefraDB instance | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters