Skip to content

[DRAFT] network security #1690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion deploy-manage/_snippets/ecloud-security.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{ecloud}} has built-in security. For example, HTTPS communications between {{ecloud}} and the internet, as well as inter-node communications, are secured automatically, and cluster data is encrypted at rest.

In both {{ech}} amd {{serverless-full}}, you can also configure [IP filtering network security policies](?) to prevent unauthorized access to your deployments and projects.

Check failure on line 3 in deploy-manage/_snippets/ecloud-security.md

View workflow job for this annotation

GitHub Actions / preview / build

`?` does not exist. resolved to `/github/workspace/deploy-manage/_snippets/?

Check failure on line 3 in deploy-manage/_snippets/ecloud-security.md

View workflow job for this annotation

GitHub Actions / preview / build

`?` does not exist. resolved to `/github/workspace/deploy-manage/_snippets/?

In {{ech}}, you can augment these security features in the following ways:
* Configure [traffic filtering](/deploy-manage/security/traffic-filtering.md) to prevent unauthorized access to your deployments.
* [Configure private connections and apply VCPE filtering](/deploy-manage/security/traffic-filtering.md) to prevent unauthorized access to your deployments.
* Encrypt your deployment with a [customer-managed encryption key](/deploy-manage/security/encrypt-deployment-with-customer-managed-encryption-key.md).
* [Secure your settings](/deploy-manage/security/secure-settings.md) using {{es}} and {{kib}} keystores.
* Use the list of [{{ecloud}} static IPs](/deploy-manage/security/elastic-cloud-static-ips.md) to allow or restrict communications in your infrastructure.
Expand Down
1 change: 1 addition & 0 deletions deploy-manage/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ products:
- id: cloud-kubernetes
- id: cloud-enterprise
- id: cloud-hosted
- id: cloud-serverless
---

