-
Notifications
You must be signed in to change notification settings - Fork 25.9k
TemplateUpgradeService runs updates under existing ThreadContext #30603
Copy link
Copy link
Closed
Labels
:Core/Infra/PluginsPlugin API and infrastructurePlugin API and infrastructure:Distributed/Cluster CoordinationCluster formation and cluster state publication, including cluster membership and fault detection.Cluster formation and cluster state publication, including cluster membership and fault detection.:Security/AuthenticationLogging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)
Metadata
Metadata
Assignees
Labels
:Core/Infra/PluginsPlugin API and infrastructurePlugin API and infrastructure:Distributed/Cluster CoordinationCluster formation and cluster state publication, including cluster membership and fault detection.Cluster formation and cluster state publication, including cluster membership and fault detection.:Security/AuthenticationLogging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)
Type
Fields
Give feedbackNo fields configured for issues without a type.
The
TemplateUpgradeServicehas a high level flow of:ClusterChangedEventHowever
ClusterChangedEventcomes in with the sameThreadContextas the action that triggered the event (which might be a node join/leave, but it also might be a settings change or index create/delete over REST).executepreserves theThreadContextfrom the calling code.Consequently, the template update runs with a ThreadContext that matches the original triggering action.
If X-Pack Security is enabled, that means that update which should run as
_systemmight attempt to run as the user which authenticated to the Rest API. That user may not have privileges to perform that update.