Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify scripting enabled settings #24532

Closed
rjernst opened this issue May 6, 2017 · 6 comments

Comments

@rjernst
Copy link
Member

commented May 6, 2017

We currently have 3 concepts in scripts: language, type (inline, file, stored), and context. We also have "fine grained control" over the various combinations of these that can be allowed. These settings are automatically added in the script service, and the logic is complex with fallbacks.

As we are working towards a simpler scripting api, with contexts actually implying the variables available to a script, we should simplify these settings. I propose to have each of these concepts allow for disabling, but not the endless combinations; that level of control is simply not necessary.

My proposed settings are:

script.types_allowed: ['inline']
script.contexts_allowed: ['search_template', 'whatever']

The plan would be to add these alternative settings in 5.5, at the same time as disabling the old fine grained settings.

@jasontedor

This comment has been minimized.

Copy link
Member

commented May 6, 2017

Note there's an issue to remove file-based scripting (#21798) which would help simplify things too.

@clintongormley

This comment has been minimized.

Copy link
Member

commented May 8, 2017

I'm not sure we even need languages here - the languages that we expose are safe, so the question is whether you want any scripting enabled or disabled (for all or a list of particular contexts) and if so, would you accept inline or stored, or both.

@rjernst

This comment has been minimized.

Copy link
Member Author

commented May 8, 2017

@clintongormley Ok, I modified the description to (1) not have languages and (2) removed "disabled" so these lists are now inclusive instead of exclusive. For the latter, it means disabling just one context is more work, but it is much clearer that you want exactly these contexts, and new ones added will not be automatically added to your explicit list.

@jdconrad

This comment has been minimized.

Copy link
Contributor

commented May 18, 2017

This has been completed.

@jdconrad jdconrad closed this May 18, 2017

@spalger

This comment has been minimized.

Copy link
Member

commented May 27, 2017

@rjernst @jdconrad Kibana currently determines which languages were enabled for inline scripting with http://localhost:9200/_cluster/settings?include_defaults=true&filter_path=**.script.engine.*.inline, is there some other API we can use now?

@spalger

This comment has been minimized.

Copy link
Member

commented May 27, 2017

Sorry, I see discussion has already started in elastic/kibana#11959

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.