Skip to content

Commit

Permalink
Updatable API keys - REST API spec and tests (#88270)
Browse files Browse the repository at this point in the history
This PR adds REST API spec and YAML test files for the UpdateApiKey
operation.
  • Loading branch information
n1v0lg authored Jul 8, 2022
1 parent 403506b commit f42b15b
Show file tree
Hide file tree
Showing 6 changed files with 399 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/changelog/88270.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 88270
summary: Updatable API keys - REST API spec and tests
area: Security
type: enhancement
issues: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"security.update_api_key": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-api-key.html",
"description": "Updates attributes of an existing API key."
},
"stability": "stable",
"visibility": "public",
"headers": {
"accept": [
"application/json"
],
"content_type": [
"application/json"
]
},
"url": {
"paths": [
{
"path": "/_security/api_key/{id}",
"methods": [
"PUT"
],
"parts": {
"id": {
"type": "string",
"description": "The ID of the API key to update"
}
}
}
]
},
"body": {
"description": "The API key request to update attributes of an API key.",
"required": false
}
}
}
2 changes: 2 additions & 0 deletions x-pack/docs/en/rest-api/security.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ without requiring basic authentication:
* <<security-api-clear-api-key-cache,Clear API key cache>>
* <<security-api-grant-api-key,Grant API key>>
* <<security-api-query-api-key,Query API key>>
* <<security-api-update-api-key,Update API key>>

[discrete]
[[security-user-apis]]
Expand Down Expand Up @@ -188,6 +189,7 @@ include::security/oidc-prepare-authentication-api.asciidoc[]
include::security/oidc-authenticate-api.asciidoc[]
include::security/oidc-logout-api.asciidoc[]
include::security/query-api-key.asciidoc[]
include::security/update-api-key.asciidoc[]
include::security/saml-prepare-authentication-api.asciidoc[]
include::security/saml-authenticate-api.asciidoc[]
include::security/saml-logout-api.asciidoc[]
Expand Down
5 changes: 5 additions & 0 deletions x-pack/docs/en/rest-api/security/update-api-key.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[role="xpack"]
[[security-api-update-api-key]]
=== Update API key information API

coming::[8.4.0]
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ teardown:

- do:
security.delete_role:
name: "use_role"
name: "user_role"
ignore: 404

- do:
Expand Down
Loading

0 comments on commit f42b15b

Please sign in to comment.