File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
x-pack/plugin/src/test/resources/rest-api-spec Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 3030 "realm_name" :{
3131 "type" :" string" ,
3232 "description" :" realm name of the user who created this API key to be retrieved"
33+ },
34+ "owner" : {
35+ "type" :" boolean" ,
36+ "default" : false ,
37+ "description" :" flag to query API keys owned by the currently authenticated user"
3338 }
3439 }
3540 }
Original file line number Diff line number Diff line change @@ -176,6 +176,16 @@ teardown:
176176 - match : { "api_keys.0.invalidated": false }
177177 - is_true : " api_keys.0.creation"
178178
179+ - do :
180+ headers :
181+ Authorization : " Basic YXBpX2tleV91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" # api_key_user
182+ security.get_api_key :
183+ owner : true
184+ - length : { "api_keys" : 1 }
185+ - match : { "api_keys.0.username": "api_key_user" }
186+ - match : { "api_keys.0.invalidated": false }
187+ - is_true : " api_keys.0.creation"
188+
179189---
180190" Test invalidate api key " :
181191 - skip :
You can’t perform that action at this time.
0 commit comments