This is the xplugins side of elastic/elasticsearchelastic/elasticsearch#19461 Original commit: elastic/x-pack-elasticsearch@bb29f9e948
This commit removes as much of the use of shield as possible in the source code. See elastic/elasticsearch#2383 Original commit: elastic/x-pack-elasticsearch@00009cc06e