Enabling dynamic scripting option in ElasticSearch 1.2.x

(Hemanth Yamijala) #1


We are using Titan with an embedded ElasticSearch in our project. The embedded form is for development / test usage. Version of Titan is 0.5.4 which appears to work only with an old version of ES - 1.2.x. Specifically, we are loading 1.2.1 as seen from the log file:
[Gunthar of Rigel] version[1.2.1], pid[29745], build[6c95b75/2014-06-03T15:02:52Z] (node:114)

Titan uses the dynamic scripting feature of ES, as specified here. However, since our application is front-ending all access to ES, we want to disable all external access to ES.

With this in mind, I've created a ES configuration file of this form:
http.enabled: false script.disable_dynamic: false

My expectation was that this would disable external access but still allow titan to use dynamic scripting as it requires.

Without these settings, the observation is that:
(a) ES is bound to the default port 9200 and is able to receive / respond to commands directly.
(b) Scripts submitted via requests are executed successfully.

With these settings, the observation is that:
(a) ES does not expose any port,
(b) Dynamic scripts don't appear to be working.

In order to specifically test (b) above, I left the http module enabled and fired a request with a script and it returns back a response of this nature:

Could someone help me understand if my configuration reflects what I want to achieve, and if yes, please let me know why dynamic scripting does not appear to be working even on being enabled.

FWIW, I tried with these options as well to test:
http.enabled: true script.disable_dynamic: true

With these, requests with scripts clearly fails with a ScriptException[dynamic scripting disabled] - a different and expected response from when dynamic scripting is enabled.


(system) #2