Skip to content

Commit fe8c569

Browse files
committed
[DOCS] Adds testing for security APIs (#31345)
1 parent 74727a1 commit fe8c569

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

x-pack/docs/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ buildRestTests.expectedUnconvertedCandidates = [
1616
'en/ml/functions/rare.asciidoc',
1717
'en/ml/functions/sum.asciidoc',
1818
'en/ml/functions/time.asciidoc',
19-
'en/rest-api/security/ssl.asciidoc',
20-
'en/rest-api/security/users.asciidoc',
21-
'en/rest-api/security/tokens.asciidoc',
2219
'en/rest-api/watcher/put-watch.asciidoc',
2320
'en/security/authentication/user-cache.asciidoc',
2421
'en/security/authorization/field-and-document-access-control.asciidoc',
@@ -76,7 +73,6 @@ buildRestTests.expectedUnconvertedCandidates = [
7673
'en/rest-api/ml/update-snapshot.asciidoc',
7774
'en/rest-api/ml/validate-detector.asciidoc',
7875
'en/rest-api/ml/validate-job.asciidoc',
79-
'en/rest-api/security/authenticate.asciidoc',
8076
'en/rest-api/watcher/stats.asciidoc',
8177
'en/watcher/example-watches/watching-time-series-data.asciidoc',
8278
]

x-pack/docs/en/rest-api/security/authenticate.asciidoc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ The following example output provides information about the "rdeniro" user:
3535
--------------------------------------------------
3636
{
3737
"username": "rdeniro",
38-
"roles": [
39-
"admin",
40-
"kibana4"
38+
"roles": [
39+
"admin"
4140
],
42-
"metadata" : {
43-
"employee_id": "8675309"
44-
}
41+
"full_name": null,
42+
"email": null,
43+
"metadata": { },
44+
"enabled": true
4545
}
4646
--------------------------------------------------
47+
// TESTRESPONSE[s/"rdeniro"/"$body.username"/]
48+
// TESTRESPONSE[s/"admin"/"superuser"/]

x-pack/docs/en/rest-api/security/ssl.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,4 @@ The API returns the following results:
109109
}
110110
]
111111
----
112+
// NOTCONSOLE

x-pack/docs/en/rest-api/security/tokens.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ by the value of the `access_token`.
9898
--------------------------------------------------
9999
curl -H "Authorization: Bearer dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==" http://localhost:9200/_cluster/health
100100
--------------------------------------------------
101+
// NOTCONSOLE
101102

102103
[[security-api-refresh-token]]
103104
To extend the life of an existing token, the token api may be called again with the refresh

x-pack/docs/en/rest-api/security/users.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ authenticated. For example:
115115
--------------------------------------------------
116116
curl -u jacknich:j@rV1s http://localhost:9200/_cluster/health
117117
--------------------------------------------------
118+
// NOTCONSOLE
118119

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

0 commit comments

Comments
 (0)