Skip to content

Commit e45664b

Browse files
authored
Merge pull request #3884 from ClickHouse/ip-filter-update
API key IP filter addition
2 parents 36458bf + 40a9f35 commit e45664b

File tree

2 files changed

+40
-21
lines changed

2 files changed

+40
-21
lines changed

docs/cloud/security/connectivity-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This section looks at connectivity and contains the following pages:
1010

1111
| Page | Description |
1212
|----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
13-
| [Setting IP Filters](/cloud/security/setting-ip-filters) | A guide on how to control traffic to your ClickHouse services using IP access lists. |
13+
| [Setting IP Filters](/cloud/security/setting-ip-filters) | A guide on how to control traffic to your ClickHouse services and API keys using IP access lists. |
1414
| [Private Networking](/cloud/security/private-link-overview) | Information on how to connect your services to your cloud virtual network. |
1515
| [Accessing S3 Data Securely](/cloud/security/secure-s3) | A guide on how to leverage role-based access to authenticate with Amazon Simple Storage Service(S3) and access data securely. |
1616
| [Cloud IP Addresses](/manage/security/cloud-endpoints-api) | Tables listing the static IPs and S3 endpoints for each supported cloud and region in ClickHouse Cloud. |

docs/cloud/security/setting-ip-filters.md

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,48 @@ import ip_filter_add_single_ip from '@site/static/images/cloud/security/ip-filte
1111

1212
## Setting IP Filters {#setting-ip-filters}
1313

14-
IP access lists filter traffic to your ClickHouse services by specifying which source addresses are permitted to connect to your ClickHouse service. The lists are configurable for each service. Lists can be configured during the deployment of a service, or afterward. If you do not configure an IP access list during provisioning, or if you want to make changes to your initial list, then you can make those changes by selecting the service and then the **Security** tab.
14+
IP access lists filter traffic to ClickHouse services or API keys by specifying which source addresses are permitted to connect. These lists are configurable for each service and each API key. Lists can be configured during service or API key creation, or afterward.
1515

1616
:::important
17-
If you skip the creation of the IP Access List for a ClickHouse Cloud service then no traffic will be permitted to the service.
17+
If you skip the creation of the IP access list for a ClickHouse Cloud service then no traffic will be permitted to the service.
1818
:::
1919

2020
## Prepare {#prepare}
21-
Before you begin, collect the IP Addresses or ranges that should be added to the access list. Take into consideration remote workers, on-call locations, VPNs, etc. The IP Access List user interface accepts individual addresses and CIDR notation.
22-
23-
Classless Inter-domain Routing (CIDR) notation, allows you to specify IP Address ranges smaller than the traditional Class A, B, or C (8, 6, or 24) subnet mask sizes. [ARIN](https://account.arin.net/public/cidrCalculator) and several other organizations provide CIDR calculators if you need one, and if you would like more information on CIDR notation, please see the [Classless Inter-domain Routing (CIDR)](https://www.rfc-editor.org/rfc/rfc4632.html) RFC.
24-
25-
## Create or modify an IP Access List {#create-or-modify-an-ip-access-list}
26-
27-
From your ClickHouse Cloud services list select the service and then select **Settings**. Under the **Security** section, you will find the IP access list. Click on the hyperlink where the text says: *You can connect to this service from* **(anywhere | x specific locations)**
28-
29-
A sidebar will appear with options for you to configure:
30-
31-
- Allow incoming traffic from anywhere to the service
32-
- Allow access from specific locations to the service
33-
- Deny all access to the service
34-
35-
This screenshot shows an access list which allows traffic from a range of IP Addresses, described as "NY Office range":
36-
21+
Before you begin, collect the IP addresses or ranges that should be added to the access list. Take into consideration remote workers, on-call locations, VPNs, etc. The IP access list user interface accepts individual addresses and CIDR notation.
22+
23+
Classless Inter-domain Routing (CIDR) notation, allows you to specify IP address ranges smaller than the traditional Class A, B, or C (8, 6, or 24) subnet mask sizes. [ARIN](https://account.arin.net/public/cidrCalculator) and several other organizations provide CIDR calculators if you need one, and if you would like more information on CIDR notation, please see the [Classless Inter-domain Routing (CIDR)](https://www.rfc-editor.org/rfc/rfc4632.html) RFC.
24+
25+
## Create or modify an IP access list {#create-or-modify-an-ip-access-list}
26+
27+
<details>
28+
<summary>IP access list for ClickHouse services</summary>
29+
30+
When you create a ClickHouse service, the default setting for the IP allow list is 'Allow from nowhere.'
31+
32+
From your ClickHouse Cloud services list select the service and then select **Settings**. Under the **Security** section, you will find the IP access list. Click on the Add IPs button.
33+
34+
A sidebar will appear with options for you to configure:
35+
36+
- Allow incoming traffic from anywhere to the service
37+
- Allow access from specific locations to the service
38+
- Deny all access to the service
39+
40+
</details>
41+
<details>
42+
<summary>IP access list for API keys</summary>
43+
44+
When you create an API key, the default setting for the IP allow list is 'Allow from anywhere.'
45+
46+
From the API key list, click the three dots next to the API key under the **Actions** column and select **Edit**. At the bottom of the screen you will find the IP access list and options to configure:
47+
48+
- Allow incoming traffic from anywhere to the service
49+
- Allow access from specific locations to the service
50+
- Deny all access to the service
51+
52+
</details>
53+
54+
This screenshot shows an access list which allows traffic from a range of IP addresses, described as "NY Office range":
55+
3756
<Image img={ip_filtering_after_provisioning} size="md" alt="Existing access list in ClickHouse Cloud" border/>
3857

3958
### Possible actions {#possible-actions}
@@ -60,7 +79,7 @@ To apply the changes you made, you must click **Save**.
6079

6180
## Verification {#verification}
6281

63-
Once you create your filter confirm connectivity from within the range, and confirm that connections from outside the permitted range are denied. A simple `curl` command can be used to verify:
82+
Once you create your filter confirm connectivity to a service from within the range, and confirm that connections from outside the permitted range are denied. A simple `curl` command can be used to verify:
6483
```bash title="Attempt rejected from outside the allow list"
6584
curl https://<HOSTNAME>.clickhouse.cloud:8443
6685
```
@@ -81,4 +100,4 @@ Ok.
81100

82101
## Limitations {#limitations}
83102

84-
- Currently, IP Access Lists support only IPv4
103+
- Currently, IP access lists support only IPv4

0 commit comments

Comments
 (0)