# Enabling dynamic scripting option in ElasticSearch 1.2.x

**URL:** <https://discuss.elastic.co/t/enabling-dynamic-scripting-option-in-elasticsearch-1-2-x/38023>\
**Category:** Elasticsearch\
**Created:** [December 28, 2015, 7:09am UTC](https://discuss.elastic.co/t/enabling-dynamic-scripting-option-in-elasticsearch-1-2-x/38023 "2015-12-28T07:09:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yhemanth](https://avatars.discourse-cdn.com/v4/letter/y/a9adbd/32.png) [@yhemanth](https://discuss.elastic.co/u/yhemanth)\
**Post date:** [December 28, 2015, 7:09am UTC](https://discuss.elastic.co/t/enabling-dynamic-scripting-option-in-elasticsearch-1-2-x/38023/1 "2015-12-28T07:09:11Z")

</div>

Hi,

We are using Titan with an [embedded ElasticSearch](http://s3.thinkaurelius.com/docs/titan/0.5.4/elasticsearch.html) 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](http://s3.thinkaurelius.com/docs/titan/0.5.4/version-compat.html) - 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](http://s3.thinkaurelius.com/docs/titan/0.5.4/elasticsearch.html). 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:  
`jQuery512713441_713552761({"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}});`

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.

Thanks  
Hemanth

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:28pm UTC](https://discuss.elastic.co/t/enabling-dynamic-scripting-option-in-elasticsearch-1-2-x/38023/2 "2017-07-05T23:28:21Z")

</div>


