[DOCS] Adds testing for security APIs (#31345)

This commit is contained in:
Lisa Cawley 2018-06-18 08:48:23 -07:00 committed by GitHub
parent 3f5ebb862d
commit ea92864eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 10 deletions

View File

@ -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',
@ -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',
]

View File

@ -36,11 +36,13 @@ The following example output provides information about the "rdeniro" user:
{
"username": "rdeniro",
"roles": [
"admin",
"kibana4"
"admin"
],
"metadata" : {
"employee_id": "8675309"
}
"full_name": null,
"email": null,
"metadata": { },
"enabled": true
}
--------------------------------------------------
// TESTRESPONSE[s/"rdeniro"/"$body.username"/]
// TESTRESPONSE[s/"admin"/"superuser"/]

View File

@ -109,3 +109,4 @@ The API returns the following results:
}
]
----
// NOTCONSOLE

View File

@ -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

View File

@ -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>`