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

[DOCS] Adds testing for security APIs #31345

Merged
merged 2 commits into from
Jun 18, 2018
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
4 changes: 0 additions & 4 deletions x-pack/docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ buildRestTests.expectedUnconvertedCandidates = [
'en/ml/functions/rare.asciidoc',
'en/ml/functions/sum.asciidoc',
'en/ml/functions/time.asciidoc',
'en/rest-api/security/ssl.asciidoc',
'en/rest-api/security/users.asciidoc',
'en/rest-api/security/tokens.asciidoc',
'en/rest-api/watcher/put-watch.asciidoc',
'en/security/authentication/user-cache.asciidoc',
'en/security/authorization/field-and-document-access-control.asciidoc',
Expand Down Expand Up @@ -76,7 +73,6 @@ buildRestTests.expectedUnconvertedCandidates = [
'en/rest-api/ml/update-snapshot.asciidoc',
'en/rest-api/ml/validate-detector.asciidoc',
'en/rest-api/ml/validate-job.asciidoc',
'en/rest-api/security/authenticate.asciidoc',
'en/rest-api/watcher/stats.asciidoc',
'en/watcher/example-watches/watching-time-series-data.asciidoc',
]
Expand Down
14 changes: 8 additions & 6 deletions x-pack/docs/en/rest-api/security/authenticate.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ The following example output provides information about the "rdeniro" user:
--------------------------------------------------
{
"username": "rdeniro",
"roles": [
"admin",
"kibana4"
"roles": [
"admin"
],
"metadata" : {
"employee_id": "8675309"
}
"full_name": null,
"email": null,
"metadata": { },
"enabled": true
}
--------------------------------------------------
// TESTRESPONSE[s/"rdeniro"/"$body.username"/]
// TESTRESPONSE[s/"admin"/"superuser"/]
1 change: 1 addition & 0 deletions x-pack/docs/en/rest-api/security/ssl.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ The API returns the following results:
}
]
----
// NOTCONSOLE
1 change: 1 addition & 0 deletions x-pack/docs/en/rest-api/security/tokens.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ by the value of the `access_token`.
--------------------------------------------------
curl -H "Authorization: Bearer dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==" http://localhost:9200/_cluster/health
--------------------------------------------------
// NOTCONSOLE

[[security-api-refresh-token]]
To extend the life of an existing token, the token api may be called again with the refresh
Expand Down
1 change: 1 addition & 0 deletions x-pack/docs/en/rest-api/security/users.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ authenticated. For example:
--------------------------------------------------
curl -u jacknich:j@rV1s http://localhost:9200/_cluster/health
--------------------------------------------------
// NOTCONSOLE

[[security-api-get-user]]
To retrieve a native user, submit a GET request to the `/_xpack/security/user/<username>`
Expand Down