Skip to content

Commit a59fd97

Browse files
authored
Merge pull request #4496 from ClickHouse/security-sept25
Security sept25
2 parents be0bebe + 7487a67 commit a59fd97

File tree

78 files changed

+1344
-645
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1344
-645
lines changed

docs/_snippets/_users-and-roles-common.md

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -120,49 +120,51 @@ With this set of examples:
120120

121121
Roles are used to define groups of users for certain privileges instead of managing each user separately.
122122

123-
1. Create a role to restrict users of this role to only see `column1` in database `db1` and `table1`:
123+
<VerticalStepper headerLevel="h5">
124+
125+
##### Create a role to restrict users of this role to only see `column1` in database `db1` and `table1`: {#create-column-role}
124126

125127
```sql
126128
CREATE ROLE column1_users;
127129
```
128130

129-
2. Set privileges to allow view on `column1`
131+
##### Set privileges to allow view on `column1` {#set-column-privileges}
130132

131133
```sql
132134
GRANT SELECT(id, column1) ON db1.table1 TO column1_users;
133135
```
134136

135-
3. Add the `column_user` user to the `column1_users` role
137+
##### Add the `column_user` user to the `column1_users` role {#add-column-user-to-role}
136138

137139
```sql
138140
GRANT column1_users TO column_user;
139141
```
140142

141-
4. Create a role to restrict users of this role to only see selected rows, in this case, only rows containing `A` in `column1`
143+
##### Create a role to restrict users of this role to only see selected rows, in this case, only rows containing `A` in `column1` {#create-row-role}
142144

143145
```sql
144146
CREATE ROLE A_rows_users;
145147
```
146148

147-
5. Add the `row_user` to the `A_rows_users` role
149+
##### Add the `row_user` to the `A_rows_users` role {#add-row-user-to-role}
148150

149151
```sql
150152
GRANT A_rows_users TO row_user;
151153
```
152154

153-
6. Create a policy to allow view on only where `column1` has the values of `A`
155+
##### Create a policy to allow view on only where `column1` has the values of `A` {#create-row-policy}
154156

155157
```sql
156158
CREATE ROW POLICY A_row_filter ON db1.table1 FOR SELECT USING column1 = 'A' TO A_rows_users;
157159
```
158160

159-
7. Set privileges to the database and table
161+
##### Set privileges to the database and table {#set-db-table-privileges}
160162

161163
```sql
162164
GRANT SELECT(id, column1, column2) ON db1.table1 TO A_rows_users;
163165
```
164166

165-
8. grant explicit permissions for other roles to still have access to all rows
167+
##### Grant explicit permissions for other roles to still have access to all rows {#grant-other-roles-access}
166168

167169
```sql
168170
CREATE ROW POLICY allow_other_users_filter
@@ -173,17 +175,21 @@ Roles are used to define groups of users for certain privileges instead of manag
173175
When attaching a policy to a table, the system will apply that policy, and only those users and roles defined will be able to do operations on the table, all others will be denied any operations. In order to not have the restrictive row policy applied to other users, another policy must be defined to allow other users and roles to have regular or other types of access.
174176
:::
175177

178+
</VerticalStepper>
179+
176180
## Verification {#verification}
177181

178182
### Testing role privileges with column restricted user {#testing-role-privileges-with-column-restricted-user}
179183

180-
1. Log into the clickhouse client using the `clickhouse_admin` user
184+
<VerticalStepper headerLevel="h5">
185+
186+
##### Log into the clickhouse client using the `clickhouse_admin` user {#login-admin-user}
181187

182188
```bash
183189
clickhouse-client --user clickhouse_admin --password password
184190
```
185191

186-
2. Verify access to database, table and all rows with the admin user.
192+
##### Verify access to database, table and all rows with the admin user. {#verify-admin-access}
187193

188194
```sql
189195
SELECT *
@@ -201,13 +207,13 @@ Roles are used to define groups of users for certain privileges instead of manag
201207
└────┴─────────┴─────────┘
202208
```
203209

204-
3. Log into the ClickHouse client using the `column_user` user
210+
##### Log into the ClickHouse client using the `column_user` user {#login-column-user}
205211

206212
```bash
207213
clickhouse-client --user column_user --password password
208214
```
209215

210-
4. Test `SELECT` using all columns
216+
##### Test `SELECT` using all columns {#test-select-all-columns}
211217

212218
```sql
213219
SELECT *
@@ -230,7 +236,7 @@ Roles are used to define groups of users for certain privileges instead of manag
230236
Access is denied since all columns were specified and the user only has access to `id` and `column1`
231237
:::
232238

