From 447e8fa1017fd08da325548f52ac90a9c12db051 Mon Sep 17 00:00:00 2001 From: David Cui <53581635+davidcui-amzn@users.noreply.github.com> Date: Thu, 11 Feb 2021 16:15:32 -0800 Subject: [PATCH] odfe security fix (#1048) --- .../sql/legacy/ODFERestTestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ODFERestTestCase.java b/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ODFERestTestCase.java index 87c65ab453..9007e2cd01 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ODFERestTestCase.java +++ b/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ODFERestTestCase.java @@ -71,7 +71,7 @@ protected RestClient buildClient(Settings settings, HttpHost[] hosts) throws IOE configureClient(builder, settings); } - builder.setStrictDeprecationMode(true); + builder.setStrictDeprecationMode(false); return builder.build(); } @@ -84,7 +84,7 @@ protected static void wipeAllODFEIndices() throws IOException { JSONObject jsonObject = (JSONObject) object; String indexName = jsonObject.getString("index"); //.opendistro_security isn't allowed to delete from cluster - if (!".opendistro_security".equals(indexName)) { + if (!indexName.startsWith(".kibana") && !indexName.startsWith(".opendistro")) { client().performRequest(new Request("DELETE", "/" + indexName)); } }