# Security
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
* **The transport layer**: Used mainly for inter-node communications, and in certain cases for cluster to cluster communication.
* In self-managed {{es}} clusters, you can also [Configure {{kib}} and {{es}} to use mutual TLS](/deploy-manage/security/kibana-es-mutual-tls.md).
* [Enable cipher suites for stronger encryption](/deploy-manage/security/enabling-cipher-suites-for-stronger-encryption.md): The TLS and SSL protocols use a cipher suite that determines the strength of encryption used to protect the data. You may want to enable the use of additional cipher suites, so you can use different cipher suites for your TLS communications or communications with authentication providers.
* [Restrict connections using traffic filtering](/deploy-manage/security/traffic-filtering.md): Traffic filtering allows you to limit how your deployments can be accessed. Add another layer of security to your installation and deployments by restricting inbound traffic to only the sources that you trust. Restrict access based on IP addresses or CIDR ranges, or, in {{ech}} deployments, secure connectivity through AWS PrivateLink, Azure Private Link, or GCP Private Service Connect.
* [Secure your network using IP filtering and private connections](/deploy-manage/security/traffic-filtering.md): Network security allows you to limit how your deployments can be accessed. Add another layer of security to your installation and deployments by restricting inbound traffic to only the sources that you trust. Restrict access based on IP addresses or CIDR ranges, or, in {{ech}} deployments, secure connectivity through AWS PrivateLink, Azure Private Link, or GCP Private Service Connect.
* [Allow or deny {{ech}} IP ranges](/deploy-manage/security/elastic-cloud-static-ips.md): {{ecloud}} publishes a list of IP addresses used by its {{ech}} services for both incoming and outgoing traffic. Users can use these lists to configure their network firewalls as needed to allow or restrict traffic related to {{ech}} services.
20 changes: 10 additions & 10 deletions deploy-manage/security/_snippets/cluster-comparison.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Select your deployment type below to see what's available and how implementation
|------------------|------------|--------------|-------------|
| **Communication** | TLS (HTTP layer) | Fully managed | Automatically configured by Elastic |
| | TLS (Transport layer) | Fully managed | Automatically configured by Elastic |
| **Network** | IP traffic filtering | Configurable | [Configure IP-based access restrictions](/deploy-manage/security/ip-filtering-cloud.md) |
| | Private link | Configurable | [Establish a secure VPC connection](/deploy-manage/security/private-link-traffic-filters.md) |
| **Network** | IP filtering | Configurable | [Configure IP-based access restrictions](/deploy-manage/security/ip-filtering-cloud.md) |
| | Private connections and VPC filtering | Configurable | [Establish a secure VPC connection](/deploy-manage/security/private-link-traffic-filters.md) |
| | Kubernetes network policies | N/A | |
| **Data** | Encryption at rest | Managed | You can [bring your own encryption key](/deploy-manage/security/encrypt-deployment-with-customer-managed-encryption-key.md) |
| | Secure settings | Configurable | [Configure secure settings](/deploy-manage/security/secure-settings.md) |
Expand All @@ -36,8 +36,8 @@ Select your deployment type below to see what's available and how implementation
|------------------|------------|--------------|-------------|
| **Communication** | TLS (HTTP layer) | Fully managed | Automatically configured by Elastic |
| | TLS (Transport layer) | Fully managed | Automatically configured by Elastic |
| **Network** | IP traffic filtering | N/A | |
| | Private link | N/A | |
| **Network** | IP filtering | Configurable | [Configure IP-based access restrictions](/deploy-manage/security/ip-filtering-cloud.md) |
| | Private connections and VPC filtering | N/A | |
| | Kubernetes network policies | N/A | |
| **Data** | Encryption at rest | Fully managed | Automatically encrypted by Elastic |
| | Secure settings | N/A | |
Expand All @@ -53,8 +53,8 @@ Select your deployment type below to see what's available and how implementation
|------------------|------------|--------------|-------------|
| **Communication** | TLS (HTTP layer) | Managed | You can [configure custom certificates](/deploy-manage/security/secure-your-elastic-cloud-enterprise-installation/manage-security-certificates.md) |
| | TLS (Transport layer) | Fully managed | Automatically configured by Elastic |
| **Network** | IP traffic filtering | Configurable | [Configure IP-based access restrictions](/deploy-manage/security/ip-filtering-cloud.md) |
| | Private link | N/A | |
| **Network** | IP filtering | Configurable | [Configure IP-based access restrictions](/deploy-manage/security/ip-filtering-cloud.md) |
| | Private connections and VPC filtering | N/A | |
| | Kubernetes network policies | N/A | |
| **Data** | Encryption at rest | N/A | |
| | Secure settings | Configurable | [Configure secure settings](/deploy-manage/security/secure-settings.md) |
Expand All @@ -70,8 +70,8 @@ Select your deployment type below to see what's available and how implementation
|------------------|------------|--------------|-------------|
| **Communication** | TLS (HTTP layer) | Managed | [Multiple options](/deploy-manage/security/k8s-https-settings.md) for customization |
| | TLS (Transport layer) | Managed | [Multiple options](/deploy-manage/security/k8s-transport-settings.md) for customization |
| **Network** | IP traffic filtering | Configurable | [Configure IP-based access restrictions](/deploy-manage/security/ip-filtering-basic.md) |
| | Private link | N/A | |
| **Network** | IP filtering | Configurable | [Configure IP-based access restrictions](/deploy-manage/security/ip-filtering-basic.md) |
| | Private connections and VPC filtering | N/A | |
| | Kubernetes network policies | Configurable | [Apply network policies to your Pods](/deploy-manage/security/k8s-network-policies.md) |
| **Data** | Encryption at rest | N/A | |
| | Secure settings | Configurable | [Configure secure settings](/deploy-manage/security/k8s-secure-settings.md) |
Expand All @@ -88,8 +88,8 @@ Select your deployment type below to see what's available and how implementation
|------------------|------------|--------------|-------------|
| **Communication** | TLS (HTTP layer) | Configurable | Can be automatically or manually configured. See [Initial security setup](/deploy-manage/security/self-setup.md) |
| | TLS (Transport layer) | Configurable | Can be automatically or manually configured. See [Initial security setup](/deploy-manage/security/self-setup.md) |
| **Network** | IP traffic filtering | Configurable | [Configure IP-based access restrictions](/deploy-manage/security/ip-filtering-basic.md) |
| | Private link | N/A | |
| **Network** | IP filtering | Configurable | [Configure IP-based access restrictions](/deploy-manage/security/ip-filtering-basic.md) |
| | Private connections and VPC filtering | N/A | |
| | Kubernetes network policies | N/A | |
| **Data** | Encryption at rest | N/A | |
| | Keystore security | Configurable | [Configure secure settings](/deploy-manage/security/secure-settings.md) |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:::{tip}
Elastic recommends that you use Kubernetes network policies over IP traffic filters for {{eck}}. This is because, in containerized environments like Kubernetes, IP addresses are usually dynamic, making network policies a more robust option.
Elastic recommends that you use Kubernetes network policies over IP filters for {{eck}}. This is because, in containerized environments like Kubernetes, IP addresses are usually dynamic, making network policies a more robust option.
:::
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ applies_to:
products:
- id: cloud-hosted
- id: cloud-enterprise
navigation_title: Through the API
---

