Best Practice: Securing Shinydocs Indexer (Elasticsearch) access
Access to the Shinydocs Indexer on port 9200 (or the port you configured) should be extremely limited. Using a firewall to secure access is integral for keeping your data safe and secure. While there are many different firewall products out there, this guide will cover how to set up access so the Cognitive Toolkit can access the index but other computers or users cannot. The method used here is sometimes referred to as IP whitelisting.
This is the standard method of securing the Indexer. Your organization may have other means of securing web applications.
Assumptions
The servers Shinydocs Cognitive Suite (Analytics Engine, Cognitive Toolkit) do not allow inbound connections (they should be all blocked)
These servers are located in the same domain
The default port of 9200 is being used for the Indexer
The Indexer is bound to the network host
0.0.0.0
For deployments with more than one Analytics Engine, each Analytics Engine server should have these rules applied. If you are using a coordinator node in your deployment, all Analytics Engine servers need to communicate with eachother on port 9200 & 9300. The same logic applied here can be used to secure those servers, effectivly allowing only the IP addresses of all Analytic Engine servers to communicate on port 9200 & 9300.
Example
Cognitive Toolkit Server 1:
IP:10.1.243.242
Analytics Engine Server 1:
IP:10.1.243.243
Inbound rule: Allow10.1.243.244
,10.1.243.245
on port9200
,9300
Analytics Engine Server 2:
IP:10.1.243.244
Inbound rule: Allow10.1.243.243
,10.1.243.245
on port9200
,9300
Coordinator Node Server 1:
IP:10.1.243.245
Inbound rule: Allow10.1.243.243
,10.1.243.244
on port9200
,9300
Allow10.1.243.242
on port9200
Firewall rules (for other firewall products)
The target of this rule will be the server running the Shinydocs Indexer and Visualizer. For large deployments that use a coordinator node, these rules would apply to only the coordinator node.
All inbound ports are blocked
Your organization may require additional ports to remain open for other services (like RDP)
Inbound rule
Allow port 9200
Only for machines with the IP address(s) of the machines running Cognitive Toolkit
This will effectively block any access from external computers/users and only allow the set IP address source (Cognitive Toolkit server(s)) to communicate with the index on port 9200
Windows firewall guide
Open Windows Defender Firewall with Advanced Security and select Inbound Rules
Select New Rule
In the New Inbound Rule Wizard, select Port and click Next
Select TCP and Specific local ports and enter 9200 (or the port you configured for the Indexer service), click Next
Select Allow the connection, click Next
Select Domain and Private (meaning this rule would not apply on a public connection, where all access should be blocked by your existing firewall rules), click Next
Give your rule a name and description, click Finish
Double-click on the newly created rule (or click Properties with your new rule selected)
In the new window, select the Scope tab. Under Remote IP Address select These IP addresses and click Add
In the new window, select This IP address or subnet and enter the IP address of the machine running Cognitive Toolkit. Click OK
Repeat steps 9 and 10 for additional machines you need to add (for additional Cognitive Toolkit machines)
Once all IP addresses have been added to the list, click OK
Access to the Indexer is now secured from unauthorized access