Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Commit 9115acd

Browse files
committed
Added configuration for Beats
1 parent dc88e4c commit 9115acd

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

docs/security/configuration/client-auth.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ You can now assign your certificate's common name (CN) to a role. For this step,
4545

4646
After deciding which role you want to map your certificate's CN to, you can use [Kibana](../../access-control/users-roles#map-users-to-roles), [`roles_mapping.yml`](../yaml/#roles_mappingyml), or the [REST API](../../access-control/api/#create-role-mapping) to map your certificate's CN to the role. The following example uses the `REST API` to map the common name `CLIENT1` to the role `readall`.
4747

48-
#### Sample request
48+
**Sample request**
4949

5050
```json
5151
PUT _opendistro/_security/api/rolesmapping/readall
@@ -56,7 +56,7 @@ PUT _opendistro/_security/api/rolesmapping/readall
5656
}
5757
```
5858

59-
#### Sample response
59+
**Sample response**
6060

6161
```json
6262
{
@@ -85,3 +85,22 @@ url = base_url + path
8585
response = requests.get(url, cert = (cert_file_path, key_file_path), verify=False)
8686
print(response.text)
8787
```
88+
89+
## Configuring Beats
90+
91+
You can also configure your Beats so that it uses a client certificate for authentication with Elasticsearch. Afterwards, it can start sending output to Elasticsearch.
92+
93+
This output configuration specifies which settings you need for client certificate authentication:
94+
95+
```yml
96+
output.elasticsearch:
97+
enabled: true
98+
# Array of hosts to connect to.
99+
hosts: ["localhost:9200"]
100+
# Protocol - either `http` (default) or `https`.
101+
protocol: "https"
102+
ssl.certificate_authorities: ["/full/path/to/CA.pem"]
103+
ssl.verification_mode: certificate
104+
ssl.certificate: "/full/path/to/client-cert.pem"
105+
ssl.key: "/full/path/to/to/client-cert-key.pem"
106+
```

0 commit comments

Comments
 (0)