Skip to content

Commit fde1ac8

Browse files
Merge pull request #148 from HarperDB/CORE-2618
add docs for revoked certs
2 parents 61cd9f7 + 2b876eb commit fde1ac8

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

docs/deployments/configuration.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ An array of routes to connect to other nodes. Each element in the array can be e
212212

213213
Replication will attempt to catch up on all remote data upon setup. To start replication from a specific date, set this property.
214214

215+
`revokedCertificates` - _Type_: array;
216+
217+
An array of serial numbers of revoked certificates. If a connection is attempted with a certificate that is in this list, the connection will be rejected.
218+
215219
```yaml
216220
replication:
217221
copyTablesToCatchUp: true
@@ -221,6 +225,9 @@ replication:
221225
- hostname: server-three # define a hostname and port
222226
port: 9930
223227
startTime: 2024-02-06T15:30:00Z
228+
revokedCertificates:
229+
- 1769F7D6A
230+
- QA69C7E2S
224231
```
225232

226233
`port` - _Type_: integer;

docs/developers/operations-api/clustering.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ _Operation is restricted to super_user roles only_
1515
* verify_tls _(optional)_ - a boolean which determines if the TLS certificate should be verified. This will allow the HarperDB default self-signed certificates to be accepted. Defaults to `true`
1616
* authorization _(optional)_ - an object or a string which contains the authorization information for the node being added. If it is an object, it should contain `username` and `password` fields. If it is a string, it should use HTTP `Authorization` style credentials
1717
* retain_authorization _(optional)_ - a boolean which determines if the authorization credentials should be retained/stored and used everytime a connection is made to this node. If `true`, the authorization will be stored on the node record. Generally this should not be used, as mTLS/certificate based authorization is much more secure and safe, and avoids the need for storing credentials. Defaults to `false`.
18+
* revoked_certificates _(optional)_ - an array of revoked certificates serial numbers. If a certificate is revoked, it will not be accepted for any connections.
1819
* subscriptions _(optional)_ - The relationship created between nodes. If not provided a fully replicated cluster will be setup. Must be an object array and include `database`, `table`, `subscribe` and `publish`:
1920
* database - the database to replicate
2021
* table - the table to replicate
@@ -52,6 +53,7 @@ _Note: will attempt to add the node if it does not exist_
5253

5354
* operation _(required)_ - must always be `update_node`
5455
* hostname _(required)_ - the `hostname` of the remote node you are updating
56+
* revoked_certificates _(optional)_ - an array of revoked certificates serial numbers. If a certificate is revoked, it will not be accepted for any connections.
5557
* subscriptions _(required)_ - The relationship created between nodes. Must be an object array and include `database`, `table`, `subscribe` and `publish`:
5658
* database - the database to replicate from
5759
* table - the table to replicate from

docs/developers/replication/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,32 @@ You can also provide credentials in HTTP Authorization format (Basic auth, Token
144144

145145
Additionally, you can use `set_node` as an alias for the `add_node` operation if you prefer.
146146

147+
#### Revoking Certificates
148+
149+
Certificates used in replication can be revoked by using the certificate serial number and either the `revoked_certificates` attribute in the `hdb_nodes` system table or route config in `harperdb-config.yaml`.
150+
151+
To utilize the `revoked_certificates` attribute in the `hdb_nodes` table, you can use the `add_node` or `update_node` operation to add the certificate serial number to the `revoked_certificates` array. For example:
152+
153+
```json
154+
{
155+
"operation": "update_node",
156+
"hostname": "server-two",
157+
"revoked_certificates": ["1769F7D6A"]
158+
}
159+
```
160+
161+
To utilize the replication route config in `harperdb-config.yaml`, you can add the certificate serial number to the `revokedCertificates` array. For example:
162+
163+
```yaml
164+
replication:
165+
routes:
166+
- hostname: server-three
167+
port: 9930
168+
revokedCertificates:
169+
- 1769F7D6A
170+
- QA69C7E2S
171+
```
172+
147173
#### Removing Nodes
148174

149175
Nodes can be removed from the cluster using the [`remove_node` operation](../operations-api/clustering.md). This will remove the node from the cluster, and stop replication to and from the node. For example:

0 commit comments

Comments
 (0)