From 2671a7f29fa85d052ebe2702a1f4fb0c688f272e Mon Sep 17 00:00:00 2001 From: Nikolaj Volgushev Date: Tue, 9 Apr 2024 17:12:29 +0200 Subject: [PATCH] OpenAPI spec --- .../elasticsearch-serverless-openapi.json | 339 ++++++++++++++++-- 1 file changed, 310 insertions(+), 29 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 049e2830cf..785f671100 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -15968,6 +15968,101 @@ } } }, + "/_security/role/{name}": { + "get": { + "tags": [ + "security.get_role" + ], + "summary": "Retrieves roles in the native realm.", + "description": "Retrieves roles in the native realm.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html" + }, + "operationId": "security-get-role", + "parameters": [ + { + "$ref": "#/components/parameters/security.get_role#name" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/security.get_role#200" + } + } + }, + "put": { + "tags": [ + "security.put_role" + ], + "summary": "Adds and updates roles in the native realm.", + "description": "Adds and updates roles in the native realm.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html" + }, + "operationId": "security-put-role", + "parameters": [ + { + "$ref": "#/components/parameters/security.put_role#name" + }, + { + "$ref": "#/components/parameters/security.put_role#refresh" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/security.put_role" + }, + "responses": { + "200": { + "$ref": "#/components/responses/security.put_role#200" + } + } + }, + "post": { + "tags": [ + "security.put_role" + ], + "summary": "Adds and updates roles in the native realm.", + "description": "Adds and updates roles in the native realm.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html" + }, + "operationId": "security-put-role-1", + "parameters": [ + { + "$ref": "#/components/parameters/security.put_role#name" + }, + { + "$ref": "#/components/parameters/security.put_role#refresh" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/security.put_role" + }, + "responses": { + "200": { + "$ref": "#/components/responses/security.put_role#200" + } + } + } + }, + "/_security/role": { + "get": { + "tags": [ + "security.get_role" + ], + "summary": "Retrieves roles in the native realm.", + "description": "Retrieves roles in the native realm.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html" + }, + "operationId": "security-get-role-1", + "responses": { + "200": { + "$ref": "#/components/responses/security.get_role#200" + } + } + } + }, "/_security/user/_has_privileges": { "get": { "tags": [ @@ -20249,6 +20344,19 @@ } } }, + "security.get_role#200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.get_role:Role" + } + } + } + } + }, "security.has_privileges#200": { "description": "", "content": { @@ -20289,6 +20397,24 @@ } } }, + "security.put_role#200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "$ref": "#/components/schemas/security._types:CreatedStatus" + } + }, + "required": [ + "role" + ] + } + } + } + }, "security.query_api_keys#200": { "description": "", "content": { @@ -25348,6 +25474,17 @@ }, "style": "form" }, + "security.get_role#name": { + "in": "path", + "name": "name", + "description": "The name of the role. You can specify multiple roles as a comma-separated list. If you do not specify this parameter, the API returns information about all roles.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Names" + }, + "style": "simple" + }, "security.has_privileges#user": { "in": "path", "name": "user", @@ -25359,6 +25496,27 @@ }, "style": "simple" }, + "security.put_role#name": { + "in": "path", + "name": "name", + "description": "The name of the role.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Name" + }, + "style": "simple" + }, + "security.put_role#refresh": { + "in": "query", + "name": "refresh", + "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Refresh" + }, + "style": "form" + }, "security.query_api_keys#with_limited_by": { "in": "query", "name": "with_limited_by", @@ -27096,6 +27254,59 @@ }, "required": true }, + "security.put_role": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "applications": { + "description": "A list of application privilege entries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:ApplicationPrivileges" + } + }, + "cluster": { + "description": "A list of cluster privileges. These privileges define the cluster-level actions for users with this role.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:ClusterPrivilege" + } + }, + "indices": { + "description": "A list of indices permissions entries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:IndicesPrivileges" + } + }, + "metadata": { + "$ref": "#/components/schemas/_types:Metadata" + }, + "run_as": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/run-as-privilege.html" + }, + "description": "A list of users that the owners of this role can impersonate.", + "type": "array", + "items": { + "type": "string" + } + }, + "transient_metadata": { + "description": "Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security. When the cluster license doesn’t allow certain features for a given role, this parameter is updated dynamically to list the incompatible features. If `enabled` is `false`, the role is ignored, but is still listed in the response from the authenticate API.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + }, + "required": true + }, "security.query_api_keys": { "content": { "application/json": { @@ -57179,10 +57390,6 @@ }, "query": { "$ref": "#/components/schemas/security._types:IndicesPrivilegesQuery" - }, - "allow_restricted_indices": { - "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", - "type": "boolean" } }, "required": [ @@ -57215,12 +57422,8 @@ "index", "maintenance", "manage", - "manage_follow_index", - "manage_ilm", - "manage_leader_index", "monitor", "read", - "read_cross_cluster", "view_index_metadata", "write" ] @@ -57387,6 +57590,93 @@ "name" ] }, + "security.get_role:Role": { + "type": "object", + "properties": { + "cluster": { + "type": "array", + "items": { + "type": "string" + } + }, + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:IndicesPrivileges" + } + }, + "metadata": { + "$ref": "#/components/schemas/_types:Metadata" + }, + "run_as": { + "type": "array", + "items": { + "type": "string" + } + }, + "transient_metadata": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:ApplicationPrivileges" + } + }, + "role_templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:RoleTemplate" + } + }, + "global": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "required": [ + "cluster", + "indices", + "metadata", + "run_as", + "applications" + ] + }, + "security._types:RoleTemplate": { + "type": "object", + "properties": { + "format": { + "$ref": "#/components/schemas/security._types:TemplateFormat" + }, + "template": { + "$ref": "#/components/schemas/_types:Script" + } + }, + "required": [ + "template" + ] + }, + "security._types:TemplateFormat": { + "type": "string", + "enum": [ + "string", + "json" + ] + }, "security.has_privileges:ApplicationPrivilegesCheck": { "type": "object", "properties": { @@ -57420,41 +57710,21 @@ "enum": [ "all", "cancel_task", - "create_snapshot", - "grant_api_key", "manage", "manage_api_key", - "manage_ccr", "manage_enrich", - "manage_ilm", "manage_index_templates", - "manage_ingest_pipelines", "manage_logstash_pipelines", "manage_ml", - "manage_oidc", "manage_own_api_key", "manage_pipeline", - "manage_rollup", - "manage_saml", "manage_security", - "manage_service_account", - "manage_slm", - "manage_token", "manage_transform", - "manage_user_profile", - "manage_watcher", "monitor", "monitor_ml", - "monitor_rollup", - "monitor_snapshot", "monitor_text_structure", "monitor_transform", - "monitor_watcher", - "read_ccr", - "read_ilm", - "read_pipeline", - "read_slm", - "transport_client" + "read_pipeline" ] }, "security.has_privileges:IndexPrivilegesCheck": { @@ -57498,6 +57768,17 @@ "type": "boolean" } }, + "security._types:CreatedStatus": { + "type": "object", + "properties": { + "created": { + "type": "boolean" + } + }, + "required": [ + "created" + ] + }, "security.query_api_keys:ApiKeyAggregationContainer": { "allOf": [ {