Skip to content

Commit 3f2e4ec

Browse files
move license to installation and remove advanced features.
1 parent c4a71f8 commit 3f2e4ec

File tree

24 files changed

+338
-230
lines changed

24 files changed

+338
-230
lines changed

docusaurus-docs/docs/admin/admin-tasks/binary-backups.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ Online restore operations return immediately after the request is sent. The rest
404404
:::note
405405
When using backups made from a Dgraph cluster that uses encryption (so backups are encrypted),
406406
you need to use the same key from that original cluster when doing a restore process.
407-
Dgraph's [Encryption at Rest](../enterprise-features/encryption-at-rest) uses a symmetric-key
407+
Dgraph's [Encryption at Rest](../../installation/configuration/encryption-at-rest) uses a symmetric-key
408408
algorithm where the same key is used for both encryption and decryption, so the encryption key from that
409409
cluster is needed for the restore process.
410410
:::

docusaurus-docs/docs/admin/enterprise-features/encryption-at-rest.md

Lines changed: 0 additions & 137 deletions
This file was deleted.

docusaurus-docs/docs/admin/enterprise-features/license.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

docusaurus-docs/docs/admin/observability/audit-logs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Track and audit all requests (queries and mutations) with Dgraph au
44
---
55

66
:::note
7-
**Enterprise Feature**: Audit logging requires a Dgraph Enterprise license. See [License](../enterprise-features/license) for details.
7+
**Enterprise Feature**: Audit logging requires a Dgraph Enterprise license. See [License](../../installation/configuration/license) for details.
88
:::
99

1010
Audit logging tracks all requests (queries and mutations) sent to your Dgraph cluster. When enabled, audit logs record the following information for each request:

docusaurus-docs/docs/admin/observability/log-format.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Dgraph logs requests for queries and mutations, and also provides a
44
---
55

66
Dgraph logs requests for queries and mutations, and also provides audit logging
7-
capabilities with a Dgraph [enterprise license](../enterprise-features/license).
7+
capabilities with a Dgraph [enterprise license](../../installation/configuration/license).
88

99
Dgraph's log format comes from the glog library and is [formatted](https://github.com/golang/glog/blob/23def4e6c14b4da8ac2ed8007337bc5eb5007998/glog.go#L523-L533) as follows:
1010

docusaurus-docs/docs/admin/security/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ Dgraph security configuration covers authentication, network security, and acces
1919

2020
**[Audit Logging](../observability/audit-logs)** - Track and audit all requests
2121

22-
**[Encryption at Rest](../enterprise-features/encryption-at-rest)** - Encrypt data on disk
22+
**[Encryption at Rest](../../installation/configuration/encryption-at-rest)** - Encrypt data on disk

docusaurus-docs/docs/installation/configuration/change-data-capture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Stream database mutations and drop events to Kafka or local file si
44
---
55

66
:::note
7-
**Enterprise Feature**: Change Data Capture requires a Dgraph Enterprise license. See [License](../../admin/enterprise-features/license) for details.
7+
**Enterprise Feature**: Change Data Capture requires a Dgraph Enterprise license. See [License](license) for details.
88
:::
99

1010
Change Data Capture (CDC) streams database mutations and drop events to external sinks (Kafka or local files). CDC tracks all `set` and `delete` mutations except those affecting password fields, along with all drop events. Live Loader events are recorded; Bulk Loader events are not.

docusaurus-docs/docs/installation/configuration/enable-acl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Enable ACL
66
Access Control List (ACL) provides access protection to your data stored in Dgraph. When the ACL feature is enabled, a client must authenticate with a username and password before executing any transactions, and is only allowed to access the data permitted by the ACL rules.
77

88
:::note
9-
**Enterprise Feature**: ACL requires a Dgraph Enterprise license. See [License](../../admin/enterprise-features/license) for details.
9+
**Enterprise Feature**: ACL requires a Dgraph Enterprise license. See [License](license) for details.
1010
:::
1111

