Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Sep 18, 2024
1 parent 9cd1749 commit 2c542a8
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The following keys are loaded from the keyring on start:
- `peer-key` Ed25519 private key (required)
- `encryption-key` AES-128, AES-192, or AES-256 key (optional)

A secret to unlock the keyring is required on start and must be provided via the `DEFRADB_KEYRING_SECRET` environment variable. If a `.env` file is available at the root of the project, the secret can be stored there.
A secret to unlock the keyring is required on start and must be provided via the `DEFRADB_KEYRING_SECRET` environment variable. If a `.env` file is available in the working directory, the secret can be stored there or via a file at a path defined by the `--keyring-secret-file` flag.

The keys will be randomly generated on the inital start of the node if they are not found.

Expand Down
3 changes: 2 additions & 1 deletion cli/keyring_export.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ func MakeKeyringExportCommand() *cobra.Command {
Prints the hexadecimal representation of a private key.
The DEFRA_KEYRING_SECRET environment variable must be set to unlock the keyring.
This can also be done with a .env file in the root directory.
This can also be done with a .env file in the working directory or at a path
defined with the --keyring-secret-file flag.
Example:
defradb keyring export encryption-key`,
Expand Down
3 changes: 2 additions & 1 deletion cli/keyring_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Randomly generate and store private keys in the keyring.
By default peer and encryption keys will be generated.
The DEFRA_KEYRING_SECRET environment variable must be set to unlock the keyring.
This can also be done with a .env file in the root directory.
This can also be done with a .env file in the working directory or at a path
defined with the --keyring-secret-file flag.
WARNING: This will overwrite existing keys in the keyring.
Expand Down
3 changes: 2 additions & 1 deletion cli/keyring_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ func MakeKeyringImportCommand() *cobra.Command {
Store an externally generated key in the keyring.
The DEFRA_KEYRING_SECRET environment variable must be set to unlock the keyring.
This can also be done with a .env file in the root directory.
This can also be done with a .env file in the working directory or at a path
defined with the --keyring-secret-file flag.
Example:
defradb keyring import encryption-key 0000000000000000`,
Expand Down
33 changes: 17 additions & 16 deletions docs/website/references/cli/defradb_client_purge.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,23 @@ defradb client purge [flags]
### Options inherited from parent commands

```
-i, --identity string Hex formatted private key used to authenticate with ACP
--keyring-backend string Keyring backend to use. Options are file or system (default "file")
--keyring-namespace string Service name to use when using the system backend (default "defradb")
--keyring-path string Path to store encrypted keys when using the file backend (default "keys")
--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
--no-keyring Disable the keyring and generate ephemeral keys
--no-log-color Disable colored log output
--rootdir string Directory for persistent data (default: $HOME/.defradb)
--source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor
--tx uint Transaction ID
--url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181")
-i, --identity string Hex formatted private key used to authenticate with ACP
--keyring-backend string Keyring backend to use. Options are file or system (default "file")
--keyring-namespace string Service name to use when using the system backend (default "defradb")
--keyring-path string Path to store encrypted keys when using the file backend (default "keys")
--keyring-secret-file string Path to the file containing the keyring secret (default ".env")
--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
--no-keyring Disable the keyring and generate ephemeral keys
--no-log-color Disable colored log output
--rootdir string Directory for persistent data (default: $HOME/.defradb)
--source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor
--tx uint Transaction ID
--url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181")
```

### SEE ALSO
Expand Down
3 changes: 2 additions & 1 deletion docs/website/references/cli/defradb_keyring_export.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Export a private key.
Prints the hexadecimal representation of a private key.

The DEFRA_KEYRING_SECRET environment variable must be set to unlock the keyring.
This can also be done with a .env file in the root directory.
This can also be done with a .env file in the working directory or at a path
defined with the --keyring-secret-file flag.

Example:
defradb keyring export encryption-key
Expand Down
3 changes: 2 additions & 1 deletion docs/website/references/cli/defradb_keyring_generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Randomly generate and store private keys in the keyring.
By default peer and encryption keys will be generated.

The DEFRA_KEYRING_SECRET environment variable must be set to unlock the keyring.
This can also be done with a .env file in the root directory.
This can also be done with a .env file in the working directory or at a path
defined with the --keyring-secret-file flag.

WARNING: This will overwrite existing keys in the keyring.

Expand Down
3 changes: 2 additions & 1 deletion docs/website/references/cli/defradb_keyring_import.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Import a private key.
Store an externally generated key in the keyring.

The DEFRA_KEYRING_SECRET environment variable must be set to unlock the keyring.
This can also be done with a .env file in the root directory.
This can also be done with a .env file in the working directory or at a path
defined with the --keyring-secret-file flag.

Example:
defradb keyring import encryption-key 0000000000000000
Expand Down

0 comments on commit 2c542a8

Please sign in to comment.