-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS] Add examples for security user profile and SAML APIs (#3520)
(cherry picked from commit 72c9fef)
- Loading branch information
Showing
49 changed files
with
750 additions
and
177 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
specification/security/activate_user_profile/examples/request/RequestExample1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# summary: | ||
# method_request: POST /_security/profile/_activate | ||
description: > | ||
Run `POST /_security/profile/_activate` to activate a user profile. | ||
# type: request | ||
value: |- | ||
{ | ||
"grant_type": "password", | ||
"username" : "jacknich", | ||
"password" : "l0ng-r4nd0m-p@ssw0rd" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
specification/security/has_privileges_user_profile/examples/request/RequestExample1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# summary: | ||
# method_request: POST /_security/profile/_has_privileges | ||
description: > | ||
Run `POST /_security/profile/_has_privileges` to check whether the two users associated with the specified profiles have all the requested set of cluster, index, and application privileges. | ||
# type: request | ||
value: |- | ||
{ | ||
"uids": [ | ||
"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0", | ||
"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1", | ||
"u_does-not-exist_0" | ||
], | ||
"privileges": { | ||
"cluster": [ "monitor", "create_snapshot", "manage_ml" ], | ||
"index" : [ | ||
{ | ||
"names": [ "suppliers", "products" ], | ||
"privileges": [ "create_doc"] | ||
}, | ||
{ | ||
"names": [ "inventory" ], | ||
"privileges" : [ "read", "write" ] | ||
} | ||
], | ||
"application": [ | ||
{ | ||
"application": "inventory_manager", | ||
"privileges" : [ "read", "data:write/inventory" ], | ||
"resources" : [ "product/1852563" ] | ||
} | ||
] | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
specification/security/has_privileges_user_profile/examples/response/ResponseExample1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# summary: | ||
description: > | ||
A response from `POST /_security/profile/_has_privileges` that indicates only one of the three users has all the privileges and one of them is not found. | ||
# type: response | ||
# response_code: | ||
value: |- | ||
{ | ||
"has_privilege_uids": ["u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1"], | ||
"errors": { | ||
"count": 1, | ||
"details": { | ||
"u_does-not-exist_0": { | ||
"type": "resource_not_found_exception", | ||
"reason": "profile document not found" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
specification/security/saml_authenticate/examples/request/RequestExample1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# summary: | ||
# method_request: POST /_security/saml/authenticate | ||
description: > | ||
Run `POST /_security/saml/authenticate` to exchange a SAML Response indicating a successful authentication at the SAML IdP for an Elasticsearch access token and refresh token to be used in subsequent requests. | ||
# type: request | ||
value: |- | ||
{ | ||
"content" : "PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....", | ||
"ids" : ["4fee3b046395c4e751011e97f8900b5273d56685"] | ||
} |
Oops, something went wrong.