1212
## Enable Enterprise ACL Feature
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
title: Encryption at Rest
3+
description: Encrypt data stored on disk using AES encryption
4+
---
5+
6+
:::note
7+
**Enterprise Feature**: Encryption at Rest requires a Dgraph Enterprise license. See [License](license) for details.
8+
:::
9+
10+
Encryption at Rest encrypts data stored on disk, ensuring sensitive data is not readable without a valid decryption key. Dgraph uses the [Advanced Encryption Standard (AES)](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) algorithm for encryption.
11+
12+
Encryption keys can be stored on Hashicorp Vault servers in addition to local file systems.
13+
14+
## Setup
15+
16+
To enable encryption, pass a file containing the data encryption key using the `--encryption key-file=value` option. The key size must be 16, 24, or 32 bytes, determining the AES block size: AES-128, AES-192, or AES-256, respectively.
17+
18+
Generate an encryption key file (set `count` to the desired key size):
19+
20+
```bash
21+
tr -dc 'a-zA-Z0-9' < /dev/urandom | dd bs=1 count=32 of=enc_key_file
22+
```
23+
24+
:::note
25+
On macOS, use `LC_CTYPE=C; tr -dc 'a-zA-Z0-9' < /dev/urandom | dd bs=1 count=32 of=enc_key_file`. To view the key, use `cat enc_key_file`.
26+
:::
27+
28+
Alternatively, use the `--vault` [superflag](../../cli/superflags) options to enable encryption with Hashicorp Vault, as [explained below](#hashicorp-vault-configuration).
29+
30+
## Enable Encryption
31+
32+
Start Zero and Alpha with encryption enabled:
33+
34+
```bash
35+
dgraph zero --my="localhost:5080" --replicas 1 --raft "idx=1"
36+
dgraph alpha --encryption key-file="./enc_key_file" --my="localhost:7080" --zero="localhost:5080"
37+
```
38+
39+
If multiple Alpha nodes are in the cluster, pass the `--encryption key-file` option to each Alpha.
40+
41+
Once encryption is enabled on an Alpha, the encryption key must be provided to start the server. If the Alpha restarts, the `--encryption key-file` option must be set with the key to restart successfully.
42+
43+
### Hashicorp Vault Configuration
44+
45+
You can store the encryption key in [Hashicorp Vault](https://www.vaultproject.io/) K/V Secrets instead of a local file.
46+
47+
**Prerequisites:**
48+
49+
1. Ensure the Vault server is accessible from Dgraph Alpha and configured using URL `http://fqdn[ip]:port`.
50+
2. Enable [AppRole Auth method](https://www.vaultproject.io/docs/auth/approle) and [KV Secrets Engine](https://www.vaultproject.io/docs/secrets/kv).
51+
3. Save the encryption key (16, 24, or 32 bytes) in a KV Secret path ([K/V Version 1](https://www.vaultproject.io/docs/secrets/kv/kv-v1) or [K/V Version 2](https://www.vaultproject.io/docs/secrets/kv/kv-v2)). For example, upload to KV Secrets Engine Version 2 path `secret/data/dgraph/alpha`:
52+
```json
53+
{
54+
"options": {
55+
"cas": 0
56+
},
57+
"data": {
58+
"enc_key": "qIvHQBVUpzsOp74PmMJjHAOfwIA1e6zm%"
59+
}
60+
}
61+
```
62+
4. Create or use a role with an attached policy that grants access to the secret. For example, the following policy grants access to `secret/data/dgraph/alpha`:
63+
```hcl
64+
path "secret/data/dgraph/*" {
65+
capabilities = [ "read", "update" ]
66+
}
67+
```
68+
5. Using the `role_id` from the previous step, create a corresponding `secret_id`, and copy both to local files (e.g., `./dgraph/vault/role_id` and `./dgraph/vault/secret_id`) for use by Dgraph Alpha nodes.
69+
70+
:::note
71+
The key format for the `enc-field` option can be defined using `enc-format` with values `base64` (default) or `raw`.
72+
:::
73+
74+
### Example: Using Hashicorp Vault
75+
76+
Start Dgraph with a Vault server holding the encryption key:
77+
78+
```bash
79+
## Start Dgraph Zero in a separate terminal
80+
dgraph zero --my=localhost:5080 --replicas 1 --raft "idx=1"
81+
82+
## Start Dgraph Alpha in a separate terminal
83+
dgraph alpha --my="localhost:7080" --zero="localhost:5080" \
84+
--vault addr="http://localhost:8200";enc-field="enc_key";enc-format="raw";path="secret/data/dgraph/alpha";role-id-file="./role_id";secret-id-file="./secret_id"
85+
```
86+
87+
If multiple Alpha nodes are in the cluster, pass the `--encryption key-file` flag or the `--vault` superflag with appropriate options to each Alpha.
88+
89+
After encryption is enabled on an Alpha, you must provide the encryption key to start the server. If the Alpha restarts, the `--encryption key-file` or `--vault` superflag options must be set with the key to restart successfully.
90+
91+
## Disable Encryption
92+
93+
Use [live loader](../../migration/live-loader) or [bulk loader](../../migration/bulk-loader) to decrypt data during import.
94+
95+
## Key Rotation
96+
97+
The master encryption key set by `--encryption key-file` (or stored in Vault) does not change automatically. The master key encrypts underlying data keys, which are rotated automatically (see the [encryption-at-rest blog post][encblog] for details).
98+
99+
[encblog]: https://dgraph.io/blog/post/encryption-at-rest-dgraph-badger#one-key-to-rule-them-all-many-keys-to-find-them
100+
101+
To rotate the master encryption key, use the `badger rotate` command on both `p` and `w` directories for each Alpha. In HA cluster configurations, rotate keys one Alpha at a time in a rolling manner to maintain availability.
102+
103+
You need both the current key and the new key in separate files. Specify the directory to rotate (`p` or `w`) with `--dir`, the old key with `--old-key-path`, and the new key with `--new-key-path`:
104+
105+
```bash
106+
badger rotate --dir p --old-key-path enc_key_file --new-key-path new_enc_key_file
107+
badger rotate --dir w --old-key-path enc_key_file --new-key-path new_enc_key_file
108+
```
109+
110+
Then start Alpha with the `new_enc_key_file` to use the new key.
111+

docusaurus-docs/docs/installation/configuration/learner-nodes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Learner Nodes
33
description: Deploy read-only replica instances for low-latency best-effort queries in remote geographic regions
44
---
55
:::note
6-
**Enterprise Feature**: Learner nodes require a Dgraph Enterprise license. See [License](../../admin/enterprise-features/license) for details.
6+
**Enterprise Feature**: Learner nodes require a Dgraph Enterprise license. See [License](license) for details.
77
:::
88

99
Learner nodes are read-only replica instances that serve best-effort queries with zero latency overhead. Use learner nodes to provide low-latency access for clients in remote geographic regions distant from your main Dgraph cluster.

0 commit comments

Comments
 (0)