Set Up TLS To Encrypt Communications in the Elastic Stack
To secure the communication between nodes in a cluster, you encrypt it using Transport Layer Security (TLS). This basic security setup helps prevent unauthorized nodes from accessing your cluster.
In a secured cluster, the Elastic search nodes must use a certificate signed by certificate authority (CA) to identify themselves before initiating a communication with other nodes. The cluster must validate the authenticity of these certificates. A certificate authority (CA) is a trusted entity that issues digital certificates. These certificates are data files used to cryptographically link an entity with a public key.
Certificates are not bundled with the Events Service. You can use use your own CA to enable security on an existing, unsecured cluster, or manually configure TLS on the transport interface. You can also secure the HTTP traffic using TLS.
Events Service version 23.4.0 supports the following software versions and variables:
Authentication | Basic Auth |
TLS version | TLSv1.3 |
APPLICATION_HOME (variable) | /home/ec2-user/appdynamics/platform/product/events-service/processor |
Enable Basic Authentication and TLS for Transport Interface
If your cluster has multiple nodes, you must enable basic authentication and then configure Transport Layer Security (TLS) between nodes. The basic authentication is not sufficient for production mode clusters.
Enable TLS for HTTP Interface
The property ad.es.node.security.tls.http
.enabled enables or disables TLS for HTTP communication between Events Service and ElasticSearch.
Ensure that:
ad.es.node.security.basic.auth.enabled=true
andad.es.node.security.tls.transport.enabled=true
properties are enabled- Stop the Events Service server
before you perform the following steps.
Verify if TLS is Enabled
Events Service can now communicate to Elastic Search cluster as indicated in the events-service-api-store.log
file.
Logs
[2023-03-25T15:11:19,192+05:30] [INFO ] [main] [c.a.a.p.e.n.s.ElasticsearchDependencyModule] Elasticsearch healthy, it should now be responsive.
[2023-03-25T15:11:19,194+05:30] [INFO ] [main] [c.a.a.p.e.index.MetaDataIndexCreator] Creating metaData indices...
Verify if TLS is enabled on HTTP as follows:
Verify if TLS is enabled on HTTP
❯ curl -X GET "https://localhost:9200" -k -u elastic:pass123
{
"name" : "ATKUMAR3-M-2344",
"cluster_name" : "appdynamics-events-service-cluster",
"cluster_uuid" : "eLk8ZXUDTe2yKTt-AChDLg",
"version" : {
"number" : "8.4.3",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "42f05b9372a9a4a470db3b52817899b99a76ee73",
"build_date" : "2022-10-04T07:17:24.662462378Z",
"build_snapshot" : false,
"lucene_version" : "9.3.0",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}