Skip to content

Commit e9db6dd

Browse files
docs: configuration updates for queues and signing configs
1 parent 4624a6b commit e9db6dd

File tree

2 files changed

+54
-5
lines changed

2 files changed

+54
-5
lines changed

docs/app/configuration/page.mdx

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ uri = "https://mainnet.utxorpc-v0.demeter.run"
4141
[[queues]]
4242
name = "banana"
4343
weight = 2
44+
45+
[signing]
46+
api_addr = "http://127.0.0.1:8200"
47+
token = "your root token"
48+
path = "path"
49+
key = "key"
4450
```
4551

4652
### `storage` section
@@ -111,15 +117,51 @@ The `u5c.metadata` section is optional and defines metadata for U5C connection,
111117

112118
The `queues` section defines the options to create queues.
113119

114-
| property | type | example |
115-
| -------- | ------- | ---------- |
116-
| name | string | queue_name |
117-
| weight | number | 2 |
118-
| chained | bool | true |
120+
| property | type | example |
121+
| --------------- | ------- | ---------- |
122+
| name | string | queue_name |
123+
| weight | number | 2 |
124+
| chained | bool | true |
125+
| server_signing | bool | true |
119126

120127
- `name`: queue name that can be used in sending transactions.
121128
- `weight`: the weight of the queue. A queue with a bigger weight will have more priority to process transactions.
122129
- `chained`: define the queue's behaviour, when it's true, to send a transaction to the queue it's required to lock the state first.
130+
- `server_signing`: indicates whether the queue can sign unsigned transactions.
131+
132+
### `signing` section
133+
134+
The `signing` section defines the hashicorp vault configurations.
135+
136+
| property | type | example |
137+
| -------- | ------- | ----------------------- |
138+
| api_addr | string | "http://127.0.0.1:8200" |
139+
| token | string | "your root token" |
140+
| path | string | "path" |
141+
| key | string | "key" |
142+
143+
Local installation guide: [Hashicorp Vault Installation](https://developer.hashicorp.com/vault/docs/install)
144+
145+
After installation, run the vault server via either of the following:
146+
- `vault server -dev`: This automatically generates a root token, which is printed at the bottom of the Vault server logs.
147+
- `vault server -dev -dev-root-token-id="custom-root-token`: This will allow you to generate your own `custom root token`
148+
149+
In either case, copy the root token and paste it into the token field in the signing configuration.
150+
151+
Once the server runs, login to hashicorp vault via:
152+
- `export VAULT_ADDR='http://127.0.0.1:8200'`
153+
- `vault login your-root-token`
154+
155+
After logging in successfully, you can manually store a secret using either of the following methods:
156+
- [Hashicorp Vault UI](http://127.0.0.1:8200/ui): In the dashboard, since we're using Hashicorp Vault's `kv secret engine`, click on the `secret/` item under Secret Engines. Create your own secret — this will be the value for the `path` field in the signing config. Under secret data, specify the `key-value pair`. The `key` will correspond to the key field in the signing config.
157+
- `vault kv put secret/secret-name key="value"`: Alternatively, use this CLI command to store a secret directly.
158+
159+
Note that this is the case for hashicorp vault's secret storage, at least for kv secret engine. You can store multiple key-value pairs under one secret / path.
160+
161+
- `api_addr`: The local hashicorp vault api address.
162+
- `token`: Used mainly for authentication. Can either be automatically or manually generated when vault server runs.
163+
- `path`: The path or basically the name of the secret.
164+
- `key`: The key to be retrieved and be used for signing.
123165

124166
## Tips
125167

examples/config.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@ uri = "https://mainnet.utxorpc-v0.demeter.run"
2727
name = "banana"
2828
weight = 2
2929
chained = false
30+
server_signing = true
31+
32+
[signing]
33+
api_addr = "http://127.0.0.1:8200"
34+
token = "your root token"
35+
path = "path"
36+
key = "key"

0 commit comments

Comments
 (0)