From 17521041405c656a9d24d9f996237d27549ed095 Mon Sep 17 00:00:00 2001 From: Tim Vernum Date: Fri, 21 Jul 2017 19:06:40 +1000 Subject: [PATCH] Grant `getProxySelector` permission to rest client (elastic/x-pack-elasticsearch#2059) Monitoring uses the low level rest client, which was recently updated to need an additional permission Relates: elasticsearch#25757 relates elastic/x-pack-elasticsearch#2058 Original commit: elastic/x-pack-elasticsearch@eb9578792cc0841ffd0601b3240b506bac92b39e --- plugin/src/main/plugin-metadata/plugin-security.policy | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugin/src/main/plugin-metadata/plugin-security.policy b/plugin/src/main/plugin-metadata/plugin-security.policy index 72c97116cf2..15a7f44f039 100644 --- a/plugin/src/main/plugin-metadata/plugin-security.policy +++ b/plugin/src/main/plugin-metadata/plugin-security.policy @@ -31,3 +31,13 @@ grant { // needed for Windows named pipes in machine learning permission java.io.FilePermission "\\\\.\\pipe\\*", "read,write"; }; + +grant codeBase "${codebase.elasticsearch-rest-client-6.0.0-beta1-SNAPSHOT.jar}" { + // rest client uses system properties which gets the default proxy + permission java.net.NetPermission "getProxySelector"; +}; + +grant codeBase "${codebase.httpasyncclient-4.1.2.jar}" { + // rest client uses system properties which gets the default proxy + permission java.net.NetPermission "getProxySelector"; +};