Skip to content

Commit 213bb25

Browse files
committed
[DOCS] Adds missing TLS settings for auditing (#30822)
1 parent 88b6c23 commit 213bb25

File tree

4 files changed

+115
-18
lines changed

4 files changed

+115
-18
lines changed
Lines changed: 90 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,99 @@
11
[role="xpack"]
2-
[float]
32
[[forwarding-audit-logfiles]]
4-
==== Forwarding audit logs to a remote cluster
3+
=== Forwarding audit logs to a remote cluster
54

6-
To index audit events to a remote Elasticsearch cluster, you configure
7-
the following `xpack.security.audit.index.client` settings:
5+
When you are auditing security events, you can optionally store the logs in an
6+
{es} index on a remote cluster. The logs are sent to the remote cluster by
7+
using the {javaclient}/transport-client.html[transport client].
88

9-
* `xpack.security.audit.index.client.hosts`
10-
* `xpack.security.audit.index.client.cluster.name`
11-
* `xpack.security.audit.index.client.xpack.security.user`
9+
. Configure auditing such that the logs are stored in {es} rolling indices.
10+
See <<audit-index>>.
11+
12+
. Establish a connection to the remote cluster by configuring the following
13+
`xpack.security.audit.index.client` settings:
14+
+
15+
--
16+
[source, yaml]
17+
--------------------------------------------------
18+
xpack.security.audit.index.client.hosts: 192.168.0.1, 192.168.0.2 <1>
19+
xpack.security.audit.index.client.cluster.name: logging-prod <2>
20+
xpack.security.audit.index.client.xpack.security.user: myuser:mypassword <3>
21+
--------------------------------------------------
22+
<1> A list of hosts in the remote cluster. If you are not using the default
23+
value for the `transport.tcp.port` setting on the remote cluster, you must
24+
specify the appropriate port number (prefixed by a colon) after each host.
25+
<2> The remote cluster name.
26+
<3> A valid user and password, which must have authority to create the
27+
`.security-audit` index on the remote cluster.
1228

1329
For more information about these settings, see
14-
{ref}/auditing-settings.html#remote-audit-settings[Remote Audit Log Indexing Configuration Settings].
30+
{ref}/auditing-settings.html#remote-audit-settings[Remote audit log indexing configuration settings].
31+
32+
--
33+
34+
. If the remote cluster has Transport Layer Security (TLS/SSL) enabled, you
35+
must specify extra security settings:
1536

16-
You can pass additional settings to the remote client by specifying them in the
17-
`xpack.security.audit.index.client` namespace. For example, to allow the remote
18-
client to discover all of the nodes in the remote cluster you can specify the
19-
`client.transport.sniff` setting:
37+
.. {ref}/configuring-tls.html#node-certificates[Generate a node certificate on
38+
the remote cluster], then copy that certificate to the client.
2039

