Add owner flag parameter to the rest spec (#48500)

This commit adds missing info about newly added
`owner` flag to the rest spec, also adds a rest test
for the same.

Closes#48499
This commit is contained in:
Yogesh Gaikwad 2019-10-30 13:04:48 +11:00 committed by Yogesh Gaikwad
parent 89c65752dc
commit 1b64c1992a
2 changed files with 15 additions and 0 deletions

View File

@ -30,6 +30,11 @@
"realm_name":{
"type":"string",
"description":"realm name of the user who created this API key to be retrieved"
},
"owner": {
"type":"boolean",
"default": false,
"description":"flag to query API keys owned by the currently authenticated user"
}
}
}

View File

@ -176,6 +176,16 @@ teardown:
- match: { "api_keys.0.invalidated": false }
- is_true: "api_keys.0.creation"
- do:
headers:
Authorization: "Basic YXBpX2tleV91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" # api_key_user
security.get_api_key:
owner: true
- length: { "api_keys" : 1 }
- match: { "api_keys.0.username": "api_key_user" }
- match: { "api_keys.0.invalidated": false }
- is_true: "api_keys.0.creation"
---
"Test invalidate api key":
- skip: