OpenSearch/plugin
Alexander Reelsen 4fe9ac734b Watcher: Store thread context headers in watch (elastic/x-pack-elasticsearch#2808)
In order to be able to execute a watch as the user, who stored the
watch, this commit stores certain headers of the thread context, that
was used when the watch was stored.

Upon loading the watch the headers are loaded and applied for the
following watcher execution features

* search transform
* search input
* index action

A special case is the execute watch API, which overrides the headers loaded
from the watch with the one of the current request, so that a user
cannot execute this watch with other privileges of the user who stored it.

Only the headers "es-security-runas-user", "_xpack_security_authentication" are
copied for now, as those are needed for our security features.

The headers are stored in watch status in the watch and are not returned by default,
when the GET Watch API is used. A search reveals those of course.

relates elastic/x-pack-elasticsearch#2201

Original commit: elastic/x-pack-elasticsearch@9803bd51c2
2017-11-24 09:15:54 +01:00
..
bin/x-pack Usability enhancements for certificate generation (elastic/x-pack-elasticsearch#2561) 2017-10-30 13:08:31 +11:00
bwc-snapshot-dummy-projects Consolidate version numbering semantics (elastic/x-pack-elasticsearch#3078) 2017-11-23 20:23:05 +00:00
config/x-pack Rename core plugin and transport dirs 2017-02-10 11:02:42 -08:00
forbidden Fix LDAP Authc connections deadlock (elastic/x-pack-elasticsearch#2587) 2017-10-09 13:06:12 +03:00
keys Rename core plugin and transport dirs 2017-02-10 11:02:42 -08:00
licenses Add "client-api-objects" dependency for xpack plugin and transport-client (elastic/x-pack-elasticsearch#2995) 2017-11-15 09:49:00 -07:00
ml-cpp-snapshot [BUILD] Make AWS error message more informative 2017-09-14 14:46:48 +01:00
src Watcher: Store thread context headers in watch (elastic/x-pack-elasticsearch#2808) 2017-11-24 09:15:54 +01:00
build.gradle Remove InternalClient and InternalSecurityClient (elastic/x-pack-elasticsearch#3054) 2017-11-22 08:35:18 -07:00