40+
.. Enable TLS and specify the information required to access the node certificate.
41+
42+
*** If the signed certificate is in PKCS#12 format, add the following information
43+
to the `elasticsearch.yml` file:
44+
+
45+
--
2146
[source,yaml]
22-
----------------------------
23-
xpack.security.audit.index.client.transport.sniff: true
24-
----------------------------
47+
-----------------------------------------------------------
48+
xpack.security.audit.index.client.xpack.security.transport.ssl.enabled: true
49+
xpack.security.audit.index.client.xpack.ssl.keystore.path: certs/remote-elastic-certificates.p12
50+
xpack.security.audit.index.client.xpack.ssl.truststore.path: certs/remote-elastic-certificates.p12
51+
-----------------------------------------------------------
52+
53+
For more information about these settings, see
54+
{ref}/security-settings.html#auditing-tls-ssl-settings[Auditing TLS settings].
55+
--
56+
57+
*** If the certificate is in PEM format, add the following information to the
58+
`elasticsearch.yml` file:
59+
+
60+
--
61+
[source, yaml]
62+
--------------------------------------------------
63+
xpack.security.audit.index.client.xpack.security.transport.ssl.enabled: true
64+
xpack.security.audit.index.client.xpack.ssl.key: /home/es/config/audit-client.key
65+
xpack.security.audit.index.client.xpack.ssl.certificate: /home/es/config/audit-client.crt
66+
xpack.security.audit.index.client.xpack.ssl.certificate_authorities: [ "/home/es/config/remote-ca.crt" ]
67+
--------------------------------------------------
68+
69+
For more information about these settings, see
70+
{ref}/security-settings.html#auditing-tls-ssl-settings[Auditing TLS settings].
71+
--
72+
73+
.. If you secured the certificate with a password, add the password to
74+
your {es} keystore:
75+
76+
*** If the signed certificate is in PKCS#12 format, use the following commands:
77+
+
78+
--
79+
[source,shell]
80+
-----------------------------------------------------------
81+
bin/elasticsearch-keystore add xpack.security.audit.index.client.xpack.ssl.keystore.secure_password
82+
83+
bin/elasticsearch-keystore add xpack.security.audit.index.client.xpack.ssl.truststore.secure_password
84+
-----------------------------------------------------------
85+
--
86+
87+
*** If the certificate is in PEM format, use the following commands:
88+
+
89+
--
90+
[source,shell]
91+
-----------------------------------------------------------
92+
bin/elasticsearch-keystore add xpack.security.audit.index.client.xpack.ssl.secure_key_passphrase
93+
-----------------------------------------------------------
94+
--
95+
96+
. Restart {es}.
97+
98+
When these steps are complete, your audit logs are stored in {es} rolling
99+
indices on the remote cluster.

x-pack/docs/en/settings/audit-settings.asciidoc

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,23 @@ Specifies the name of the remote cluster.
130130

131131
`xpack.security.audit.index.client.xpack.security.user`::
132132
Specifies the `username:password` pair that is used to authenticate with the
133-
remote cluster.
133+
remote cluster. This user must have authority to create the `.security-audit`
134+
index on the remote cluster.
135+
136+
If the remote {es} cluster has Transport Layer Security (TLS/SSL) enabled, you
137+
must set the following setting to `true`:
138+
139+
`xpack.security.audit.index.client.xpack.security.transport.ssl.enabled`::
140+
Used to enable or disable TLS/SSL for the transport client that forwards audit
141+
logs to the remote cluster. The default is `false`.
142+
143+
You must also specify the information necessary to access certificates. See
144+
<<auditing-tls-ssl-settings>>.
134145

135146
You can pass additional settings to the remote client by specifying them in the
136-
`xpack.security.audit.index.client` namespace. For example, to allow the remote
147+
`xpack.security.audit.index.client` namespace. For example, you can add
148+
<<modules-transport,transport settings>> and
149+
<<tcp-settings,advanced TCP settings>> in that namespace. To allow the remote
137150
client to discover all of the nodes in the remote cluster you can specify the
138151
`client.transport.sniff` setting:
139152

x-pack/docs/en/settings/security-settings.asciidoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,16 @@ transport profile, use the prefix `transport.profiles.$PROFILE.xpack.security.`
12641264
append the portion of the setting after `xpack.security.transport.`. For the key
12651265
setting, this would be `transport.profiles.$PROFILE.xpack.security.ssl.key`.
12661266

1267+
[[auditing-tls-ssl-settings]]
1268+
:ssl-prefix: xpack.security.audit.index.client.xpack
1269+
:component: Auditing
1270+
:client-auth-default!:
1271+
:server!:
1272+
1273+
include::ssl-settings.asciidoc[]
1274+
1275+
See also <<remote-audit-settings>>.
1276+
12671277
[float]
12681278
[[ip-filtering-settings]]
12691279
==== IP filtering settings

x-pack/docs/en/settings/ssl-settings.asciidoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ Java Cryptography Architecture documentation]. Defaults to the value of
4646

4747
The following settings are used to specify a private key, certificate, and the
4848
trusted certificates that should be used when communicating over an SSL/TLS connection.
49-
If none of the settings below are specified, the {ref}/security-settings.html#ssl-tls-settings[Default TLS/SSL Settings] are used.
5049
ifdef::server[]
5150
A private key and certificate must be configured.
5251
endif::server[]

0 commit comments

Comments
 (0)