The ever-escalating popularity of Elasticsearch – the distributed open source search and log analytics engine that has become a staple in enterprise application developers’ tool belts – is well-warranted. Elasticsearch security lapses, however, have been a headline-grabbing thorn in the side of the technology.
The distributed document store too often represents a security blind spot for organizations, inexcusably failing to receive the attention and upkeep that other data storage solutions are normally granted. Data breach incidents involving Elasticsearch have been commonly rooted in this lack of attention, as well as a poor overall understanding of Elasticsearch security requirements.
As an open source solution, Elasticsearch can be downloaded without any subscription or enterprise license required. But in its default configuration, Elasticsearch doesn’t come with enterprise-grade security features. This can add up to a perfect storm from a security perspective: Elasticsearch is tremendously easy to deploy, but just as simple to forget about when it comes to hardening security that properly restricts access and protects data.
In a now-all-too-commonly-seen examples, technology teams expose their development or testing systems to the internet for convenience, and then forget to change to a secure configuration before moving Elasticsearch into production. The result – careless exposure of production Elasticsearch data to anyone who might access it – puts organizations at risk.
Elasticsearch security options
Until recently, the best (and, really, the only) viable option for ensuring Elasticsearch security was using the Elastic Stack extension X-Pack. X-Pack requires purchasing a costly enterprise subscription from Elastic. For that cost, X-Pack does provide valuable enterprise-grade security.
However, there is now another option: the Amazon-initiated Open Distro for Elasticsearch project offers a slate of enterprise-grade security features with open source availability. Among these, Open Distro for Elasticsearch includes encryption of data in-transit – supporting OpenSSL and TLS 1.2. This protects both traffic from external clients and internal traffic among cluster nodes, while offering simplified integration with public key infrastructures and the ability to enable enterprises to satisfy strict regulatory compliance requirements.
Open Distro for Elasticsearch readily integrates into authentication infrastructures as well, allowing enterprises to authenticate users through LDAP/Active Directory, Kerberos, SAML, and other popular protocols.
Open Distro for Elasticsearch also includes role-based access controls (RBACs), featuring granular controls for limiting each user’s access to only those cluster operations, indices, or documents and fields they require. It also enables security incident responses and secures the Elasticsearch cluster in-line with government and industry regulations via audit logs. This logging tracks and records all user actions within the cluster and enables all activity to be monitored.
In comparison, Elastic’s X-Pack similarly features SSL/TLS encryption, authorization and access controls including password protection, RBACs, and IP filtering, and the ability to maintain audit trails. While Elastic has also taken the step of opening its code for X-Pack, the clear caveat remains that the required licensing fees make X-Pack the costlier option for securing Elasticsearch.
5 actions enterprises should take to ensure Elasticsearch security
Whichever solution for achieving Elasticsearch security an enterprise selects, the following best practices should be top-of-mind:
1. Encrypt all data. Utilize TLS to encrypt all traffic within your Elasticsearch cluster, as well as all traffic from data sources connecting to your Elasticsearch cluster.
2. Do not expose your Elasticsearch cluster to the internet without the proper precautions. In cases where such exposure is required, ensure that internet-facing servers use secure configurations and leverage firewalls, least-privilege policies and access controls, proxies, etc.
3. Implement strict access controls. Control access to indices, documents, and more with secure authentication methods and RBACs.
4. Introduce audit logs. Utilize audit logging to track the actions of all users within your Elasticsearch cluster, monitor any suspicious activity, and conduct informed security incident responses.
5. Leverage provider support when necessary. If in need of external expertise and support, enlist a managed Elasticsearch provider capable of mitigating your security risks. Such providers can offer out-of-the-box security features such as encryption, access control, and monitoring and alerts, while ensuring the integrity of your data in accordance with regulatory standards.
Safely realizing the full benefits of Elasticsearch – and there are many of them – requires paying close attention to your data security protections, the same as you would with any database implementation. By selecting a suitable security strategy and adhering to best practices, your organization can get the most out of Elasticsearch while still keeping data fully secure.