# Manage traffic filters through the API [ec-traffic-filtering-through-the-api]
# Manage network security through the API [ec-traffic-filtering-through-the-api]

This example demonstrates how to use the {{ecloud}} RESTful API or {{ece}} RESTful API or to manage different types of traffic filters. We cover the following examples:
This example demonstrates how to use the {{ecloud}} RESTful API or {{ece}} RESTful API or to manage different types of network security rules and policies. We cover the following examples:

* [Create a traffic filter rule set](ec-traffic-filtering-through-the-api.md#ec-create-a-traffic-filter-rule-set)

Expand Down
86 changes: 86 additions & 0 deletions deploy-manage/security/ece-filter-rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
navigation_title: How rules work in ECE
applies_to:
deployment:
ess: ga
serverless: ga
---

# Traffic filter rules in {{ece}}

% could be refined further

By default, in {{ece}} and {{ech}}, all your deployments are accessible over the public internet. In {{ece}}, this assumes that your orchestrator's proxies are accessible.

Filtering *rules* are grouped into *rule sets*, which in turn are *associated* with one or more deployments to take effect. After you associate at least one traffic filter with a deployment, traffic that does not match any filtering rules for the deployment is denied.

Traffic filters apply to external traffic only. Internal traffic is managed by ECE or ECH. For example, {{kib}} can connect to {{es}}, as well as internal services which manage the deployment. Other deployments can’t connect to deployments protected by traffic filters.

Traffic filters operate on the proxy. Requests rejected by the traffic filters are not forwarded to the deployment. The proxy responds to the client with `403 Forbidden`.

Domain-based filtering rules are not allowed for Cloud traffic filtering, because the original IP is hidden behind the proxy. Only IP-based filtering rules are allowed.

Rule sets work as follows:

- You can assign multiple rule sets to a single deployment. The rule sets can be of different types. In case of multiple rule sets, traffic can match ANY of them. If none of the rule sets match, the request is rejected with `403 Forbidden`.
- Traffic filter rule sets are bound to a single region. The rule sets can be assigned only to deployments in the same region. If you want to associate a rule set with deployments in multiple regions, then you have to create the same rule set in all the regions you want to apply it to.
- You can mark a rule set as *default*. It is automatically attached to all new deployments that you create in its region. You can detach default rule sets from deployments after they are created. Note that a *default* rule set is not automatically attached to existing deployments.
- Traffic filter rule sets, when associated with a deployment, will apply to all deployment endpoints, such as {{es}}, {{kib}}, APM Server, and others.
- Any traffic filter rule set assigned to a deployment overrides the default behavior of *allow all access over the public internet endpoint; deny all access over Private Link*. The implication is that if you make a mistake putting in the traffic source (for example, specified the wrong IP address) the deployment will be effectively locked down to any of your traffic. You can use the UI to adjust or remove the rule sets.

:::{admonition} Rule limits
In {{ech}}, you can have a maximum of 1024 rule sets per organization and 128 rules in each rule set.

In {{ece}}, you can have a maximum of 512 rule sets per organization and 128 rules in each rule set.
:::

### Tips

This section offers suggestions on how to manage and analyze the impact of your traffic filters in ECH and ECE.

#### Review the rule sets associated with a deployment

1. Log in to the [{{ecloud}} Console](https://cloud.elastic.co?page=docs&placement=docs-body) or [Cloud UI](/deploy-manage/deploy/cloud-enterprise/log-into-cloud-ui.md).
2. On the **Deployments** page, select your deployment.
3. Select the **Security** tab on the left-hand side menu bar.

Traffic filter rule sets are listed under **Traffic filters**.

On this page, you can view and remove existing filters and attach new filters.

#### Identify default rule sets
To identify which rule sets are automatically applied to new deployments in your account:

1. Navigate to the traffic filters list:

::::{tab-set}
:group: ech-ece

:::{tab-item} {{ech}}
:sync: ech
1. Log in to the [{{ecloud}} Console](https://cloud.elastic.co?page=docs&placement=docs-body).
2. Find your deployment on the home page or on the **Hosted deployments** page, then select **Manage** to access its settings menus.
3. Under the **Features** tab, open the **Traffic filters** page.
:::
:::{tab-item} {{ece}}
:sync: ece
4. [Log into the Cloud UI](/deploy-manage/deploy/cloud-enterprise/log-into-cloud-ui.md).
5. From the **Platform** menu, select **Security**.
:::
::::

2. Select each of the rule sets — **Include by default** is checked when this rule set is automatically applied to all new deployments in its region.

#### View rejected requests

Requests rejected by traffic filter have status code `403 Forbidden` and one of the following in the response body:

```json
{"ok":false,"message":"Forbidden"}
```

```json
{"ok":false,"message":"Forbidden due to traffic filtering. Please see the Elastic documentation on Traffic Filtering for more information."}
```

Additionally, traffic filter rejections are logged in ECE proxy logs as `status_reason: BLOCKED_BY_IP_FILTER`. Proxy logs also provide client IP in `client_ip` field.
11 changes: 7 additions & 4 deletions deploy-manage/security/ip-filtering-cloud.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
navigation_title: In ECH or ECE
navigation_title: In ECH or Serverless
mapped_pages:
- https://www.elastic.co/guide/en/cloud-enterprise/current/ece-traffic-filtering-ip.html
- https://www.elastic.co/guide/en/cloud/current/ec-traffic-filtering-ip.html
Expand All @@ -8,12 +8,13 @@
deployment:
ess: ga
ece: ga
serverless: ga
products:
- id: cloud-enterprise
- id: cloud-hosted
- id: cloud-serverless
---

# Manage IP traffic filters in ECH or ECE
# Manage IP traffic filters in ECH or Serverless

Traffic filtering, by IP address or CIDR block, is one of the security layers available in {{ece}} and {{ech}}. It allows you to limit how your deployments can be accessed.

Expand All @@ -24,12 +25,14 @@

Follow the step described here to set up ingress or inbound IP filters through the {{ecloud}} Console or Cloud UI.

To learn how traffic filter rules work together, refer to [traffic filter rules](/deploy-manage/security/traffic-filtering.md#traffic-filter-rules).

Check failure on line 28 in deploy-manage/security/ip-filtering-cloud.md

View workflow job for this annotation

GitHub Actions / preview / build

`traffic-filter-rules` does not exist in deploy-manage/security/traffic-filtering.md.

To learn how to manage IP traffic filters using the Traffic Filtering API, refer to [](/deploy-manage/security/ec-traffic-filtering-through-the-api.md).

:::{note}
To learn how to create IP traffic filters for self-managed clusters or {{eck}} deployments, refer to [](ip-filtering-basic.md).
To learn how to create IP filters for {{ece}} deployments, refer to [](ip-filtering-ece.md).

To learn how to create IP filters for self-managed clusters or {{eck}} deployments, refer to [](ip-filtering-basic.md).
:::

## Prerequisites
Expand Down
Loading
Loading