Skip to content

Commit 6565df7

Browse files
florent-leborgnethekofimensah
authored andcommitted
[D&M] Security basic structure (#706)
WIP ^^
1 parent 03428ae commit 6565df7

17 files changed

+270
-115
lines changed

deploy-manage/security.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,3 @@ Ensure secure communication between your applications and Elastic:
174174

175175
- **Client security**: Best practices for securely connecting applications to {es}
176176
- **Integration security**: Secure configuration for Beats, Logstash, and other integrations
177-
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Secure your data
2+
3+
:::{warning}
4+
**This page is a work in progress.**
5+
:::

deploy-manage/security/fips-140-2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ mapped_urls:
44
- https://www.elastic.co/guide/en/kibana/current/xpack-security-fips-140-2.html
55
---
66

7-
# FIPS 140-2
7+
# FIPS 140-2 compliance
88

99
% What needs to be done: Refine
1010

raw-migrated-files/stack-docs/elastic-stack/install-stack-demo-secure.md renamed to deploy-manage/security/install-stack-demo-secure.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
# Tutorial 2: Securing a self-managed {{stack}} [install-stack-demo-secure]
22

3-
This tutorial is a follow-on to [Tutorial 1: Installing a self-managed {{stack}}](../../../deploy-manage/deploy/self-managed/installing-elasticsearch.md). The first tutorial describes how to configure a multi-node {{es}} cluster and then set up {{kib}}, followed by {{fleet-server}} and {{agent}}. In a production environment, it’s recommended after completing the {{kib}} setup to proceed directly to this tutorial to configure your SSL certificates. These steps guide you through that process, and then describe how to configure {{fleet-server}} and {{agent}} with the certificates in place.
3+
This tutorial is a follow-on to [Tutorial 1: Installing a self-managed {{stack}}](/deploy-manage/deploy/self-managed.md). The first tutorial describes how to configure a multi-node {{es}} cluster and then set up {{kib}}, followed by {{fleet-server}} and {{agent}}. In a production environment, it’s recommended after completing the {{kib}} setup to proceed directly to this tutorial to configure your SSL certificates. These steps guide you through that process, and then describe how to configure {{fleet-server}} and {{agent}} with the certificates in place.
44

55
**Securing the {{stack}}**
66

77
Beginning with Elastic 8.0, security is enabled in the {{stack}} by default, meaning that traffic between {{es}} nodes and between {{kib}} and {{es}} is SSL-encrypted. While this is suitable for testing non-production viability of the Elastic platform, most production networks have requirements for the use of trusted CA-signed certificates. These steps demonstrate how to update the out-of-the-box self-signed certificates with your own trusted CA-signed certificates.
88

99
For traffic to be encrypted between {{es}} cluster nodes and between {{kib}} and {{es}}, SSL certificates must be created for the transport ({{es}} inter-node communication) and HTTP (for the {{es}} REST API) layers. Similarly, when setting up {{fleet-server}} you’ll generate and configure a new certificate bundle, and then {{elastic-agent}} uses the generated certificates to communicate with both {{fleet-server}} and {{es}}. The process to set things up is as follows:
1010

11-
* [Prerequisites and assumptions](../../../deploy-manage/security/secure-your-cluster-deployment.md#install-stack-demo-secure-prereqs)
12-
* [Step 1: Generate a new self-signed CA certificate](../../../deploy-manage/security/secure-your-cluster-deployment.md#install-stack-demo-secure-ca)
13-
* [Step 2: Generate a new certificate for the transport layer](../../../deploy-manage/security/secure-your-cluster-deployment.md#install-stack-demo-secure-transport)
14-
* [Step 3: Generate new certificate(s) for the HTTP layer](../../../deploy-manage/security/secure-your-cluster-deployment.md#install-stack-demo-secure-http)
15-
* [Step 4: Configure security on additional {{es}} nodes](../../../deploy-manage/security/secure-your-cluster-deployment.md#install-stack-demo-secure-second-node)
16-
* [Step 5: Generate server-side and client-side certificates for {{kib}}](../../../deploy-manage/security/secure-your-cluster-deployment.md#install-stack-demo-secure-kib-es)
17-
* [Step 6: Install {{fleet}} with SSL certificates configured](../../../deploy-manage/security/secure-your-cluster-deployment.md#install-stack-demo-secure-fleet)
18-
* [Step 7: Install {{agent}}](../../../deploy-manage/security/secure-your-cluster-deployment.md#install-stack-demo-secure-agent)
19-
* [Step 8: View your system data](../../../deploy-manage/security/secure-your-cluster-deployment.md#install-stack-demo-secure-view-data)
11+
* [Prerequisites and assumptions](secure-your-cluster-deployment.md#install-stack-demo-secure-prereqs)
12+
* [Step 1: Generate a new self-signed CA certificate](secure-your-cluster-deployment.md#install-stack-demo-secure-ca)
13+
* [Step 2: Generate a new certificate for the transport layer](secure-your-cluster-deployment.md#install-stack-demo-secure-transport)
14+
* [Step 3: Generate new certificate(s) for the HTTP layer](secure-your-cluster-deployment.md#install-stack-demo-secure-http)
15+
* [Step 4: Configure security on additional {{es}} nodes](secure-your-cluster-deployment.md#install-stack-demo-secure-second-node)
16+
* [Step 5: Generate server-side and client-side certificates for {{kib}}](secure-your-cluster-deployment.md#install-stack-demo-secure-kib-es)
17+
* [Step 6: Install {{fleet}} with SSL certificates configured](secure-your-cluster-deployment.md#install-stack-demo-secure-fleet)
18+
* [Step 7: Install {{agent}}](secure-your-cluster-deployment.md#install-stack-demo-secure-agent)
19+
* [Step 8: View your system data](secure-your-cluster-deployment.md#install-stack-demo-secure-view-data)
2020

2121
It should take between one and two hours to complete these steps.
2222

2323

2424
## Prerequisites and assumptions [install-stack-demo-secure-prereqs]
2525

26-
Before starting, you’ll need to have set up an on-premises {{es}} cluster with {{kib}}, following the steps in [Tutorial 1: Installing a self-managed {{stack}}](../../../deploy-manage/deploy/self-managed/installing-elasticsearch.md).
26+
Before starting, you’ll need to have set up an on-premises {{es}} cluster with {{kib}}, following the steps in [Tutorial 1: Installing a self-managed {{stack}}](/deploy-manage/deploy/self-managed.md).
2727

2828
The examples in this guide use RPM packages to install the {{stack}} components on hosts running Red Hat Enterprise Linux 8. The steps for other install methods and operating systems are similar, and can be found in the documentation linked from each section.
2929

@@ -40,7 +40,7 @@ In a production environment you would typically use the CA certificate from your
4040
sudo systemctl stop elasticsearch.service
4141
```
4242

43-
2. Generate a CA certificate using the provided certificate utility, `elasticsearch-certutil`. Note that the location of the utility depends on the installation method you used to install {{es}}. Refer to [elasticsearch-certutil](elasticsearch://reference/elasticsearch/command-line-tools/certutil.md) for the command details and to [Update security certificates with a different CA](../../../deploy-manage/security/different-ca.md) for details about the procedure as a whole.
43+
2. Generate a CA certificate using the provided certificate utility, `elasticsearch-certutil`. Note that the location of the utility depends on the installation method you used to install {{es}}. Refer to [elasticsearch-certutil](elasticsearch://reference/elasticsearch/command-line-tools/certutil.md) for the command details and to [Update security certificates with a different CA](different-ca.md) for details about the procedure as a whole.
4444

4545
Run the following command. When prompted, specify a unique name for the output file, such as `elastic-stack-ca.zip`:
4646

@@ -77,7 +77,7 @@ In a production environment you would typically use the CA certificate from your
7777
6. From the `/etc/elasticsearch/certs/ca/` directory, import the newly created CA certificate into the {{es}} truststore. This step ensures that your cluster trusts the new CA certificate.
7878

7979
::::{note}
80-
On a new installation a new keystore and truststore are created automatically. If you’re running these steps on an existing {{es}} installation and you know the password to the keystore and the truststore, follow the instructions in [Update security certificates with a different CA](../../../deploy-manage/security/different-ca.md) to import the CA certificate.
80+
On a new installation a new keystore and truststore are created automatically. If you’re running these steps on an existing {{es}} installation and you know the password to the keystore and the truststore, follow the instructions in [Update security certificates with a different CA](different-ca.md) to import the CA certificate.
8181
::::
8282

8383

@@ -131,7 +131,7 @@ This guide assumes the use of self-signed certificates, but the process to impor
131131
::::{important}
132132
If you’re running these steps on a production cluster that already contains data:
133133

134-
* In a cluster with multiple {{es}} nodes, before proceeding you first need to perform a [Rolling restart](../../../deploy-manage/maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md#restart-cluster-rolling) beginning with the node where you’re updating the keystore. Stop at the `Perform any needed changes` step, and then proceed to the next step in this guide.
134+
* In a cluster with multiple {{es}} nodes, before proceeding you first need to perform a [Rolling restart](../maintenance/start-stop-services/full-cluster-restart-rolling-restart-procedures.md#restart-cluster-rolling) beginning with the node where you’re updating the keystore. Stop at the `Perform any needed changes` step, and then proceed to the next step in this guide.
135135
* In a single node cluster, always stop {{es}} before proceeding.
136136

137137
::::
@@ -227,7 +227,7 @@ Now that communication between {{es}} nodes (the transport layer) has been secur
227227
```
228228

229229
2. When prompted, confirm that the settings are correct.
230-
3. Add the network IP address that clients can use to connect to the first {{es}} node. This is the same value that’s described in Step 2 of [Tutorial 1: Installing a self-managed {{stack}}](../../../deploy-manage/deploy/self-managed/installing-elasticsearch.md), for example `10.128.0.84`:
230+
3. Add the network IP address that clients can use to connect to the first {{es}} node. This is the same value that’s described in Step 2 of [Tutorial 1: Installing a self-managed {{stack}}](/deploy-manage/deploy/self-managed.md), for example `10.128.0.84`:
231231

232232
```shell
233233
10.128.0.84
@@ -506,7 +506,7 @@ Now that the security is configured for the first {{es}} node, some steps need t
506506

507507
## Step 5: Generate server-side and client-side certificates for {{kib}} [install-stack-demo-secure-kib-es]
508508

509-
Now that the transport and HTTP layers are configured with encryption using the new certificates, there are two more tasks that must be accomplished for end-to-end connectivity to {{es}}: Set up certificates for encryption between {{kib}} and {{es}}, and between the client browser and {{kib}}. For additional details about any of these steps, refer to [Mutual TLS authentication between {{kib}} and {{es}}](../../../deploy-manage/security/secure-cluster-communications.md) and [Encrypt traffic between your browser and {{kib}}](../../../deploy-manage/security/set-up-basic-security-plus-https.md#encrypt-kibana-browser).
509+
Now that the transport and HTTP layers are configured with encryption using the new certificates, there are two more tasks that must be accomplished for end-to-end connectivity to {{es}}: Set up certificates for encryption between {{kib}} and {{es}}, and between the client browser and {{kib}}. For additional details about any of these steps, refer to [Mutual TLS authentication between {{kib}} and {{es}}](secure-cluster-communications.md) and [Encrypt traffic between your browser and {{kib}}](set-up-basic-security-plus-https.md#encrypt-kibana-browser).
510510

511511
1. In Step 3, when you generated a new certificate for the HTTP layer, the process created an archive `elasticsearch-ssl-http.zip`.
512512

@@ -617,7 +617,7 @@ Now that the transport and HTTP layers are configured with encryption using the
617617

618618
Open a web browser to the external IP address of the Kibana host machine: `https://<kibana-host-address>:5601`. Note that the URL should use the `https` and not the `http` protocol.
619619

620-
15. Log in using the `elastic` user and password that you configured in Step 1 of [Tutorial 1: Installing a self-managed {{stack}}](../../../deploy-manage/deploy/self-managed/installing-elasticsearch.md).
620+
15. Log in using the `elastic` user and password that you configured in Step 1 of [Tutorial 1: Installing a self-managed {{stack}}](/deploy-manage/deploy/self-managed.md).
621621

622622
Congratulations! You’ve successfully updated the SSL certificates between {{es}} and {{kib}}.
623623

@@ -874,7 +874,7 @@ View your system metrics data:
874874
2. In the query field, search for `Metrics System`.
875875
3. Select the `[Metrics System] Host overview` link. The {{kib}} Dashboard opens with visualizations of host metrics including CPU usage, memory usage, running processes, and more.
876876
877-
:::{image} ../../../images/elastic-stack-install-stack-metrics-dashboard.png
877+
:::{image} /images/elastic-stack-install-stack-metrics-dashboard.png
878878
:alt: The System metrics host overview showing CPU usage, memory usage, and other visualizations
879879
:::
880880
@@ -884,6 +884,6 @@ Congratulations! You’ve successfully configured security for {{es}}, {{kib}},
884884
885885
## What’s next? [_whats_next]
886886
887-
* Do you have data ready to ingest into your newly set up {{stack}}? Learn how to [add data to Elasticsearch](../../../manage-data/ingest.md).
887+
* Do you have data ready to ingest into your newly set up {{stack}}? Learn how to [add data to Elasticsearch](../../manage-data/ingest.md).
888888
* Use [Elastic {{observability}}](https://www.elastic.co/observability) to unify your logs, infrastructure metrics, uptime, and application performance data.
889889
* Want to protect your endpoints from security threats? Try [{{elastic-sec}}](https://www.elastic.co/security). Adding endpoint protection is just another integration that you add to the agent policy!

deploy-manage/security/manually-configure-security-in-self-managed-cluster.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
---
2+
navigation_title: Self-managed
3+
applies_to:
4+
deployment:
5+
self: ga
26
mapped_pages:
37
- https://www.elastic.co/guide/en/elasticsearch/reference/current/manually-configure-security.html
48
---
@@ -15,8 +19,13 @@ If you configure security manually *before* starting your {{es}} nodes, the auto
1519
:alt: Elastic Security layers
1620
:::
1721

22+
## Common security scenarios
1823

19-
## Minimal security ({{es}} Development) [security-minimal-overview]
24+
Even with security enabled, never expose {{es}} to public internet traffic. Using an application to sanitize requests to {{es}} still poses risks, such as a malicious user writing [`_search`](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-search) requests that could overwhelm an {{es}} cluster and bring it down. Keep {{es}} as isolated as possible, preferably behind a firewall and a VPN. Any internet-facing applications should run pre-canned aggregations, or not run aggregations at all.
25+
26+
While you absolutely shouldn’t expose {{es}} directly to the internet, you also shouldn’t expose {{es}} directly to users. Instead, use an intermediary application to make requests on behalf of users. This implementation allows you to track user behaviors, such as can submit requests, and to which specific nodes in the cluster. For example, you can implement an application that accepts a search term from a user and funnels it through a [`simple_query_string`](elasticsearch://reference/query-languages/query-dsl-simple-query-string-query.md) query.
27+
28+
### Minimal security ({{es}} Development) [security-minimal-overview]
2029

2130
If you’ve been working with {{es}} and want to enable security on your existing, unsecured cluster, start here. You’ll set passwords for the built-in users to prevent unauthorized access to your local cluster, and also configure password authentication for {{kib}}.
2231

@@ -28,7 +37,7 @@ The minimal security scenario is not sufficient for [production mode](../deploy/
2837
[Set up minimal security](set-up-minimal-security.md)
2938

3039

31-
## Basic security ({{es}} + {{kib}}) [security-basic-overview]
40+
### Basic security ({{es}} + {{kib}}) [security-basic-overview]
3241

3342
This scenario configures TLS for communication between nodes. This security layer requires that nodes verify security certificates, which prevents unauthorized nodes from joining your {{es}} cluster.
3443

@@ -37,7 +46,7 @@ Your external HTTP traffic between {{es}} and {{kib}} won’t be encrypted, but
3746
[Set up basic security](secure-cluster-communications.md)
3847

3948

40-
## Basic security plus secured HTTPS traffic ({{stack}}) [security-basic-https-overview]
49+
### Basic security plus secured HTTPS traffic ({{stack}}) [security-basic-https-overview]
4150

4251
This scenario builds on the one for basic security and secures all HTTP traffic with TLS. In addition to configuring TLS on the transport interface of your {{es}} cluster, you configure TLS on the HTTP interface for both {{es}} and {{kib}}.
4352

@@ -50,6 +59,24 @@ You then configure {{kib}} and Beats to communicate with {{es}} using TLS so tha
5059

5160
[Set up basic security plus HTTPS traffic](secure-http-communications.md)
5261

62+
## Considerations
63+
64+
### TLS certificate management
65+
66+
TLS certificates apply security controls to network communications. They encrypt data in transit, verify the identity of connecting parties, and help prevent man-in-the-middle attacks.
67+
68+
On **self-managed** installations, you manage certificates for both HTTP and transport layers.
69+
70+
### Network security
71+
72+
Control which systems can access your Elastic deployment through traffic filtering and network controls:
73+
74+
- **IP traffic filtering**: Restrict access based on IP addresses or CIDR ranges.
75+
76+
## Next step: secure your deployments and clusters
77+
78+
This section covered security principles and options at the environment level. You can take further measures individually for each deployment or cluster that you're running on this environment. Refer to [](secure-your-cluster-deployment.md).
79+
5380

5481

5582

deploy-manage/security/secure-clients-integrations.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ mapped_pages:
55

66
# Secure clients and integrations [security-clients-integrations]
77

8+
:::{warning}
9+
**This page is a work in progress.**
10+
:::
11+
12+
813
You will need to update the configuration for several [clients](httprest-clients-security.md) to work with a secured {{es}} cluster.
914

1015
The {{es}} {{security-features}} enable you to secure your {{es}} cluster. But {{es}} itself is only one product within the {{stack}}. It is often the case that other products in the {{stack}} are connected to the cluster and therefore need to be secured as well, or at least communicate with the cluster in a secured way:

0 commit comments

Comments
 (0)