Skip to content

Commit c87098d

Browse files
igorlukaninsrh
andauthored
docs: Data-at-rest encryption in Cube Store and customer-provided keys (CMK) (#8791)
* docs: Data-at-rest encryption in Cube Store and customer-provided keys (CMK) * . * Update docs/pages/product/workspace/encryption-keys.mdx Co-authored-by: Sam Hughes <sam@cube.dev> * Describe layers * . --------- Co-authored-by: Sam Hughes <sam@cube.dev>
1 parent cf4beff commit c87098d

File tree

4 files changed

+146
-11
lines changed

4 files changed

+146
-11
lines changed

docs/pages/product/caching/running-in-production.mdx

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -221,27 +221,41 @@ Cube Store cluster uses both persistent and scratch storage.
221221
Cube Store makes use of a separate storage layer for storing metadata as well as
222222
for persisting pre-aggregations as Parquet files.
223223

224-
Cube Store [can be configured][ref-config-env] to use either AWS S3 or
225-
Google Cloud Storage (GCS) as persistent storage. If desired, local path on
224+
Cube Store can be configured to use either AWS S3, Google Cloud Storage (GCS), or
225+
Azure Blob Storage as persistent storage. If desired, a local path on
226226
the server can also be used in case all Cube Store cluster nodes are
227227
co-located on a single machine.
228228

229229
<InfoBox>
230230

231-
Cube Store can only use one type of remote storage at runtime.
231+
Cube Store can only use one type of remote storage at the same time.
232232

233233
</InfoBox>
234234

235235
<WarningBox>
236236

237-
Cube Store requires strong consistency guarantees from underlying distributed
238-
storage. AWS S3, Google Cloud Storage, and Azure Blob Storage (Cube Cloud only)
239-
are the only known implementations that provide strong consistency. Using other
240-
implementations in production is discouraged and can lead to consistency and
241-
data corruption errors.
237+
Cube Store requires strong consistency guarantees from an underlying distributed
238+
storage. AWS S3, Google Cloud Storage, and Azure Blob Storage are the only known
239+
implementations that provide them. Using other implementations in production is
240+
discouraged and can lead to consistency and data corruption errors.
242241

243242
</WarningBox>
244243

244+
<SuccessBox>
245+
246+
Using Azure Blob Storage with Cube Store is only supported in Cube Cloud on
247+
[Enterprise and above plans](https://cube.dev/pricing).
248+
249+
</SuccessBox>
250+
251+
<InfoBox>
252+
253+
As an additional layer on top of standard AWS S3, Google Cloud Storage (GCS), or
254+
Azure Blob Storage encryption, persistent storage can optionally use [Parquet
255+
encryption](#data-at-rest-encryption) for data-at-rest protection.
256+
257+
</InfoBox>
258+
245259
A simplified example using AWS S3 might look like:
246260

247261
```yaml
@@ -313,10 +327,37 @@ should be built before any tables are removed.
313327

314328
## Security
315329

316-
Cube Store currently does not have any in-built authentication mechanisms. For
317-
this reason, we recommend running your Cube Store cluster on a network that only
318-
allows requests from the Cube deployment.
330+
### Authentication
331+
332+
Cube Store does not have any in-built authentication mechanisms. For this reason,
333+
we recommend running your Cube Store cluster with a network configuration that
334+
only allows access from the Cube deployment.
335+
336+
### Data-at-rest encryption
337+
338+
[Persistent storage](#persistent-storage) is secured using the standard AWS S3,
339+
Google Cloud Storage (GCS), or Azure Blob Storage encryption.
340+
341+
Cube Store also provides optional data-at-rest protection by utilizing the
342+
[modular encryption mechanism][link-parquet-encryption] of Parquet files in its
343+
persistent storage. Pre-aggregation data is secured using the [AES cipher][link-aes]
344+
with 256-bit keys. Data encyption and decryption are completely seamless to Cube
345+
Store operations.
346+
347+
<SuccessBox>
348+
349+
Data-at-rest encryption in Cube Store is only available in Cube Cloud on
350+
[Enterprise and above plans](https://cube.dev/pricing).
351+
352+
</SuccessBox>
353+
354+
You can provide, rotate, or drop your own [customer-managed keys][ref-cmk] (CMK)
355+
for Cube Store via the <Btn>Encryption Keys</Btn> page in Cube Cloud.
356+
319357

320358
[link-wsl2]: https://docs.microsoft.com/en-us/windows/wsl/install-win10
321359
[ref-caching-partitioning]: /product/caching/using-pre-aggregations#partitioning
322360
[ref-config-env]: /reference/configuration/environment-variables
361+
[link-parquet-encryption]: https://parquet.apache.org/docs/file-format/data-pages/encryption/
362+
[link-aes]: https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
363+
[ref-cmk]: /product/workspace/encryption-keys

docs/pages/product/workspace.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ metrics to external monitoring tools.
3737
Cube Cloud account and [single sign-on][ref-sso].
3838
- Use [Audit Log][ref-audit-log] to review security-related events in your
3939
Cube Cloud account.
40+
- Use the [encryption keys][ref-encryption-keys] page to manage [data-at-rest
41+
encryption in Cube Store][ref-cube-store-encryption].
4042
- Use [Budgets][ref-budgets] to control the usage and spend of your Cube
4143
Cloud account.
4244
- Use [Preferences][ref-prefs] to adjust the workspace to your liking.
@@ -74,3 +76,5 @@ With Cube Core, you can:
7476
[ref-cli]: /product/workspace/cli
7577
[ref-ai-assistant]: /product/workspace/ai-assistant
7678
[ref-semantic-catalog]: /product/workspace/semantic-catalog
79+
[ref-encryption-keys]: /product/workspace/encryption-keys
80+
[ref-cube-store-encryption]: /product/caching/running-in-production#data-at-rest-encryption

docs/pages/product/workspace/_meta.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = {
1414
"access-control": "Access Control",
1515
"sso": "Single Sign-on",
1616
"audit-log": "Audit Log",
17+
"encryption-keys": "Encryption keys",
1718
"budgets": "Budgets",
1819
"preferences": "Preferences",
1920
"cli": "CLI",
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Encryption keys
2+
3+
The <Btn>Encryption Keys</Btn> page in Cube Cloud allows to manage [data-at-rest
4+
encryption in Cube Store][ref-cube-store-encryption].
5+
6+
<SuccessBox>
7+
8+
Data-at-rest encryption in Cube Store is only available in Cube Cloud on
9+
[Enterprise and above plans](https://cube.dev/pricing).
10+
11+
</SuccessBox>
12+
13+
Navigate to <Btn>Settings → Encryption Keys</Btn> in your Cube Cloud deployment
14+
to [provide](#add-a-key), [rotate](#rotate-a-key), or [drop](#drop-a-key)
15+
your own customer-managed keys (CMK) for Cube Store.
16+
17+
## Customer-managed keys for Cube Store
18+
19+
On the <Btn>Encryption Keys</Btn> page, you can see all previously provided keys:
20+
21+
<Screenshot src="https://ucarecdn.com/48038ac1-fdf1-4c87-8860-ac503bfcdac3/" />
22+
23+
### Add a key
24+
25+
To add an encryption key, click <Btn>Create</Btn> to open a modal window.
26+
Provide the key name and the key value: an 256-bit AES encryption key, encoded
27+
in [standard Base64][link-base64] in its canonical representation.
28+
29+
<Screenshot src="https://ucarecdn.com/9338679e-9ed0-4ac2-86a8-975e08699c34/" />
30+
31+
**Once the first encryption key is added, Cube Store will assume that data-at-rest
32+
encryption is enabled.** After that, querying unencrypted pre-aggregation partitions
33+
will yield the following error: `Invalid Parquet file in encrypted mode. File (or
34+
at least the Parquet footer) is not encrypted`.
35+
36+
<InfoBox>
37+
38+
It may take a few minutes for any changes to encryption keys to take effect.
39+
40+
</InfoBox>
41+
42+
After the refresh worker builds or rebuilds pre-aggregation partitions with
43+
respect to their [refresh strategy][ref-pre-aggs-refresh-strategy] or after they
44+
are [built manually][ref-pre-aggs-build-manually], their data will be encrypted.
45+
46+
**For encryption, the most recently added encryption key is used.** For decryption,
47+
all previously provided keys can be used, if there are still any pre-aggregation
48+
partitions encrypted with those keys.
49+
50+
### Rotate a key
51+
52+
To rotate an encryption key, you have to [add a new key](#add-a-key) and then
53+
rebuild pre-aggregation partitions using this key, either by the means of the
54+
refresh worker, or manually.
55+
56+
You can check which encryption key is used by any pre-aggregation partition by
57+
querying `system.tables` in Cube Store via [SQL Runner][ref-sql-runner]:
58+
59+
<Screenshot src="https://ucarecdn.com/017ca9d6-e8d2-4896-9324-1bec38aaa621/" />
60+
61+
<WarningBox>
62+
63+
Only newly built or rebuilt pre-aggregation partitions will be encrypted using the
64+
newly added encryption key. Previously built partitions will still be encrypted
65+
using previously provided keys. If you [drop a key](#drop-a-key) before these
66+
partitions are rebuilt, querying them will yield an error.
67+
68+
</WarningBox>
69+
70+
<InfoBox>
71+
72+
If you're using [incremental pre-aggregations][ref-pre-aggs-incremental], the
73+
refresh worker will likely only rebuild some of their partitions. You have to [rebuild
74+
them manually][ref-pre-aggs-build-manually] to ensure that the new encryption key
75+
is used.
76+
77+
</InfoBox>
78+
79+
### Drop a key
80+
81+
To drop an encryption key, click <Btn>Delete</Btn> next to it.
82+
83+
84+
[ref-cube-store-encryption]: /product/caching/running-in-production#data-at-rest-encryption
85+
[link-base64]: https://datatracker.ietf.org/doc/html/rfc4648#section-4
86+
[ref-pre-aggs-refresh-strategy]: /product/caching/using-pre-aggregations#refresh-strategy
87+
[ref-pre-aggs-build-manually]: /product/workspace/pre-aggregations
88+
[ref-pre-aggs-incremental]: /reference/data-model/pre-aggregations#incremental
89+
[ref-sql-runner]: /product/workspace/sql-runner

0 commit comments

Comments
 (0)