diff --git a/elasticsearch/x-pack/shield/src/test/resources/rest-api-spec/api/shield.authenticate.json b/elasticsearch/x-pack/shield/src/test/resources/rest-api-spec/api/shield.authenticate.json new file mode 100644 index 00000000000..8c470760f97 --- /dev/null +++ b/elasticsearch/x-pack/shield/src/test/resources/rest-api-spec/api/shield.authenticate.json @@ -0,0 +1,13 @@ +{ + "shield.authenticate": { + "documentation": "Retrieve details about the currently authenticated user", + "methods": [ "GET" ], + "url": { + "path": "/_shield/authenticate", + "paths": [ "/_shield/authenticate" ], + "parts": {}, + "params": {} + }, + "body": null + } +} diff --git a/elasticsearch/x-pack/shield/src/test/resources/rest-api-spec/test/authenticate/10_basic.yaml b/elasticsearch/x-pack/shield/src/test/resources/rest-api-spec/test/authenticate/10_basic.yaml new file mode 100644 index 00000000000..d990ae5f56c --- /dev/null +++ b/elasticsearch/x-pack/shield/src/test/resources/rest-api-spec/test/authenticate/10_basic.yaml @@ -0,0 +1,11 @@ +--- +"Test authenticate api": + + - do: + cluster.health: + wait_for_status: yellow + - do: + shield.authenticate: {} + + - match: { username: "test_user" } + - match: { roles.0: "admin" }