-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a number of api calls that use the deprecated endpoints so that these can be used in the `old_cluster` tests
- Loading branch information
Showing
12 changed files
with
305 additions
and
12 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
x-pack/plugin/src/test/resources/rest-api-spec/api/security.deprecated_authenticate.json
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,17 @@ | ||
{ | ||
"security.deprecated_authenticate": { | ||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html", | ||
"methods": [ | ||
"GET" | ||
], | ||
"url": { | ||
"path": "/_xpack/security/_authenticate", | ||
"paths": [ | ||
"/_xpack/security/_authenticate" | ||
], | ||
"parts": {}, | ||
"params": {} | ||
}, | ||
"body": null | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
x-pack/plugin/src/test/resources/rest-api-spec/api/security.deprecated_change_password.json
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,38 @@ | ||
{ | ||
"security.deprecated_change_password": { | ||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html", | ||
"methods": [ | ||
"PUT", | ||
"POST" | ||
], | ||
"url": { | ||
"path": "/_xpack/security/user/{username}/_password", | ||
"paths": [ | ||
"/_xpack/security/user/{username}/_password", | ||
"/_xpack/security/user/_password" | ||
], | ||
"parts": { | ||
"username": { | ||
"type": "string", | ||
"description": "The username of the user to change the password for", | ||
"required": false | ||
} | ||
}, | ||
"params": { | ||
"refresh": { | ||
"type": "enum", | ||
"options": [ | ||
"true", | ||
"false", | ||
"wait_for" | ||
], | ||
"description": "If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes." | ||
} | ||
} | ||
}, | ||
"body": { | ||
"description": "the new password for the user", | ||
"required": true | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
.../plugin/src/test/resources/rest-api-spec/api/security.deprecated_clear_cached_realms.json
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,29 @@ | ||
{ | ||
"security.deprecated_clear_cached_realms": { | ||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html", | ||
"methods": [ | ||
"POST" | ||
], | ||
"url": { | ||
"path": "/_xpack/security/realm/{realms}/_clear_cache", | ||
"paths": [ | ||
"/_xpack/security/realm/{realms}/_clear_cache" | ||
], | ||
"parts": { | ||
"realms": { | ||
"type": "list", | ||
"description": "Comma-separated list of realms to clear", | ||
"required": true | ||
} | ||
}, | ||
"params": { | ||
"usernames": { | ||
"type": "list", | ||
"description": "Comma-separated list of usernames to clear from the cache", | ||
"required": false | ||
} | ||
} | ||
}, | ||
"body": null | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...k/plugin/src/test/resources/rest-api-spec/api/security.deprecated_clear_cached_roles.json
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,23 @@ | ||
{ | ||
"security.deprecated_clear_cached_roles": { | ||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html", | ||
"methods": [ | ||
"POST" | ||
], | ||
"url": { | ||
"path": "/_xpack/security/role/{name}/_clear_cache", | ||
"paths": [ | ||
"/_xpack/security/role/{name}/_clear_cache" | ||
], | ||
"parts": { | ||
"name": { | ||
"type": "list", | ||
"description": "Role name", | ||
"required": true | ||
} | ||
}, | ||
"params": {} | ||
}, | ||
"body": null | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
x-pack/plugin/src/test/resources/rest-api-spec/api/security.deprecated_disable_user.json
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,34 @@ | ||
{ | ||
"security.deprecated_disable_user": { | ||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html", | ||
"methods": [ | ||
"PUT", | ||
"POST" | ||
], | ||
"url": { | ||
"path": "/_xpack/security/user/{username}/_disable", | ||
"paths": [ | ||
"/_xpack/security/user/{username}/_disable" | ||
], | ||
"parts": { | ||
"username": { | ||
"type": "string", | ||
"description": "The username of the user to disable", | ||
"required": false | ||
} | ||
}, | ||
"params": { | ||
"refresh": { | ||
"type": "enum", | ||
"options": [ | ||
"true", | ||
"false", | ||
"wait_for" | ||
], | ||
"description": "If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes." | ||
} | ||
} | ||
}, | ||
"body": null | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
x-pack/plugin/src/test/resources/rest-api-spec/api/security.deprecated_enable_user.json
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,34 @@ | ||
{ | ||
"security.deprecated_enable_user": { | ||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html", | ||
"methods": [ | ||
"PUT", | ||
"POST" | ||
], | ||
"url": { | ||
"path": "/_xpack/security/user/{username}/_enable", | ||
"paths": [ | ||
"/_xpack/security/user/{username}/_enable" | ||
], | ||
"parts": { | ||
"username": { | ||
"type": "string", | ||
"description": "The username of the user to enable", | ||
"required": false | ||
} | ||
}, | ||
"params": { | ||
"refresh": { | ||
"type": "enum", | ||
"options": [ | ||
"true", | ||
"false", | ||
"wait_for" | ||
], | ||
"description": "If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes." | ||
} | ||
} | ||
}, | ||
"body": null | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
x-pack/plugin/src/test/resources/rest-api-spec/api/security.deprecated_get_token.json
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 @@ | ||
{ | ||
"security.deprecated_get_token": { | ||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html", | ||
"methods": [ | ||
"POST" | ||
], | ||
"url": { | ||
"path": "/_xpack/security/oauth2/token", | ||
"paths": [ | ||
"/_xpack/security/oauth2/token" | ||
], | ||
"parts": {}, | ||
"params": {} | ||
}, | ||
"body": { | ||
"description": "The token request to get", | ||
"required": true | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
x-pack/plugin/src/test/resources/rest-api-spec/api/security.deprecated_get_user.json
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,24 @@ | ||
{ | ||
"security.deprecated_get_user": { | ||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html", | ||
"methods": [ | ||
"GET" | ||
], | ||
"url": { | ||
"path": "/_xpack/security/user/{username}", | ||
"paths": [ | ||
"/_xpack/security/user/{username}", | ||
"/_xpack/security/user" | ||
], | ||
"parts": { | ||
"username": { | ||
"type": "list", | ||
"description": "A comma-separated list of usernames", | ||
"required": false | ||
} | ||
}, | ||
"params": {} | ||
}, | ||
"body": null | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
x-pack/plugin/src/test/resources/rest-api-spec/api/security.deprecated_put_role.json
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,37 @@ | ||
{ | ||
"security.deprecated_put_role": { | ||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html", | ||
"methods": [ | ||
"PUT", | ||
"POST" | ||
], | ||
"url": { | ||
"path": "/_xpack/security/role/{name}", | ||
"paths": [ | ||
"/_xpack/security/role/{name}" | ||
], | ||
"parts": { | ||
"name": { | ||
"type": "string", | ||
"description": "Role name", | ||
"required": true | ||
} | ||
}, | ||
"params": { | ||
"refresh": { | ||
"type": "enum", | ||
"options": [ | ||
"true", | ||
"false", | ||
"wait_for" | ||
], | ||
"description": "If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes." | ||
} | ||
} | ||
}, | ||
"body": { | ||
"description": "The role to add", | ||
"required": true | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
x-pack/plugin/src/test/resources/rest-api-spec/api/security.deprecated_put_user.json
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,37 @@ | ||
{ | ||
"security.deprecated_put_user": { | ||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html", | ||
"methods": [ | ||
"PUT", | ||
"POST" | ||
], | ||
"url": { | ||
"path": "/_xpack/security/user/{username}", | ||
"paths": [ | ||
"/_xpack/security/user/{username}" | ||
], | ||
"parts": { | ||
"username": { | ||
"type": "string", | ||
"description": "The username of the User", | ||
"required": true | ||
} | ||
}, | ||
"params": { | ||
"refresh": { | ||
"type": "enum", | ||
"options": [ | ||
"true", | ||
"false", | ||
"wait_for" | ||
], | ||
"description": "If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes." | ||
} | ||
} | ||
}, | ||
"body": { | ||
"description": "The user to add", | ||
"required": true | ||
} | ||
} | ||
} |
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