forked from opensearch-project/opensearch-api-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Darshit Chanpura <[email protected]>
- Loading branch information
1 parent
0b033a9
commit f5220c1
Showing
25 changed files
with
263 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test account endpoint. | ||
|
||
prologues: | ||
- path: _plugins/_security/api/internalusers/{username} | ||
method: PUT | ||
parameters: | ||
username: test | ||
request_body: | ||
payload: | ||
password: "myWeakPassword123!" | ||
opendistro_security_roles: [] | ||
backend_roles: [] | ||
attributes: {} | ||
response: | ||
status: 200 | ||
chapters: | ||
- synopsis: Get account details. | ||
path: /_plugins/_security/api/account | ||
method: GET | ||
parameters: | ||
format: json | ||
response: | ||
status: 200 | ||
# TODO: following test can be changed to interact with test user once https://github.com/opensearch-project/opensearch-api-specification/issues/438 is implemented | ||
# NOTE: this test assumes that admin password is set to `myStrongPassword123!`, please update this test to correct password. One more reason to have the above feature implemented to avoid this. | ||
- synopsis: Change password. | ||
path: /_plugins/_security/api/account | ||
method: PUT | ||
request_body: | ||
payload: | ||
current_password: "myStrongPassword123!" | ||
password: "myWeakPassword123!" | ||
response: | ||
status: 200 | ||
epilogues: | ||
- path: /_plugins/_security/api/account | ||
method: PUT | ||
request_body: | ||
payload: | ||
current_password: "myWeakPassword123!" | ||
password: "myStrongPassword123!" | ||
response: | ||
status: 200 | ||
- path: /_plugins/_security/api/internalusers/{username} | ||
method: DELETE | ||
parameters: | ||
username: test | ||
status: [200, 404] |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test action_groups endpoints. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test allowlist endpoints. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test audit endpoints. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test authtoken endpoints. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test cache endpoint. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test internal users endpoints. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test migrate endpoint. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test nodesdn endpoints. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test permissionsinfo endpoint. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test roles endpoints. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test rolesmapping endpoint. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test securityconfig endpoints. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test ssl endpoints. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test tenancy endpoint. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test tenants endpoints. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,6 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test validate endpoint. | ||
prologues: | ||
chapters: | ||
epilogues: |
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,20 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test authinfo endpoint. | ||
chapters: | ||
- synopsis: Get auth info. | ||
path: /_plugins/_security/authinfo | ||
method: GET | ||
parameters: | ||
auth_type: basic | ||
verbose: false | ||
response: | ||
status: [200, 500] | ||
- synopsis: Get auth info via POST. | ||
path: /_plugins/_security/authinfo | ||
method: POST | ||
parameters: | ||
auth_type: basic | ||
verbose: false | ||
response: | ||
status: [200, 500] |
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,14 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test dashboardsinfo endpoint. | ||
chapters: | ||
- synopsis: Get dashboards info. | ||
path: /_plugins/_security/dashboardsinfo | ||
method: GET | ||
response: | ||
status: [200, 500] | ||
- synopsis: Get dashboards info via POST. | ||
path: /_plugins/_security/dashboardsinfo | ||
method: POST | ||
response: | ||
status: [200, 500] |
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 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test health endpoint. | ||
chapters: | ||
- synopsis: Get security health info. | ||
path: /_plugins/_security/health | ||
method: GET | ||
parameters: | ||
mode: strict | ||
response: | ||
status: 200 | ||
- synopsis: Get security health info via POST. | ||
path: /_plugins/_security/health | ||
method: POST | ||
parameters: | ||
mode: strict | ||
response: | ||
status: 200 |
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 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test sslinfo endpoint. | ||
chapters: | ||
- synopsis: Get ssl info. | ||
path: /_opendistro/_security/sslinfo | ||
method: GET | ||
parameters: | ||
show_dn: false | ||
response: | ||
status: [200, 500] |
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,15 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test tenantinfo endpoint. | ||
chapters: | ||
- synopsis: Get tenant info. | ||
path: /_plugins/_security/tenantinfo | ||
method: GET | ||
response: | ||
status: [200, 500] | ||
- synopsis: Get tenant info via POST. | ||
path: /_plugins/_security/tenantinfo | ||
method: POST | ||
response: | ||
status: [200, 500] | ||
|
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,19 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test upgrade eligibility endpoints. | ||
chapters: | ||
- synopsis: Check whether an upgrade can be performed. | ||
version: '>= 2.14' | ||
path: /_plugins/_security/_upgrade_check | ||
method: GET | ||
response: | ||
status: 200 | ||
- synopsis: Perform the upgrade. | ||
version: '>= 2.14' | ||
path: /_plugins/_security/_upgrade_perform | ||
method: POST | ||
request_body: | ||
payload: | ||
config: ["roles"] | ||
response: | ||
status: 200 |
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,20 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test whoami endpoints. | ||
chapters: | ||
- synopsis: Get current user info. | ||
path: /_plugins/_security/whoami | ||
method: GET | ||
response: | ||
status: [200, 500] | ||
- synopsis: Get current user info via POST. | ||
path: /_plugins/_security/whoami | ||
method: POST | ||
response: | ||
status: [200, 500] | ||
- synopsis: Get current user info from protected endpoint. | ||
version: '>= 2.11' | ||
path: /_plugins/_security/whoamiprotected | ||
method: GET | ||
response: | ||
status: [200, 500] |