233-
5. Verify `SELECT` query with only columns specified and allowed:
239+
##### Verify `SELECT` query with only columns specified and allowed: {#verify-allowed-columns}
234240

235241
```sql
236242
SELECT
@@ -250,15 +256,19 @@ Roles are used to define groups of users for certain privileges instead of manag
250256
└────┴─────────┘
251257
```
252258

259+
</VerticalStepper>
260+
253261
### Testing role privileges with row restricted user {#testing-role-privileges-with-row-restricted-user}
254262

255-
1. Log into the ClickHouse client using `row_user`
263+
<VerticalStepper headerLevel="h5">
264+
265+
##### Log into the ClickHouse client using `row_user` {#login-row-user}
256266

257267
```bash
258268
clickhouse-client --user row_user --password password
259269
```
260270

261-
2. View rows available
271+
##### View rows available {#view-available-rows}
262272

263273
```sql
264274
SELECT *
@@ -278,37 +288,41 @@ Roles are used to define groups of users for certain privileges instead of manag
278288
Verify that only the above two rows are returned, rows with the value `B` in `column1` should be excluded.
279289
:::
280290

291+
</VerticalStepper>
292+
281293
## Modifying users and roles {#modifying-users-and-roles}
282294

283295
Users can be assigned multiple roles for a combination of privileges needed. When using multiple roles, the system will combine the roles to determine privileges, the net effect will be that the role permissions will be cumulative.
284296

285297
For example, if one `role1` allows for only select on `column1` and `role2` allows for select on `column1` and `column2` then the user will have access to both columns.
286298

287-
1. Using the admin account, create new user to restrict by both row and column with default roles
299+
<VerticalStepper headerLevel="h5">
300+
301+
##### Using the admin account, create new user to restrict by both row and column with default roles {#create-restricted-user}
288302

289303
```sql
290304
CREATE USER row_and_column_user IDENTIFIED BY 'password' DEFAULT ROLE A_rows_users;
291305
```
292306

293-
2. Remove prior privileges for `A_rows_users` role
307+
##### Remove prior privileges for `A_rows_users` role {#remove-prior-privileges}
294308

295309
```sql
296310
REVOKE SELECT(id, column1, column2) ON db1.table1 FROM A_rows_users;
297311
```
298312

299-
3. Allow `A_row_users` role to only select from `column1`
313+
##### Allow `A_row_users` role to only select from `column1` {#allow-column1-select}
300314

301315
```sql
302316
GRANT SELECT(id, column1) ON db1.table1 TO A_rows_users;
303317
```
304318

305-
4. Log into the ClickHouse client using `row_and_column_user`
319+
##### Log into the ClickHouse client using `row_and_column_user` {#login-restricted-user}
306320

307321
```bash
308322
clickhouse-client --user row_and_column_user --password password;
309323
```
310324

311-
5. Test with all columns:
325+
##### Test with all columns: {#test-all-columns-restricted}
312326

313327
```sql
314328
SELECT *
@@ -327,7 +341,7 @@ For example, if one `role1` allows for only select on `column1` and `role2` allo
327341
SELECT(id, column1, column2) ON db1.table1. (ACCESS_DENIED)
328342
```
329343

330-
6. Test with limited allowed columns:
344+
##### Test with limited allowed columns: {#test-limited-columns}
331345

332346
```sql
333347
SELECT
@@ -344,6 +358,7 @@ For example, if one `role1` allows for only select on `column1` and `role2` allo
344358
│ 2 │ A │
345359
└────┴─────────┘
346360
```
361+
</VerticalStepper>
347362

348363
## Troubleshooting {#troubleshooting}
349364

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
| Page | Description |
2-
|---------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
3-
| [Shared Responsibility Model](/cloud/security/shared-responsibility-model) | Understand how security responsibilities are divided between ClickHouse Cloud and your organization for different service types. |
4-
| [Cloud Access Management](/cloud/security/cloud-access-management) | Manage user access with authentication, single sign-on (SSO), role-based permissions, and team invitations. |
5-
| [Connectivity](/cloud/security/connectivity) | Configure secure network access including IP allow-lists, private networking, S3 data access, and Cloud IP address management. |
6-
| [Enhanced Encryption](/cloud/security/cmek) | Learn about default AES 256 encryption and how to enable Transparent Data Encryption (TDE) for additional data protection at rest. |
7-
| [Audit Logging](/cloud/security/audit-logging) | Set up and use audit logging to track and monitor activities in your ClickHouse Cloud environment. |
8-
| [Privacy and Compliance](/cloud/security/privacy-compliance-overview) | Review security certifications, compliance standards, and learn how to manage your personal information and data rights. |
1+
| Page | Description |
2+
|------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
3+
| [ClickHouse Cloud Security Features](/cloud/security) | Details the security options and best practices available for ClickHouse organization and service protection. |
4+
| [Cloud access management guides](/cloud/security/cloud_access_management) | This section contains step-by-step guides for managing access in ClickHouse Cloud. |
5+
| [Setting IP filters](/cloud/security/setting-ip-filters) | A guide on how to create or modify an IP access list. |
6+
| [Private networking](/cloud/security/connectivity/private-networking) | ClickHouse Cloud provides the ability to connect your services to your cloud virtual network. Refer to these guides for set up steps for your provider |
7+
| [Data masking](/cloud/guides/data-masking) | Learn how you can mask data in ClickHouse. |
8+
| [Data encryption](/cloud/security/cmek) | Learn how to enable Transparent Data Encryption as well as Customer Managed Encryption Keys. |
9+
| [Audit logging](/cloud/security/audit_logging) | Guides on how to access and review audited events in the ClickHouse Cloud console, as well as sample logs and queries customers can use in developing their BYOC security program |
10+
| [HIPAA onboarding](/cloud/security/compliance/hipaa-onboarding) | This page describes the process for enabling deployment of HIPAA compliant services in ClickHouse Cloud. |
11+
| [PCI onboarding](/cloud/security/compliance/pci-onboarding) | This page describes the process for enabling deployment of PCI compliant services in ClickHouse Cloud. |

docs/cloud/features/01_cloud_tiers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ You can upgrade to the Scale or Enterprise tier to scale their services.
173173
Designed for workloads requiring enhanced SLAs (2+ replica deployments), scalability, and advanced security.
174174

175175
- Offers support for features such as:
176-
- [Private networking support](/cloud/security/private-link-overview).
176+
- [Private networking support](/cloud/security/connectivity/private-networking).
177177
- [Compute-compute separation](../reference/warehouses#what-is-compute-compute-separation).
178178
- [Flexible scaling](/manage/scaling) options (scale up/down, in/out).
179179
- [Configurable backups](/cloud/manage/backups/configurable-backups)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: 'Deployment Options'
3+
slug: /infrastructure/deployment-options
4+
description: 'Deployment options available for ClickHouse customers'
5+
keywords: ['bring yor own cloud', 'byoc', 'private', 'government', 'self-deployed']
6+
doc_type: 'reference'
7+
---
8+
9+
# ClickHouse Deployment Options
10+
11+
ClickHouse provides a range of deployment options to cater to diverse customer requirements, offering varying degrees of control, compliance, and operational overhead.
12+
This document outlines the distinct deployment types available, enabling users to select the optimal solution that aligns with their specific architectural preferences, regulatory obligations, and resource management strategies.
13+
14+
## ClickHouse Cloud {#clickhouse-cloud}
15+
16+
ClickHouse Cloud is a fully managed, cloud-native service that delivers the power and speed of ClickHouse without the operational complexities of self-management.
17+
This option is ideal for users who prioritize rapid deployment, scalability, and minimal administrative overhead.
18+
ClickHouse Cloud handles all aspects of infrastructure provisioning, scaling, maintenance, and updates, allowing users to focus entirely on data analysis and application development.
19+
It offers consumption-based pricing, and automatic scaling, ensuring reliable and cost-effective performance for analytical workloads. It is available across AWS, GCP and Azure, with direct marketplace billing options.
20+
21+
Learn more about [ClickHouse Cloud](/getting-started/quick-start/cloud).
22+
23+
## Bring Your Own Cloud {#byoc}
24+
25+
ClickHouse Bring Your Own Cloud (BYOC) allows organizations to deploy and manage ClickHouse within their own cloud environment while leveraging a managed service layer. This option bridges the gap between the fully managed experience of ClickHouse Cloud and the complete control of self-managed deployments. With ClickHouse BYOC, users retain control over their data, infrastructure, and security policies, meeting specific compliance and regulatory requirements, while offloading operational tasks like patching, monitoring, and scaling to the ClickHouse. This model offers the flexibility of a private cloud deployment with the benefits of a managed service, making it suitable for large-scale deployments at enterprises with stringent security, governance, and data residency needs.
26+
27+
Learn more about [Bring Your Own Cloud](/cloud/reference/byoc).
28+
29+
## ClickHouse Private {#clickhouse-private}
30+
31+
ClickHouse Private is a self-deployed version of ClickHouse, leveraging the same proprietary technology that powers ClickHouse Cloud. This option delivers the highest degree of control, making it ideal for organizations with stringent compliance, networking, and security requirements, as well as for teams that possess the operational expertise to manage their own infrastructure. It benefits from regular updates and upgrades that are thoroughly tested in the ClickHouse Cloud environment, a feature-rich roadmap, and is backed by our expert support team.
32+
33+
Learn more about [ClickHouse Private](/cloud/infrastructure/clickhouse-private).
34+
35+
## ClickHouse Government {#clickhouse-government}
36+
37+
ClickHouse Government is a self-deployed version of ClickHouse designed to meet the unique and rigorous demands of government agencies and public sector organizations that need isolated and accredited environments. This deployment option provides a highly secure, compliant, and isolated environment, focusing on FIPS 140-3 compliance utilizing OpenSSL, additional system hardening, and vulnerability management. It leverages the robust capabilities of ClickHouse Cloud while integrating specialized features and configurations to address the specific operational and security requirements of governmental entities. With ClickHouse Government, agencies can achieve high-performance analytics on sensitive data within a controlled and accredited infrastructure, backed by expert support tailored to public sector needs.
38+
39+
Learn more about [ClickHouse Government](/cloud/infrastructure/clickhouse-government).

docs/cloud/features/05_admin_features/api/openapi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This document covers the ClickHouse Cloud API. For database API endpoints, pleas
3232
3. To create an API key, specify the key name, permissions for the key, and expiration time, then click `Generate API Key`.
3333
<br/>
3434
:::note
35-
Permissions align with ClickHouse Cloud [predefined roles](/cloud/security/cloud-access-management/overview#console-users-and-roles). The developer role has read-only permissions for assigned services and the admin role has full read and write permissions.
35+
Permissions align with ClickHouse Cloud [predefined roles](/cloud/security/console-roles). The developer role has read-only permissions for assigned services and the admin role has full read and write permissions.
3636
:::
3737

3838
<Image img={image_03} size="md" alt="Create API key form" border/>

0 commit comments

Comments
 (0)