Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add owner flag parameter to the rest spec #48500

Merged
merged 1 commit into from
Oct 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down