{"id":1095,"date":"2017-10-14T02:19:26","date_gmt":"2017-10-14T02:19:26","guid":{"rendered":"http:\/\/capture.ccio.us\/?p=1095"},"modified":"2017-10-14T02:19:26","modified_gmt":"2017-10-14T02:19:26","slug":"securing-solr-best-practices-protect-data","status":"publish","type":"post","link":"https:\/\/capture.club\/portal\/2017\/10\/14\/securing-solr-best-practices-protect-data\/","title":{"rendered":"Securing Solr: Best Practices to Protect Your Data"},"content":{"rendered":"<body><p><\/p><img decoding=\"async\" class=\"alignnone size-medium wp-image-583\" src=\"http:\/\/capture.ccio.us\/wp-content\/uploads\/2016\/11\/Solr_Logo_on_white-300x152.png\" alt=\"Solr_Logo_on_white\" width=\"300\" height=\"152\" loading=\"lazy\">\n<blockquote><p><em>If you reveal your secrets to the wind, you should not blame the wind for revealing them to the trees. \u2014 Kahlil Gibran<\/em><\/p><\/blockquote>\n<p>Solr\u2019s strength lies primarily in its ability to rapidly index and query vast troves of data. \u00a0With this powerful ability, however, \u00a0comes certain caveats. \u00a0One caveat in particular remains a vitally important consideration when planning your Solr environment: Security.<br>\nBy its very nature, security is something of an enigma. \u00a0Documentation is often limited, and is often provided on a strict \u201cneed-to-know\u201d basis. \u00a0In the programming world, security failure response messages are often vague or even non-existent. \u00a0Further, because security is by design restrictive, it can be problematic. Despite these hurdles, it remains a critical necessity to any enterprise.<br>\nWhen you first install and startup Solr, you\u2019ll notice that no authentication is required. \u00a0Out-of-the-box, Solr is unsecured. \u00a0Thus your first consideration is to <strong>make sure that Solr is behind an appropriately-configured firewall<\/strong>, <strong>and that user permissions on Solr instances are properly locked down. \u00a0The user under which Solr runs should only have \u2018write\u2019 access to the Solr root directory.\u00a0<\/strong> The firewall layer is really the front line of your defense strategy. \u00a0From there, you\u2019ll want to consider a variety of software security layers. \u00a0 The final configuration would, of course, depend on the nature of your application, so it\u2019s a good idea to have a solid architecture and corresponding use cases in mind prior to creating a security plan.<br>\nAs previously mentioned, once you have your hardware firewall established, you\u2019ll want to consider the various possible\u00a0layers of software security. \u00a0This would include antivirus\/trojan\/malware prevention, detection and eradiction applications, real-time behavior monitoring capable of alerting critical users when odd behavior begins to occur, \u00a0DDOS (Direct Denial of Service) attack detections software, data encryption software, and so on. \u00a0The combinations are literally limitless, and again, will depend on the end goal of your project.<br>\nWith your software security layer in place, you can begin <a href=\"https:\/\/cwiki.apache.org\/confluence\/display\/solr\/Securing+Solr\">securing Solr<\/a> directly.<br>\nSolr is capable of integrating with a variety of third-party authentication frameworks, including LDAP and Kerberos. \u00a0Since the 5.x release, it also comes with built-in support for <a href=\"https:\/\/cwiki.apache.org\/confluence\/display\/solr\/Basic+Authentication+Plugin\">Basic Authentication<\/a>. \u00a0Basic Authentication will allow you to secure Solr\u2019s admin console, as well as provide collection level granularity.<br>\nBeyond console and collection-level security, it is considered best practice to put your own application service in front of Solr, and using, for example, the <a href=\"https:\/\/cwiki.apache.org\/confluence\/display\/solr\/Using+SolrJ\">SolrJ<\/a> library to communicate with Solr.<br>\nIn summary, securing your Solr environment requires a good deal of planning and forethought. \u00a0There are several layers of security that must\u00a0be addressed in order to make sure your environment is secured from malicious attacks.<\/p>\n<h2><strong>In a Nutshell:<\/strong><\/h2>\n<ol>\n<li>Solr is by default and by design, completely unsecured out-of-the-box. <strong>\u00a0It is vitally important that your Solr instance is behind a firewall, and that box level security is appropriate and limited to only critical users.<\/strong><\/li>\n<li>Choose the appropriate suite of software security tools to provide protection against malware, DDOS attacks, and so on.<\/li>\n<li>Use the Solr BasicAuthentication plugin, or other supported services, to secure the Solr console and collections.<\/li>\n<li>Create a custom service to provide communication between your client applications and Solr.<\/li>\n<\/ol>\n<p><!--\n\n\n<h2><strong>Important Note:<\/strong><\/h2>\n\n\n<strong>\u00a0 \u00a0 \u00a0If you've followed these measures, your Solr instance will be effectively secure, including from a\u00a0recently-discovered\u00a0vulnerability in Solr that would potentially allow a cross-traversal exploit of the replication API. \u00a0This vulnerability has been patched. \u00a0<span class=\"wysiwyg-underline\">It is <span style=\"text-decoration: underline;\">highly-recommended<\/span> that Solr 5.x users upgrade their Solr instance to 5.5.4 and all 6.x users upgrade to 6.4.2<\/span>. \u00a0<\/strong>\n--><\/p>\n<h2><strong>Futher Reading:<\/strong><\/h2>\n<ul>\n<li><a href=\"https:\/\/lucidworks.com\/2015\/08\/17\/securing-solr-basic-auth-permission-rules\/\">Basic Authentication Permissions<\/a><\/li>\n<li><a href=\"\/knowledge\/articles\/115003505507\/en-us?brand_id=2289156\">Document Level Security in Solr<\/a><\/li>\n<li><a href=\"https:\/\/lucidworks.com\/2017\/03\/09\/securing-solr-best-practices-to-protect-your-data\/\">Solr Tips, Trick and Things You Really Ought to Know<\/a><\/li>\n<\/ul>\n<p><\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>If you reveal your secrets to the wind, you should not blame the wind for revealing them to the trees. \u2014 Kahlil Gibran Solr\u2019s strength lies primarily in its ability to rapidly index and query vast troves of data. \u00a0With this powerful ability, however, \u00a0comes certain caveats. \u00a0One caveat in particular remains a vitally important [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[],"tags":[],"class_list":["post-1095","post","type-post","status-publish","format-standard","hentry"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/capture.club\/portal\/wp-json\/wp\/v2\/posts\/1095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/capture.club\/portal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/capture.club\/portal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/capture.club\/portal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/capture.club\/portal\/wp-json\/wp\/v2\/comments?post=1095"}],"version-history":[{"count":0,"href":"https:\/\/capture.club\/portal\/wp-json\/wp\/v2\/posts\/1095\/revisions"}],"wp:attachment":[{"href":"https:\/\/capture.club\/portal\/wp-json\/wp\/v2\/media?parent=1095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/capture.club\/portal\/wp-json\/wp\/v2\/categories?post=1095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/capture.club\/portal\/wp-json\/wp\/v2\/tags?post=1095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}