diff --git a/qa/smoke-test-security-with-mustache/src/test/resources/rest-api-spec/test/10_templated_role_query.yml b/qa/smoke-test-security-with-mustache/src/test/resources/rest-api-spec/test/10_templated_role_query.yml index 7487b85f61f..6c51b2d2b88 100644 --- a/qa/smoke-test-security-with-mustache/src/test/resources/rest-api-spec/test/10_templated_role_query.yml +++ b/qa/smoke-test-security-with-mustache/src/test/resources/rest-api-spec/test/10_templated_role_query.yml @@ -24,14 +24,6 @@ setup: "roles" : [ "stored_template_role" ] } - - do: - xpack.security.put_user: - username: "file_template_user" - body: > - { - "password": "changeme", - "roles" : [ "file_template_role" ] - } - do: xpack.security.put_user: username: "terms_template_user" @@ -40,7 +32,7 @@ setup: "password": "changeme", "roles" : [ "terms_template_role" ], "metadata": { - "groups": [ "inline_template_user", "file_template_user" ] + "groups": [ "inline_template_user"] } } @@ -100,24 +92,6 @@ setup: ] } - - do: - xpack.security.put_role: - name: "file_template_role" - body: > - { - "indices": [ - { - "names": "foobar", - "privileges": ["all"], - "query" : { - "template" : { - "id" : "query" - } - } - } - ] - } - - do: put_template: id: "1" @@ -146,15 +120,6 @@ setup: { "username": "stored_template_user" } - - do: - index: - index: foobar - type: type - id: 3 - body: > - { - "username": "file_template_user" - } - do: indices.refresh: {} @@ -169,10 +134,6 @@ teardown: xpack.security.delete_user: username: "stored_template_user" ignore: 404 - - do: - xpack.security.delete_user: - username: "file_template_user" - ignore: 404 - do: xpack.security.delete_user: username: "terms_template_user" @@ -185,10 +146,6 @@ teardown: xpack.security.delete_role: name: "stored_template_role" ignore: 404 - - do: - xpack.security.delete_role: - name: "file_template_role" - ignore: 404 - do: xpack.security.delete_role: name: "terms_template_role" @@ -215,17 +172,6 @@ teardown: - match: { hits.total: 1} - match: { hits.hits.0._source.username: stored_template_user} ---- -"Test file template": - - do: - headers: - Authorization: "Basic ZmlsZV90ZW1wbGF0ZV91c2VyOmNoYW5nZW1l" - search: - index: foobar - body: { "query" : { "match_all" : {} } } - - match: { hits.total: 1} - - match: { hits.hits.0._source.username: file_template_user} - --- "Test terms template": - do: @@ -234,6 +180,5 @@ teardown: search: index: foobar body: { "query" : { "match_all" : {} } } - - match: { hits.total: 2} + - match: { hits.total: 1} - match: { hits.hits.0._source.username: inline_template_user} - - match: { hits.hits.1._source.username: file_template_user} diff --git a/qa/smoke-test-security-with-mustache/src/test/resources/rest-api-spec/test/11_templated_role_query_runas.yml b/qa/smoke-test-security-with-mustache/src/test/resources/rest-api-spec/test/11_templated_role_query_runas.yml index b3c4a41b455..6fa486bb7b1 100644 --- a/qa/smoke-test-security-with-mustache/src/test/resources/rest-api-spec/test/11_templated_role_query_runas.yml +++ b/qa/smoke-test-security-with-mustache/src/test/resources/rest-api-spec/test/11_templated_role_query_runas.yml @@ -24,14 +24,6 @@ setup: "roles" : [ "stored_template_role" ] } - - do: - xpack.security.put_user: - username: "file_template_user" - body: > - { - "password": "changeme", - "roles" : [ "file_template_role" ] - } - do: xpack.security.put_user: username: "terms_template_user" @@ -40,7 +32,7 @@ setup: "password": "changeme", "roles" : [ "terms_template_role" ], "metadata": { - "groups": [ "inline_template_user", "file_template_user" ] + "groups": [ "inline_template_user" ] } } @@ -100,24 +92,6 @@ setup: ] } - - do: - xpack.security.put_role: - name: "file_template_role" - body: > - { - "indices": [ - { - "names": "foobar", - "privileges": ["all"], - "query" : { - "template" : { - "id" : "query" - } - } - } - ] - } - - do: put_template: id: "1" @@ -146,15 +120,6 @@ setup: { "username": "stored_template_user" } - - do: - index: - index: foobar - type: type - id: 3 - body: > - { - "username": "file_template_user" - } - do: indices.refresh: {} @@ -169,10 +134,6 @@ teardown: xpack.security.delete_user: username: "stored_template_user" ignore: 404 - - do: - xpack.security.delete_user: - username: "file_template_user" - ignore: 404 - do: xpack.security.delete_user: username: "terms_template_user" @@ -185,10 +146,6 @@ teardown: xpack.security.delete_role: name: "stored_template_role" ignore: 404 - - do: - xpack.security.delete_role: - name: "file_template_role" - ignore: 404 - do: xpack.security.delete_role: name: "terms_template_role" @@ -215,17 +172,6 @@ teardown: - match: { hits.total: 1} - match: { hits.hits.0._source.username: stored_template_user} ---- -"Test file template with run as": - - do: - headers: - es-security-runas-user: "file_template_user" - search: - index: foobar - body: { "query" : { "match_all" : {} } } - - match: { hits.total: 1} - - match: { hits.hits.0._source.username: file_template_user} - --- "Test terms template with run as": - do: @@ -234,6 +180,5 @@ teardown: search: index: foobar body: { "query" : { "match_all" : {} } } - - match: { hits.total: 2} + - match: { hits.total: 1} - match: { hits.hits.0._source.username: inline_template_user} - - match: { hits.hits.1._source.username: file_template_user}