From 36dbbd91866e44fe8fa3cf20f08990f7fb93f02b Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Sat, 9 Nov 2024 08:56:31 +0400 Subject: [PATCH 01/14] Add ip_location ingest processor (#3092) --- output/openapi/elasticsearch-openapi.json | 47 ++++ .../elasticsearch-serverless-openapi.json | 47 ++++ output/schema/schema-serverless.json | 231 +++++++++++++----- output/schema/schema.json | 231 +++++++++++++----- output/typescript/types.ts | 11 + specification/ingest/_types/Processors.ts | 40 +++ 6 files changed, 495 insertions(+), 112 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 5869044c37..9ee066462f 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -69825,6 +69825,9 @@ "foreach": { "$ref": "#/components/schemas/ingest._types:ForeachProcessor" }, + "ip_location": { + "$ref": "#/components/schemas/ingest._types:IpLocationProcessor" + }, "geo_grid": { "$ref": "#/components/schemas/ingest._types:GeoGridProcessor" }, @@ -70515,6 +70518,50 @@ } ] }, + "ingest._types:IpLocationProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types:ProcessorBase" + }, + { + "type": "object", + "properties": { + "database_file": { + "description": "The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.", + "type": "string" + }, + "field": { + "$ref": "#/components/schemas/_types:Field" + }, + "first_only": { + "description": "If `true`, only the first found IP location data will be returned, even if the field contains an array.", + "type": "boolean" + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "type": "boolean" + }, + "properties": { + "description": "Controls what properties are added to the `target_field` based on the IP location lookup.", + "type": "array", + "items": { + "type": "string" + } + }, + "target_field": { + "$ref": "#/components/schemas/_types:Field" + }, + "download_database_on_pipeline_creation": { + "description": "If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created.\nElse, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.", + "type": "boolean" + } + }, + "required": [ + "field" + ] + } + ] + }, "ingest._types:GeoGridProcessor": { "allOf": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 095cd05cd9..a9cbf66396 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -45827,6 +45827,9 @@ "foreach": { "$ref": "#/components/schemas/ingest._types:ForeachProcessor" }, + "ip_location": { + "$ref": "#/components/schemas/ingest._types:IpLocationProcessor" + }, "geo_grid": { "$ref": "#/components/schemas/ingest._types:GeoGridProcessor" }, @@ -46517,6 +46520,50 @@ } ] }, + "ingest._types:IpLocationProcessor": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types:ProcessorBase" + }, + { + "type": "object", + "properties": { + "database_file": { + "description": "The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.", + "type": "string" + }, + "field": { + "$ref": "#/components/schemas/_types:Field" + }, + "first_only": { + "description": "If `true`, only the first found IP location data will be returned, even if the field contains an array.", + "type": "boolean" + }, + "ignore_missing": { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "type": "boolean" + }, + "properties": { + "description": "Controls what properties are added to the `target_field` based on the IP location lookup.", + "type": "array", + "items": { + "type": "string" + } + }, + "target_field": { + "$ref": "#/components/schemas/_types:Field" + }, + "download_database_on_pipeline_creation": { + "description": "If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created.\nElse, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.", + "type": "boolean" + } + }, + "required": [ + "field" + ] + } + ] + }, "ingest._types:GeoGridProcessor": { "allOf": [ { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 22bce132c1..b4f72f1491 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -94567,7 +94567,7 @@ "name": "ConvertType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L621-L630" + "specLocation": "ingest/_types/Processors.ts#L661-L670" }, { "kind": "enum", @@ -94597,7 +94597,7 @@ "name": "FingerprintDigest", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L856-L862" + "specLocation": "ingest/_types/Processors.ts#L896-L902" }, { "kind": "enum", @@ -94613,7 +94613,7 @@ "name": "GeoGridTargetFormat", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L433-L436" + "specLocation": "ingest/_types/Processors.ts#L437-L440" }, { "kind": "enum", @@ -94632,7 +94632,7 @@ "name": "GeoGridTileType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L427-L431" + "specLocation": "ingest/_types/Processors.ts#L431-L435" }, { "kind": "enum", @@ -94650,7 +94650,7 @@ "name": "JsonProcessorConflictStrategy", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L1111-L1116" + "specLocation": "ingest/_types/Processors.ts#L1151-L1156" }, { "kind": "enum", @@ -94666,7 +94666,7 @@ "name": "ShapeType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L1433-L1436" + "specLocation": "ingest/_types/Processors.ts#L1473-L1476" }, { "kind": "enum", @@ -94691,7 +94691,7 @@ "name": "UserAgentProperty", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L507-L513" + "specLocation": "ingest/_types/Processors.ts#L547-L553" }, { "kind": "enum", @@ -121137,6 +121137,18 @@ } } }, + { + "description": "Currently an undocumented alias for GeoIP Processor.", + "name": "ip_location", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "IpLocationProcessor", + "namespace": "ingest._types" + } + } + }, { "description": "Converts geo-grid definitions of grid tiles or cells to regular bounding boxes or polygons which describe their shape.\nThis is useful if there is a need to interact with the tile shapes as spatially indexable fields.", "docId": "geo-grid-processor", @@ -121528,7 +121540,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L27-L297", + "specLocation": "ingest/_types/Processors.ts#L27-L301", "variants": { "kind": "container", "nonExhaustive": true @@ -121592,7 +121604,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L324-L339" + "specLocation": "ingest/_types/Processors.ts#L328-L343" }, { "kind": "interface", @@ -121665,7 +121677,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L299-L322" + "specLocation": "ingest/_types/Processors.ts#L303-L326" }, { "inherits": { @@ -121785,7 +121797,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L341-L382" + "specLocation": "ingest/_types/Processors.ts#L345-L386" }, { "inherits": { @@ -121839,7 +121851,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L515-L531" + "specLocation": "ingest/_types/Processors.ts#L555-L571" }, { "inherits": { @@ -121916,7 +121928,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L533-L556" + "specLocation": "ingest/_types/Processors.ts#L573-L596" }, { "inherits": { @@ -122075,7 +122087,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L558-L619" + "specLocation": "ingest/_types/Processors.ts#L598-L659" }, { "inherits": { @@ -122141,7 +122153,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L632-L652" + "specLocation": "ingest/_types/Processors.ts#L672-L692" }, { "inherits": { @@ -122239,7 +122251,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L654-L687" + "specLocation": "ingest/_types/Processors.ts#L694-L727" }, { "inherits": { @@ -122334,7 +122346,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L729-L762" + "specLocation": "ingest/_types/Processors.ts#L769-L802" }, { "inherits": { @@ -122440,7 +122452,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L689-L727" + "specLocation": "ingest/_types/Processors.ts#L729-L767" }, { "inherits": { @@ -122506,7 +122518,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L764-L783" + "specLocation": "ingest/_types/Processors.ts#L804-L823" }, { "inherits": { @@ -122559,7 +122571,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L785-L803" + "specLocation": "ingest/_types/Processors.ts#L825-L843" }, { "inherits": { @@ -122574,7 +122586,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Processors.ts#L805-L805" + "specLocation": "ingest/_types/Processors.ts#L845-L845" }, { "inherits": { @@ -122678,7 +122690,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L807-L846" + "specLocation": "ingest/_types/Processors.ts#L847-L886" }, { "inherits": { @@ -122706,7 +122718,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L848-L854" + "specLocation": "ingest/_types/Processors.ts#L888-L894" }, { "inherits": { @@ -122785,7 +122797,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L864-L892" + "specLocation": "ingest/_types/Processors.ts#L904-L932" }, { "inherits": { @@ -122838,7 +122850,114 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L894-L908" + "specLocation": "ingest/_types/Processors.ts#L934-L948" + }, + { + "inherits": { + "type": { + "name": "ProcessorBase", + "namespace": "ingest._types" + } + }, + "kind": "interface", + "name": { + "name": "IpLocationProcessor", + "namespace": "ingest._types" + }, + "properties": [ + { + "description": "The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.", + "name": "database_file", + "required": false, + "serverDefault": "GeoLite2-City.mmdb", + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The field to get the ip address from for the geographical lookup.", + "name": "field", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + } + }, + { + "description": "If `true`, only the first found IP location data will be returned, even if the field contains an array.", + "name": "first_only", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "name": "ignore_missing", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "Controls what properties are added to the `target_field` based on the IP location lookup.", + "name": "properties", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "description": "The field that will hold the geographical information looked up from the MaxMind database.", + "name": "target_field", + "required": false, + "serverDefault": "geoip", + "type": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + } + }, + { + "description": "If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created.\nElse, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.", + "name": "download_database_on_pipeline_creation", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "ingest/_types/Processors.ts#L478-L512" }, { "inherits": { @@ -122965,7 +123084,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L384-L425" + "specLocation": "ingest/_types/Processors.ts#L388-L429" }, { "inherits": { @@ -123072,7 +123191,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L438-L472" + "specLocation": "ingest/_types/Processors.ts#L442-L476" }, { "inherits": { @@ -123177,7 +123296,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L910-L941" + "specLocation": "ingest/_types/Processors.ts#L950-L981" }, { "inherits": { @@ -123255,7 +123374,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L943-L967" + "specLocation": "ingest/_types/Processors.ts#L983-L1007" }, { "inherits": { @@ -123309,7 +123428,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L969-L985" + "specLocation": "ingest/_types/Processors.ts#L1009-L1025" }, { "inherits": { @@ -123381,7 +123500,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L987-L1006" + "specLocation": "ingest/_types/Processors.ts#L1027-L1046" }, { "kind": "interface", @@ -123415,7 +123534,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1008-L1020", + "specLocation": "ingest/_types/Processors.ts#L1048-L1060", "variants": { "kind": "container" } @@ -123454,7 +123573,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1022-L1033" + "specLocation": "ingest/_types/Processors.ts#L1062-L1073" }, { "kind": "interface", @@ -123528,7 +123647,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1035-L1061" + "specLocation": "ingest/_types/Processors.ts#L1075-L1101" }, { "inherits": { @@ -123581,7 +123700,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1063-L1078" + "specLocation": "ingest/_types/Processors.ts#L1103-L1118" }, { "inherits": { @@ -123660,7 +123779,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1080-L1109" + "specLocation": "ingest/_types/Processors.ts#L1120-L1149" }, { "inherits": { @@ -123817,7 +123936,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1118-L1170" + "specLocation": "ingest/_types/Processors.ts#L1158-L1210" }, { "inherits": { @@ -123871,7 +123990,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1172-L1188" + "specLocation": "ingest/_types/Processors.ts#L1212-L1228" }, { "inherits": { @@ -123966,7 +124085,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1190-L1224" + "specLocation": "ingest/_types/Processors.ts#L1230-L1264" }, { "inherits": { @@ -124007,7 +124126,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1226-L1237" + "specLocation": "ingest/_types/Processors.ts#L1266-L1277" }, { "inherits": { @@ -124143,7 +124262,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1239-L1280" + "specLocation": "ingest/_types/Processors.ts#L1279-L1320" }, { "inherits": { @@ -124196,7 +124315,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1282-L1298" + "specLocation": "ingest/_types/Processors.ts#L1322-L1338" }, { "inherits": { @@ -124249,7 +124368,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1300-L1314" + "specLocation": "ingest/_types/Processors.ts#L1340-L1354" }, { "inherits": { @@ -124302,7 +124421,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1316-L1332" + "specLocation": "ingest/_types/Processors.ts#L1356-L1372" }, { "inherits": { @@ -124384,7 +124503,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1334-L1362" + "specLocation": "ingest/_types/Processors.ts#L1374-L1402" }, { "inherits": { @@ -124456,7 +124575,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1364-L1384" + "specLocation": "ingest/_types/Processors.ts#L1404-L1424" }, { "inherits": { @@ -124542,7 +124661,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1386-L1420" + "specLocation": "ingest/_types/Processors.ts#L1426-L1460" }, { "inherits": { @@ -124585,7 +124704,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1422-L1431" + "specLocation": "ingest/_types/Processors.ts#L1462-L1471" }, { "inherits": { @@ -124638,7 +124757,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1438-L1454" + "specLocation": "ingest/_types/Processors.ts#L1478-L1494" }, { "inherits": { @@ -124717,7 +124836,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1456-L1481" + "specLocation": "ingest/_types/Processors.ts#L1496-L1521" }, { "inherits": { @@ -124732,7 +124851,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Processors.ts#L1483-L1483" + "specLocation": "ingest/_types/Processors.ts#L1523-L1523" }, { "inherits": { @@ -124786,7 +124905,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1485-L1501" + "specLocation": "ingest/_types/Processors.ts#L1525-L1541" }, { "inherits": { @@ -124840,7 +124959,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1503-L1519" + "specLocation": "ingest/_types/Processors.ts#L1543-L1559" }, { "inherits": { @@ -124894,7 +125013,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1521-L1537" + "specLocation": "ingest/_types/Processors.ts#L1561-L1577" }, { "inherits": { @@ -124974,7 +125093,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1539-L1565" + "specLocation": "ingest/_types/Processors.ts#L1579-L1605" }, { "inherits": { @@ -125087,7 +125206,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L474-L505" + "specLocation": "ingest/_types/Processors.ts#L514-L545" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index f22be4094e..cf2312fe1a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -141425,7 +141425,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L324-L339" + "specLocation": "ingest/_types/Processors.ts#L328-L343" }, { "kind": "interface", @@ -141545,7 +141545,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L341-L382" + "specLocation": "ingest/_types/Processors.ts#L345-L386" }, { "kind": "interface", @@ -141599,7 +141599,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L515-L531" + "specLocation": "ingest/_types/Processors.ts#L555-L571" }, { "kind": "interface", @@ -141676,7 +141676,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L533-L556" + "specLocation": "ingest/_types/Processors.ts#L573-L596" }, { "kind": "interface", @@ -141835,7 +141835,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L558-L619" + "specLocation": "ingest/_types/Processors.ts#L598-L659" }, { "kind": "interface", @@ -141901,7 +141901,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L632-L652" + "specLocation": "ingest/_types/Processors.ts#L672-L692" }, { "kind": "enum", @@ -141935,7 +141935,7 @@ "name": "ConvertType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L621-L630" + "specLocation": "ingest/_types/Processors.ts#L661-L670" }, { "kind": "interface", @@ -142033,7 +142033,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L654-L687" + "specLocation": "ingest/_types/Processors.ts#L694-L727" }, { "kind": "interface", @@ -142173,7 +142173,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L689-L727" + "specLocation": "ingest/_types/Processors.ts#L729-L767" }, { "kind": "interface", @@ -142268,7 +142268,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L729-L762" + "specLocation": "ingest/_types/Processors.ts#L769-L802" }, { "kind": "interface", @@ -142334,7 +142334,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L764-L783" + "specLocation": "ingest/_types/Processors.ts#L804-L823" }, { "kind": "interface", @@ -142387,7 +142387,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L785-L803" + "specLocation": "ingest/_types/Processors.ts#L825-L843" }, { "kind": "interface", @@ -142402,7 +142402,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Processors.ts#L805-L805" + "specLocation": "ingest/_types/Processors.ts#L845-L845" }, { "kind": "interface", @@ -142506,7 +142506,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L807-L846" + "specLocation": "ingest/_types/Processors.ts#L847-L886" }, { "kind": "interface", @@ -142534,7 +142534,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L848-L854" + "specLocation": "ingest/_types/Processors.ts#L888-L894" }, { "kind": "enum", @@ -142564,7 +142564,7 @@ "name": "FingerprintDigest", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L856-L862" + "specLocation": "ingest/_types/Processors.ts#L896-L902" }, { "kind": "interface", @@ -142643,7 +142643,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L864-L892" + "specLocation": "ingest/_types/Processors.ts#L904-L932" }, { "kind": "interface", @@ -142696,7 +142696,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L894-L908" + "specLocation": "ingest/_types/Processors.ts#L934-L948" }, { "kind": "interface", @@ -142823,7 +142823,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L384-L425" + "specLocation": "ingest/_types/Processors.ts#L388-L429" }, { "kind": "enum", @@ -142839,7 +142839,7 @@ "name": "GeoGridTargetFormat", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L433-L436" + "specLocation": "ingest/_types/Processors.ts#L437-L440" }, { "kind": "enum", @@ -142858,7 +142858,7 @@ "name": "GeoGridTileType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L427-L431" + "specLocation": "ingest/_types/Processors.ts#L431-L435" }, { "kind": "interface", @@ -142965,7 +142965,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L438-L472" + "specLocation": "ingest/_types/Processors.ts#L442-L476" }, { "kind": "interface", @@ -143070,7 +143070,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L910-L941" + "specLocation": "ingest/_types/Processors.ts#L950-L981" }, { "kind": "interface", @@ -143148,7 +143148,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L943-L967" + "specLocation": "ingest/_types/Processors.ts#L983-L1007" }, { "kind": "interface", @@ -143202,7 +143202,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L969-L985" + "specLocation": "ingest/_types/Processors.ts#L1009-L1025" }, { "kind": "interface", @@ -143236,7 +143236,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1008-L1020", + "specLocation": "ingest/_types/Processors.ts#L1048-L1060", "variants": { "kind": "container" } @@ -143313,7 +143313,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1035-L1061" + "specLocation": "ingest/_types/Processors.ts#L1075-L1101" }, { "kind": "interface", @@ -143349,7 +143349,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1022-L1033" + "specLocation": "ingest/_types/Processors.ts#L1062-L1073" }, { "kind": "interface", @@ -143421,7 +143421,114 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L987-L1006" + "specLocation": "ingest/_types/Processors.ts#L1027-L1046" + }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "ProcessorBase", + "namespace": "ingest._types" + } + }, + "name": { + "name": "IpLocationProcessor", + "namespace": "ingest._types" + }, + "properties": [ + { + "description": "The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.", + "name": "database_file", + "required": false, + "serverDefault": "GeoLite2-City.mmdb", + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The field to get the ip address from for the geographical lookup.", + "name": "field", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + } + }, + { + "description": "If `true`, only the first found IP location data will be returned, even if the field contains an array.", + "name": "first_only", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", + "name": "ignore_missing", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "Controls what properties are added to the `target_field` based on the IP location lookup.", + "name": "properties", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "description": "The field that will hold the geographical information looked up from the MaxMind database.", + "name": "target_field", + "required": false, + "serverDefault": "geoip", + "type": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + } + }, + { + "description": "If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created.\nElse, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.", + "name": "download_database_on_pipeline_creation", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "ingest/_types/Processors.ts#L478-L512" }, { "kind": "interface", @@ -143474,7 +143581,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1063-L1078" + "specLocation": "ingest/_types/Processors.ts#L1103-L1118" }, { "kind": "interface", @@ -143553,7 +143660,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1080-L1109" + "specLocation": "ingest/_types/Processors.ts#L1120-L1149" }, { "kind": "enum", @@ -143571,7 +143678,7 @@ "name": "JsonProcessorConflictStrategy", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L1111-L1116" + "specLocation": "ingest/_types/Processors.ts#L1151-L1156" }, { "kind": "interface", @@ -143728,7 +143835,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1118-L1170" + "specLocation": "ingest/_types/Processors.ts#L1158-L1210" }, { "kind": "interface", @@ -143782,7 +143889,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1172-L1188" + "specLocation": "ingest/_types/Processors.ts#L1212-L1228" }, { "kind": "interface", @@ -143898,7 +144005,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1190-L1224" + "specLocation": "ingest/_types/Processors.ts#L1230-L1264" }, { "kind": "interface", @@ -144077,7 +144184,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1226-L1237" + "specLocation": "ingest/_types/Processors.ts#L1266-L1277" }, { "kind": "interface", @@ -144150,7 +144257,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L299-L322" + "specLocation": "ingest/_types/Processors.ts#L303-L326" }, { "kind": "interface", @@ -144383,6 +144490,18 @@ } } }, + { + "description": "Currently an undocumented alias for GeoIP Processor.", + "name": "ip_location", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "IpLocationProcessor", + "namespace": "ingest._types" + } + } + }, { "description": "Converts geo-grid definitions of grid tiles or cells to regular bounding boxes or polygons which describe their shape.\nThis is useful if there is a need to interact with the tile shapes as spatially indexable fields.", "docId": "geo-grid-processor", @@ -144774,7 +144893,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L27-L297", + "specLocation": "ingest/_types/Processors.ts#L27-L301", "variants": { "kind": "container", "nonExhaustive": true @@ -144914,7 +145033,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1239-L1280" + "specLocation": "ingest/_types/Processors.ts#L1279-L1320" }, { "kind": "interface", @@ -144967,7 +145086,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1282-L1298" + "specLocation": "ingest/_types/Processors.ts#L1322-L1338" }, { "kind": "interface", @@ -145020,7 +145139,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1300-L1314" + "specLocation": "ingest/_types/Processors.ts#L1340-L1354" }, { "kind": "interface", @@ -145073,7 +145192,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1316-L1332" + "specLocation": "ingest/_types/Processors.ts#L1356-L1372" }, { "kind": "interface", @@ -145155,7 +145274,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1334-L1362" + "specLocation": "ingest/_types/Processors.ts#L1374-L1402" }, { "kind": "interface", @@ -145227,7 +145346,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1364-L1384" + "specLocation": "ingest/_types/Processors.ts#L1404-L1424" }, { "kind": "interface", @@ -145313,7 +145432,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1386-L1420" + "specLocation": "ingest/_types/Processors.ts#L1426-L1460" }, { "kind": "interface", @@ -145356,7 +145475,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1422-L1431" + "specLocation": "ingest/_types/Processors.ts#L1462-L1471" }, { "kind": "enum", @@ -145372,7 +145491,7 @@ "name": "ShapeType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L1433-L1436" + "specLocation": "ingest/_types/Processors.ts#L1473-L1476" }, { "kind": "interface", @@ -145425,7 +145544,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1438-L1454" + "specLocation": "ingest/_types/Processors.ts#L1478-L1494" }, { "kind": "interface", @@ -145504,7 +145623,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1456-L1481" + "specLocation": "ingest/_types/Processors.ts#L1496-L1521" }, { "kind": "interface", @@ -145519,7 +145638,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Processors.ts#L1483-L1483" + "specLocation": "ingest/_types/Processors.ts#L1523-L1523" }, { "kind": "interface", @@ -145573,7 +145692,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1485-L1501" + "specLocation": "ingest/_types/Processors.ts#L1525-L1541" }, { "kind": "interface", @@ -145627,7 +145746,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1503-L1519" + "specLocation": "ingest/_types/Processors.ts#L1543-L1559" }, { "kind": "interface", @@ -145707,7 +145826,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1539-L1565" + "specLocation": "ingest/_types/Processors.ts#L1579-L1605" }, { "kind": "interface", @@ -145761,7 +145880,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1521-L1537" + "specLocation": "ingest/_types/Processors.ts#L1561-L1577" }, { "kind": "interface", @@ -145874,7 +145993,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L474-L505" + "specLocation": "ingest/_types/Processors.ts#L514-L545" }, { "kind": "enum", @@ -145899,7 +146018,7 @@ "name": "UserAgentProperty", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L507-L513" + "specLocation": "ingest/_types/Processors.ts#L547-L553" }, { "kind": "request", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index cfc8b8edba..a770fe02ae 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12997,6 +12997,16 @@ export interface IngestInferenceProcessor extends IngestProcessorBase { inference_config?: IngestInferenceConfig } +export interface IngestIpLocationProcessor extends IngestProcessorBase { + database_file?: string + field: Field + first_only?: boolean + ignore_missing?: boolean + properties?: string[] + target_field?: Field + download_database_on_pipeline_creation?: boolean +} + export interface IngestJoinProcessor extends IngestProcessorBase { field: Field separator: string @@ -13091,6 +13101,7 @@ export interface IngestProcessorContainer { fail?: IngestFailProcessor fingerprint?: IngestFingerprintProcessor foreach?: IngestForeachProcessor + ip_location?: IngestIpLocationProcessor geo_grid?: IngestGeoGridProcessor geoip?: IngestGeoIpProcessor grok?: IngestGrokProcessor diff --git a/specification/ingest/_types/Processors.ts b/specification/ingest/_types/Processors.ts index 33402841a9..b507d6deec 100644 --- a/specification/ingest/_types/Processors.ts +++ b/specification/ingest/_types/Processors.ts @@ -124,6 +124,10 @@ export class ProcessorContainer { * @doc_id foreach-processor */ foreach?: ForeachProcessor + /** + * Currently an undocumented alias for GeoIP Processor. + */ + ip_location?: IpLocationProcessor /** * Converts geo-grid definitions of grid tiles or cells to regular bounding boxes or polygons which describe their shape. * This is useful if there is a need to interact with the tile shapes as spatially indexable fields. @@ -471,6 +475,42 @@ export class GeoIpProcessor extends ProcessorBase { download_database_on_pipeline_creation?: boolean } +export class IpLocationProcessor extends ProcessorBase { + /** + * The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory. + * @server_default GeoLite2-City.mmdb + */ + database_file?: string + /** + * The field to get the ip address from for the geographical lookup. + */ + field: Field + /** + * If `true`, only the first found IP location data will be returned, even if the field contains an array. + * @server_default true + */ + first_only?: boolean + /** + * If `true` and `field` does not exist, the processor quietly exits without modifying the document. + * @server_default false + */ + ignore_missing?: boolean + /** + * Controls what properties are added to the `target_field` based on the IP location lookup. + */ + properties?: string[] + /** + * The field that will hold the geographical information looked up from the MaxMind database. + * @server_default geoip + */ + target_field?: Field + /** + * If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created. + * Else, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index. + */ + download_database_on_pipeline_creation?: boolean +} + export class UserAgentProcessor extends ProcessorBase { /** * The field containing the user agent string. From d7200dc5f8e68dedcfd91363bab7090060d67d04 Mon Sep 17 00:00:00 2001 From: Margaret Pearce Date: Tue, 12 Nov 2024 00:23:28 -0500 Subject: [PATCH 02/14] Set parameter nodes instead of node_id on task.list (#3113) Co-authored-by: Quentin Pradet --- output/openapi/elasticsearch-openapi.json | 7 ++----- output/schema/schema.json | 13 +++++-------- output/schema/validation-errors.json | 4 +--- output/typescript/types.ts | 2 +- specification/tasks/list/ListTasksRequest.ts | 4 ++-- 5 files changed, 11 insertions(+), 19 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 9ee066462f..60c66ad20c 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -33042,14 +33042,11 @@ }, { "in": "query", - "name": "node_id", + "name": "nodes", "description": "Comma-separated list of node IDs or names used to limit returned information.", "deprecated": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/_types:NodeIds" }, "style": "form" }, diff --git a/output/schema/schema.json b/output/schema/schema.json index cf2312fe1a..7395844be7 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -205966,16 +205966,13 @@ }, { "description": "Comma-separated list of node IDs or names used to limit returned information.", - "name": "node_id", + "name": "nodes", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } + "kind": "instance_of", + "type": { + "name": "NodeIds", + "namespace": "_types" } } }, diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 6533a07c38..9c6cbcafe3 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1180,9 +1180,7 @@ }, "tasks.list": { "request": [ - "Request: query parameter 'node_id' does not exist in the json spec", - "Request: query parameter 'master_timeout' does not exist in the json spec", - "Request: missing json spec query parameter 'nodes'" + "Request: query parameter 'master_timeout' does not exist in the json spec" ], "response": [] }, diff --git a/output/typescript/types.ts b/output/typescript/types.ts index a770fe02ae..4e1be9944d 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -19562,7 +19562,7 @@ export interface TasksListRequest extends RequestBase { actions?: string | string[] detailed?: boolean group_by?: TasksGroupBy - node_id?: string[] + nodes?: NodeIds parent_task_id?: Id master_timeout?: Duration timeout?: Duration diff --git a/specification/tasks/list/ListTasksRequest.ts b/specification/tasks/list/ListTasksRequest.ts index c829cb4a2e..00ba85ef35 100644 --- a/specification/tasks/list/ListTasksRequest.ts +++ b/specification/tasks/list/ListTasksRequest.ts @@ -19,7 +19,7 @@ import { GroupBy } from '@tasks/_types/GroupBy' import { RequestBase } from '@_types/Base' -import { Id } from '@_types/common' +import { Id, NodeIds } from '@_types/common' import { Duration } from '@_types/Time' /** @@ -48,7 +48,7 @@ export interface Request extends RequestBase { /** * Comma-separated list of node IDs or names used to limit returned information. */ - node_id?: string[] + nodes?: NodeIds /** * Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`. */ From eabd5d0de440da4d7fadbf79caae4d3e91903023 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 12 Nov 2024 13:46:31 +0400 Subject: [PATCH 03/14] Enable 8.16 rest-api-spec updates, not 8.15 (#3119) --- .github/workflows/update-rest-api-json.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-rest-api-json.yml b/.github/workflows/update-rest-api-json.yml index 0a4067d623..756248eda6 100644 --- a/.github/workflows/update-rest-api-json.yml +++ b/.github/workflows/update-rest-api-json.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - branch: ['main', '8.x', '8.15', '7.17'] + branch: ['main', '8.x', '8.16', '7.17'] steps: - uses: actions/checkout@v4 From ffb5e7fdcb082950ed5e012fe549d5f10343fa5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 16:53:03 +0400 Subject: [PATCH 04/14] Bump jsonpath-plus and @stoplight/spectral-core (#3120) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 145 ++++++++++++++++++++++++++-------------------- 1 file changed, 83 insertions(+), 62 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8bd812f6b6..f450c044a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@stoplight/spectral-cli": "^6.13.0" + "@stoplight/spectral-cli": "^6.13.1" } }, "node_modules/@asyncapi/specs": { @@ -17,10 +17,21 @@ "@types/json-schema": "^7.0.11" } }, + "node_modules/@jsep-plugin/assignment": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz", + "integrity": "sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, "node_modules/@jsep-plugin/regex": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.3.tgz", - "integrity": "sha512-XfZgry4DwEZvSFtS/6Y+R48D7qJYJK6R9/yJFyUFHCIUMEEHuJ4X95TDgJp5QkmzfLYvapMPzskV5HpIDrREug==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz", + "integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==", "engines": { "node": ">= 10.16.0" }, @@ -29,9 +40,9 @@ } }, "node_modules/@jsep-plugin/ternary": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@jsep-plugin/ternary/-/ternary-1.1.3.tgz", - "integrity": "sha512-qtLGzCNzPVJ3kdH6/zoLWDPjauHIKiLSBAR71Wa0+PWvGA8wODUQvRgxtpUA5YqAYL3CQ8S4qXhd/9WuWTZirg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@jsep-plugin/ternary/-/ternary-1.1.4.tgz", + "integrity": "sha512-ck5wiqIbqdMX6WRQztBL7ASDty9YLgJ3sSAK5ZpBzXeySvFGCzIvM6UiAI4hTZ22fEcYQVV/zhUbNscggW+Ukg==", "engines": { "node": ">= 10.16.0" }, @@ -200,19 +211,18 @@ } }, "node_modules/@stoplight/spectral-cli": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-cli/-/spectral-cli-6.13.0.tgz", - "integrity": "sha512-qofxmVN4czNNJdfq0OB8Qj1ihpIhyR0IgyQpJFda9FvWWn9vJqDuIsoGKWP7xIHwv3E31q3iviDIX3Ejy9tNcg==", - "license": "Apache-2.0", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-cli/-/spectral-cli-6.14.0.tgz", + "integrity": "sha512-pq1qWENLtI97afz9Ygx0TtBXj9s97oQnjMOUp4USzXdnxhKhlYwlhJIA9U3VYzktA+QpHdTXVd4GSgyxdHSBSg==", "dependencies": { "@stoplight/json": "~3.21.0", "@stoplight/path": "1.3.2", - "@stoplight/spectral-core": "^1.18.3", - "@stoplight/spectral-formatters": "^1.3.0", - "@stoplight/spectral-parsers": "^1.0.3", + "@stoplight/spectral-core": "^1.19.2", + "@stoplight/spectral-formatters": "^1.4.0", + "@stoplight/spectral-parsers": "^1.0.4", "@stoplight/spectral-ref-resolver": "^1.0.4", - "@stoplight/spectral-ruleset-bundler": "^1.5.4", - "@stoplight/spectral-ruleset-migrator": "^1.9.6", + "@stoplight/spectral-ruleset-bundler": "^1.6.0", + "@stoplight/spectral-ruleset-migrator": "^1.11.0", "@stoplight/spectral-rulesets": ">=1", "@stoplight/spectral-runtime": "^1.1.2", "@stoplight/types": "^13.6.0", @@ -229,38 +239,38 @@ "spectral": "dist/index.js" }, "engines": { - "node": "^12.20 || >= 14.13" + "node": "^16.20 || ^18.18 || >= 20.17" } }, "node_modules/@stoplight/spectral-core": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.18.3.tgz", - "integrity": "sha512-YY8x7X2SWJIhGTLPol+eFiQpWPz0D0mJdkK2i4A0QJG68KkNhypP6+JBC7/Kz3XWjqr0L/RqAd+N5cQLPOKZGQ==", + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.19.2.tgz", + "integrity": "sha512-Yx1j7d0VGEbsOCimPgl+L8w7ZuuOaxqGvXSUXgm9weoGR5idLQjPaTuHLdfdziR1gjqQdVTCEk/dN0cFfUKhow==", "dependencies": { "@stoplight/better-ajv-errors": "1.0.3", "@stoplight/json": "~3.21.0", "@stoplight/path": "1.3.2", "@stoplight/spectral-parsers": "^1.0.0", - "@stoplight/spectral-ref-resolver": "^1.0.0", + "@stoplight/spectral-ref-resolver": "^1.0.4", "@stoplight/spectral-runtime": "^1.0.0", "@stoplight/types": "~13.6.0", "@types/es-aggregate-error": "^1.0.2", "@types/json-schema": "^7.0.11", - "ajv": "^8.6.0", + "ajv": "^8.17.1", "ajv-errors": "~3.0.0", "ajv-formats": "~2.1.0", "es-aggregate-error": "^1.0.7", - "jsonpath-plus": "7.1.0", + "jsonpath-plus": "10.1.0", "lodash": "~4.17.21", "lodash.topath": "^4.5.2", "minimatch": "3.1.2", - "nimma": "0.2.2", + "nimma": "0.2.3", "pony-cause": "^1.0.0", - "simple-eval": "1.0.0", + "simple-eval": "1.0.1", "tslib": "^2.3.0" }, "engines": { - "node": "^12.20 || >= 14.13" + "node": "^16.20 || ^18.18 || >= 20.17" } }, "node_modules/@stoplight/spectral-core/node_modules/@stoplight/types": { @@ -291,17 +301,19 @@ } }, "node_modules/@stoplight/spectral-formatters": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-formatters/-/spectral-formatters-1.3.0.tgz", - "integrity": "sha512-ryuMwlzbPUuyn7ybSEbFYsljYmvTaTyD51wyCQs4ROzgfm3Yo5QDD0IsiJUzUpKK/Ml61ZX8ebgiPiRFEJtBpg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-formatters/-/spectral-formatters-1.4.0.tgz", + "integrity": "sha512-nxYQldDzVg32pxQ4cMX27eMtB1A39ea+GSf0wIJ20mqkSBfIgLnRZ+GKkBxhgF9JzSolc4YtweydsubGQGd7ag==", "dependencies": { "@stoplight/path": "^1.3.2", "@stoplight/spectral-core": "^1.15.1", "@stoplight/spectral-runtime": "^1.1.0", "@stoplight/types": "^13.15.0", + "@types/markdown-escape": "^1.1.3", "chalk": "4.1.2", "cliui": "7.0.4", "lodash": "^4.17.21", + "markdown-escape": "^2.0.0", "node-sarif-builder": "^2.0.3", "strip-ansi": "6.0", "text-table": "^0.2.0", @@ -402,10 +414,9 @@ } }, "node_modules/@stoplight/spectral-ruleset-migrator": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-ruleset-migrator/-/spectral-ruleset-migrator-1.10.0.tgz", - "integrity": "sha512-nDfkVfYeWWv0UvILC4TWZSnRqQ4rHgeOJO1/lHQ7XHeG5iONanQ639B1aK6ZS6vuUc8gwuyQsrPF67b4sHIyYw==", - "license": "Apache-2.0", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-ruleset-migrator/-/spectral-ruleset-migrator-1.11.0.tgz", + "integrity": "sha512-FHxc/C/RhEYXW8zcp9mO50/jt+0Of6p6ZFVoV84l9y7agQchc9RGFjN6src4kO7bg6eUWQK6+5rUIV6yFKhBgg==", "dependencies": { "@stoplight/json": "~3.21.0", "@stoplight/ordered-object-literal": "~1.0.4", @@ -417,13 +428,13 @@ "@types/node": "*", "ajv": "^8.17.1", "ast-types": "0.14.2", - "astring": "^1.7.5", + "astring": "^1.9.0", "reserved": "0.1.2", "tslib": "^2.3.1", "validate-npm-package-name": "3.0.0" }, "engines": { - "node": ">=12" + "node": "^16.20 || ^18.18 || >= 20.17" } }, "node_modules/@stoplight/spectral-ruleset-migrator/node_modules/@stoplight/yaml": { @@ -564,6 +575,11 @@ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, + "node_modules/@types/markdown-escape": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/markdown-escape/-/markdown-escape-1.1.3.tgz", + "integrity": "sha512-JIc1+s3y5ujKnt/+N+wq6s/QdL2qZ11fP79MijrVXsAAnzSxCbT2j/3prHRouJdZ2yFLN3vkP0HytfnoCczjOw==" + }, "node_modules/@types/node": { "version": "20.14.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.7.tgz", @@ -726,9 +742,9 @@ } }, "node_modules/astring": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/astring/-/astring-1.8.6.tgz", - "integrity": "sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/astring/-/astring-1.9.0.tgz", + "integrity": "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==", "bin": { "astring": "bin/astring" } @@ -1718,9 +1734,9 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, "node_modules/jsep": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.3.8.tgz", - "integrity": "sha512-qofGylTGgYj9gZFsHuyWAN4jr35eJ66qJCK4eKDnldohuUoQFbU3iZn2zjvEbd9wOAhP9Wx5DsAAduTyE1PSWQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz", + "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==", "engines": { "node": ">= 10.16.0" } @@ -1747,11 +1763,20 @@ } }, "node_modules/jsonpath-plus": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.1.0.tgz", - "integrity": "sha512-gTaNRsPWO/K2KY6MrqaUFClF9kmuM6MFH5Dhg1VYDODgFbByw1yb7xu3hrViE/sz+dGOeMWgCzwUwQtAnCTE9g==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", + "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "dependencies": { + "@jsep-plugin/assignment": "^1.2.1", + "@jsep-plugin/regex": "^1.0.3", + "jsep": "^1.3.9" + }, + "bin": { + "jsonpath": "bin/jsonpath-cli.js", + "jsonpath-plus": "bin/jsonpath-cli.js" + }, "engines": { - "node": ">=12.0.0" + "node": ">=18.0.0" } }, "node_modules/jsonpointer": { @@ -1789,6 +1814,11 @@ "sourcemap-codec": "^1.4.8" } }, + "node_modules/markdown-escape": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-escape/-/markdown-escape-2.0.0.tgz", + "integrity": "sha512-Trz4v0+XWlwy68LJIyw3bLbsJiC8XAbRCKF9DbEtZjyndKOGVx6n+wNB0VfoRmY2LKboQLeniap3xrb6LGSJ8A==" + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -1821,9 +1851,9 @@ } }, "node_modules/nimma": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/nimma/-/nimma-0.2.2.tgz", - "integrity": "sha512-V52MLl7BU+tH2Np9tDrIXK8bql3MVUadnMIl/0/oZSGC9keuro0O9UUv9QKp0aMvtN8HRew4G7byY7H4eWsxaQ==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/nimma/-/nimma-0.2.3.tgz", + "integrity": "sha512-1ZOI8J+1PKKGceo/5CT5GfQOG6H8I2BencSK06YarZ2wXwH37BSSUWldqJmMJYA5JfqDqffxDXynt6f11AyKcA==", "dependencies": { "@jsep-plugin/regex": "^1.0.1", "@jsep-plugin/ternary": "^1.0.2", @@ -1834,19 +1864,10 @@ "node": "^12.20 || >=14.13" }, "optionalDependencies": { - "jsonpath-plus": "^6.0.1", + "jsonpath-plus": "^6.0.1 || ^10.1.0", "lodash.topath": "^4.5.2" } }, - "node_modules/nimma/node_modules/jsonpath-plus": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-6.0.1.tgz", - "integrity": "sha512-EvGovdvau6FyLexFH2OeXfIITlgIbgZoAZe3usiySeaIDm5QS+A10DKNpaPBBqqRSZr2HN6HVNXxtwUAr2apEw==", - "optional": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -2175,11 +2196,11 @@ } }, "node_modules/simple-eval": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-eval/-/simple-eval-1.0.0.tgz", - "integrity": "sha512-kpKJR+bqTscgC0xuAl2xHN6bB12lHjC2DCUfqjAx19bQyO3R2EVLOurm3H9AUltv/uFVcSCVNc6faegR+8NYLw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-eval/-/simple-eval-1.0.1.tgz", + "integrity": "sha512-LH7FpTAkeD+y5xQC4fzS+tFtaNlvt3Ib1zKzvhjv/Y+cioV4zIuw4IZr2yhRLu67CWL7FR9/6KXKnjRoZTvGGQ==", "dependencies": { - "jsep": "^1.1.2" + "jsep": "^1.3.6" }, "engines": { "node": ">=12" From 55d431ab4ffe02043ba6f6a41d27f14542f4c792 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 17:14:59 +0400 Subject: [PATCH 05/14] Bump jsonpath-plus and @stoplight/spectral-core (#3124) Bumps [jsonpath-plus](https://github.com/s3u/JSONPath) and [@stoplight/spectral-core](https://github.com/stoplightio/spectral). These dependencies needed to be updated together. Updates `jsonpath-plus` from 7.1.0 to 10.1.0 - [Release notes](https://github.com/s3u/JSONPath/releases) - [Changelog](https://github.com/JSONPath-Plus/JSONPath/blob/main/CHANGES.md) - [Commits](https://github.com/s3u/JSONPath/compare/v7.1.0...v10.1.0) Updates `@stoplight/spectral-core` from 1.18.3 to 1.19.2 - [Release notes](https://github.com/stoplightio/spectral/releases) - [Changelog](https://github.com/stoplightio/spectral/blob/develop/CHANGELOG.md) - [Commits](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-core-1.18.3...@stoplight/spectral-core-1.19.2) --- updated-dependencies: - dependency-name: jsonpath-plus dependency-type: indirect - dependency-name: "@stoplight/spectral-core" dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../package-lock.json | 227 +++++++++--------- 1 file changed, 111 insertions(+), 116 deletions(-) diff --git a/compiler-rs/clients_schema_to_openapi/package-lock.json b/compiler-rs/clients_schema_to_openapi/package-lock.json index 64fc3ef1bc..0f2dd98fb2 100644 --- a/compiler-rs/clients_schema_to_openapi/package-lock.json +++ b/compiler-rs/clients_schema_to_openapi/package-lock.json @@ -29,10 +29,21 @@ "heap": ">= 0.2.0" } }, + "node_modules/@jsep-plugin/assignment": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz", + "integrity": "sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, "node_modules/@jsep-plugin/regex": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.3.tgz", - "integrity": "sha512-XfZgry4DwEZvSFtS/6Y+R48D7qJYJK6R9/yJFyUFHCIUMEEHuJ4X95TDgJp5QkmzfLYvapMPzskV5HpIDrREug==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz", + "integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==", "engines": { "node": ">= 10.16.0" }, @@ -41,9 +52,9 @@ } }, "node_modules/@jsep-plugin/ternary": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@jsep-plugin/ternary/-/ternary-1.1.3.tgz", - "integrity": "sha512-qtLGzCNzPVJ3kdH6/zoLWDPjauHIKiLSBAR71Wa0+PWvGA8wODUQvRgxtpUA5YqAYL3CQ8S4qXhd/9WuWTZirg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@jsep-plugin/ternary/-/ternary-1.1.4.tgz", + "integrity": "sha512-ck5wiqIbqdMX6WRQztBL7ASDty9YLgJ3sSAK5ZpBzXeySvFGCzIvM6UiAI4hTZ22fEcYQVV/zhUbNscggW+Ukg==", "engines": { "node": ">= 10.16.0" }, @@ -241,34 +252,34 @@ } }, "node_modules/@stoplight/spectral-core": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.18.3.tgz", - "integrity": "sha512-YY8x7X2SWJIhGTLPol+eFiQpWPz0D0mJdkK2i4A0QJG68KkNhypP6+JBC7/Kz3XWjqr0L/RqAd+N5cQLPOKZGQ==", + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.19.2.tgz", + "integrity": "sha512-Yx1j7d0VGEbsOCimPgl+L8w7ZuuOaxqGvXSUXgm9weoGR5idLQjPaTuHLdfdziR1gjqQdVTCEk/dN0cFfUKhow==", "dependencies": { "@stoplight/better-ajv-errors": "1.0.3", "@stoplight/json": "~3.21.0", "@stoplight/path": "1.3.2", "@stoplight/spectral-parsers": "^1.0.0", - "@stoplight/spectral-ref-resolver": "^1.0.0", + "@stoplight/spectral-ref-resolver": "^1.0.4", "@stoplight/spectral-runtime": "^1.0.0", "@stoplight/types": "~13.6.0", "@types/es-aggregate-error": "^1.0.2", "@types/json-schema": "^7.0.11", - "ajv": "^8.6.0", + "ajv": "^8.17.1", "ajv-errors": "~3.0.0", "ajv-formats": "~2.1.0", "es-aggregate-error": "^1.0.7", - "jsonpath-plus": "7.1.0", + "jsonpath-plus": "10.1.0", "lodash": "~4.17.21", "lodash.topath": "^4.5.2", "minimatch": "3.1.2", - "nimma": "0.2.2", + "nimma": "0.2.3", "pony-cause": "^1.0.0", - "simple-eval": "1.0.0", + "simple-eval": "1.0.1", "tslib": "^2.3.0" }, "engines": { - "node": "^12.20 || >= 14.13" + "node": "^16.20 || ^18.18 || >= 20.17" } }, "node_modules/@stoplight/spectral-core/node_modules/@stoplight/types": { @@ -541,14 +552,14 @@ } }, "node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -975,6 +986,11 @@ "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz", "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==" }, + "node_modules/fast-uri": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", + "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==" + }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -1502,9 +1518,9 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, "node_modules/jsep": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.3.8.tgz", - "integrity": "sha512-qofGylTGgYj9gZFsHuyWAN4jr35eJ66qJCK4eKDnldohuUoQFbU3iZn2zjvEbd9wOAhP9Wx5DsAAduTyE1PSWQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz", + "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==", "engines": { "node": ">= 10.16.0" } @@ -1536,11 +1552,20 @@ "integrity": "sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==" }, "node_modules/jsonpath-plus": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.1.0.tgz", - "integrity": "sha512-gTaNRsPWO/K2KY6MrqaUFClF9kmuM6MFH5Dhg1VYDODgFbByw1yb7xu3hrViE/sz+dGOeMWgCzwUwQtAnCTE9g==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", + "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "dependencies": { + "@jsep-plugin/assignment": "^1.2.1", + "@jsep-plugin/regex": "^1.0.3", + "jsep": "^1.3.9" + }, + "bin": { + "jsonpath": "bin/jsonpath-cli.js", + "jsonpath-plus": "bin/jsonpath-cli.js" + }, "engines": { - "node": ">=12.0.0" + "node": ">=18.0.0" } }, "node_modules/jsonpointer": { @@ -1610,9 +1635,9 @@ } }, "node_modules/nimma": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/nimma/-/nimma-0.2.2.tgz", - "integrity": "sha512-V52MLl7BU+tH2Np9tDrIXK8bql3MVUadnMIl/0/oZSGC9keuro0O9UUv9QKp0aMvtN8HRew4G7byY7H4eWsxaQ==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/nimma/-/nimma-0.2.3.tgz", + "integrity": "sha512-1ZOI8J+1PKKGceo/5CT5GfQOG6H8I2BencSK06YarZ2wXwH37BSSUWldqJmMJYA5JfqDqffxDXynt6f11AyKcA==", "dependencies": { "@jsep-plugin/regex": "^1.0.1", "@jsep-plugin/ternary": "^1.0.2", @@ -1623,19 +1648,10 @@ "node": "^12.20 || >=14.13" }, "optionalDependencies": { - "jsonpath-plus": "^6.0.1", + "jsonpath-plus": "^6.0.1 || ^10.1.0", "lodash.topath": "^4.5.2" } }, - "node_modules/nimma/node_modules/jsonpath-plus": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-6.0.1.tgz", - "integrity": "sha512-EvGovdvau6FyLexFH2OeXfIITlgIbgZoAZe3usiySeaIDm5QS+A10DKNpaPBBqqRSZr2HN6HVNXxtwUAr2apEw==", - "optional": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -1733,14 +1749,6 @@ "resolved": "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz", "integrity": "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==" }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "engines": { - "node": ">=6" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -1910,11 +1918,11 @@ } }, "node_modules/simple-eval": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-eval/-/simple-eval-1.0.0.tgz", - "integrity": "sha512-kpKJR+bqTscgC0xuAl2xHN6bB12lHjC2DCUfqjAx19bQyO3R2EVLOurm3H9AUltv/uFVcSCVNc6faegR+8NYLw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-eval/-/simple-eval-1.0.1.tgz", + "integrity": "sha512-LH7FpTAkeD+y5xQC4fzS+tFtaNlvt3Ib1zKzvhjv/Y+cioV4zIuw4IZr2yhRLu67CWL7FR9/6KXKnjRoZTvGGQ==", "dependencies": { - "jsep": "^1.1.2" + "jsep": "^1.3.6" }, "engines": { "node": ">=12" @@ -2132,14 +2140,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/urijs": { "version": "1.19.11", "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", @@ -2285,16 +2285,22 @@ "heap": ">= 0.2.0" } }, + "@jsep-plugin/assignment": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz", + "integrity": "sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==", + "requires": {} + }, "@jsep-plugin/regex": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.3.tgz", - "integrity": "sha512-XfZgry4DwEZvSFtS/6Y+R48D7qJYJK6R9/yJFyUFHCIUMEEHuJ4X95TDgJp5QkmzfLYvapMPzskV5HpIDrREug==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz", + "integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==", "requires": {} }, "@jsep-plugin/ternary": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@jsep-plugin/ternary/-/ternary-1.1.3.tgz", - "integrity": "sha512-qtLGzCNzPVJ3kdH6/zoLWDPjauHIKiLSBAR71Wa0+PWvGA8wODUQvRgxtpUA5YqAYL3CQ8S4qXhd/9WuWTZirg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@jsep-plugin/ternary/-/ternary-1.1.4.tgz", + "integrity": "sha512-ck5wiqIbqdMX6WRQztBL7ASDty9YLgJ3sSAK5ZpBzXeySvFGCzIvM6UiAI4hTZ22fEcYQVV/zhUbNscggW+Ukg==", "requires": {} }, "@nodelib/fs.scandir": { @@ -2443,30 +2449,30 @@ } }, "@stoplight/spectral-core": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.18.3.tgz", - "integrity": "sha512-YY8x7X2SWJIhGTLPol+eFiQpWPz0D0mJdkK2i4A0QJG68KkNhypP6+JBC7/Kz3XWjqr0L/RqAd+N5cQLPOKZGQ==", + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.19.2.tgz", + "integrity": "sha512-Yx1j7d0VGEbsOCimPgl+L8w7ZuuOaxqGvXSUXgm9weoGR5idLQjPaTuHLdfdziR1gjqQdVTCEk/dN0cFfUKhow==", "requires": { "@stoplight/better-ajv-errors": "1.0.3", "@stoplight/json": "~3.21.0", "@stoplight/path": "1.3.2", "@stoplight/spectral-parsers": "^1.0.0", - "@stoplight/spectral-ref-resolver": "^1.0.0", + "@stoplight/spectral-ref-resolver": "^1.0.4", "@stoplight/spectral-runtime": "^1.0.0", "@stoplight/types": "~13.6.0", "@types/es-aggregate-error": "^1.0.2", "@types/json-schema": "^7.0.11", - "ajv": "^8.6.0", + "ajv": "^8.17.1", "ajv-errors": "~3.0.0", "ajv-formats": "~2.1.0", "es-aggregate-error": "^1.0.7", - "jsonpath-plus": "7.1.0", + "jsonpath-plus": "10.1.0", "lodash": "~4.17.21", "lodash.topath": "^4.5.2", "minimatch": "3.1.2", - "nimma": "0.2.2", + "nimma": "0.2.3", "pony-cause": "^1.0.0", - "simple-eval": "1.0.0", + "simple-eval": "1.0.1", "tslib": "^2.3.0" }, "dependencies": { @@ -2702,14 +2708,14 @@ } }, "ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "requires": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" } }, "ajv-draft-04": { @@ -3025,6 +3031,11 @@ "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz", "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==" }, + "fast-uri": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", + "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==" + }, "fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -3382,9 +3393,9 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, "jsep": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.3.8.tgz", - "integrity": "sha512-qofGylTGgYj9gZFsHuyWAN4jr35eJ66qJCK4eKDnldohuUoQFbU3iZn2zjvEbd9wOAhP9Wx5DsAAduTyE1PSWQ==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz", + "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==" }, "json-diff": { "version": "1.0.6", @@ -3407,9 +3418,14 @@ "integrity": "sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==" }, "jsonpath-plus": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.1.0.tgz", - "integrity": "sha512-gTaNRsPWO/K2KY6MrqaUFClF9kmuM6MFH5Dhg1VYDODgFbByw1yb7xu3hrViE/sz+dGOeMWgCzwUwQtAnCTE9g==" + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.1.0.tgz", + "integrity": "sha512-gHfV1IYqH8uJHYVTs8BJX1XKy2/rR93+f8QQi0xhx95aCiXn1ettYAd5T+7FU6wfqyDoX/wy0pm/fL3jOKJ9Lg==", + "requires": { + "@jsep-plugin/assignment": "^1.2.1", + "@jsep-plugin/regex": "^1.0.3", + "jsep": "^1.3.9" + } }, "jsonpointer": { "version": "5.0.1", @@ -3462,24 +3478,16 @@ } }, "nimma": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/nimma/-/nimma-0.2.2.tgz", - "integrity": "sha512-V52MLl7BU+tH2Np9tDrIXK8bql3MVUadnMIl/0/oZSGC9keuro0O9UUv9QKp0aMvtN8HRew4G7byY7H4eWsxaQ==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/nimma/-/nimma-0.2.3.tgz", + "integrity": "sha512-1ZOI8J+1PKKGceo/5CT5GfQOG6H8I2BencSK06YarZ2wXwH37BSSUWldqJmMJYA5JfqDqffxDXynt6f11AyKcA==", "requires": { "@jsep-plugin/regex": "^1.0.1", "@jsep-plugin/ternary": "^1.0.2", "astring": "^1.8.1", "jsep": "^1.2.0", - "jsonpath-plus": "^6.0.1", + "jsonpath-plus": "^6.0.1 || ^10.1.0", "lodash.topath": "^4.5.2" - }, - "dependencies": { - "jsonpath-plus": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-6.0.1.tgz", - "integrity": "sha512-EvGovdvau6FyLexFH2OeXfIITlgIbgZoAZe3usiySeaIDm5QS+A10DKNpaPBBqqRSZr2HN6HVNXxtwUAr2apEw==", - "optional": true - } } }, "node-fetch": { @@ -3544,11 +3552,6 @@ "resolved": "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz", "integrity": "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==" }, - "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" - }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -3647,11 +3650,11 @@ } }, "simple-eval": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-eval/-/simple-eval-1.0.0.tgz", - "integrity": "sha512-kpKJR+bqTscgC0xuAl2xHN6bB12lHjC2DCUfqjAx19bQyO3R2EVLOurm3H9AUltv/uFVcSCVNc6faegR+8NYLw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-eval/-/simple-eval-1.0.1.tgz", + "integrity": "sha512-LH7FpTAkeD+y5xQC4fzS+tFtaNlvt3Ib1zKzvhjv/Y+cioV4zIuw4IZr2yhRLu67CWL7FR9/6KXKnjRoZTvGGQ==", "requires": { - "jsep": "^1.1.2" + "jsep": "^1.3.6" } }, "source-map": { @@ -3811,14 +3814,6 @@ "which-boxed-primitive": "^1.0.2" } }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, "urijs": { "version": "1.19.11", "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", From dac7201aa2a52228954f70195c478647caeae7c1 Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Thu, 14 Nov 2024 13:40:44 -0600 Subject: [PATCH 06/14] Support for security remote_cluster and associated privileges (#3125) This commit adds support for the remote_cluster in the role and role descriptors. Additionally: * adds missing references to remote_indices * add new cluster privilege monitor_stats * adds related version information where applicable * updates references to cluster from string[] to proper enumeration --- output/schema/schema.json | 269 ++++++++++++++++-- output/typescript/types.ts | 21 +- package.json | 2 +- specification/security/_types/Privileges.ts | 36 +++ .../security/_types/RoleDescriptor.ts | 28 +- .../SecurityGetBuiltinPrivilegesResponse.ts | 10 +- specification/security/get_role/types.ts | 15 +- .../put_role/SecurityPutRoleRequest.ts | 7 + 8 files changed, 357 insertions(+), 31 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 7395844be7..dee25fcbb2 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -187017,7 +187017,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L372-L374" + "specLocation": "security/_types/Privileges.ts#L408-L410" }, { "kind": "interface", @@ -187339,6 +187339,12 @@ }, "name": "monitor_snapshot" }, + { + "availability": { + "stack": {} + }, + "name": "monitor_stats" + }, { "availability": { "stack": {} @@ -187413,7 +187419,7 @@ "name": "ClusterPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L42-L195" + "specLocation": "security/_types/Privileges.ts#L42-L199" }, { "kind": "interface", @@ -187534,7 +187540,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L368-L370" + "specLocation": "security/_types/Privileges.ts#L404-L406" }, { "kind": "enum", @@ -187647,7 +187653,7 @@ "name": "IndexPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L324-L366" + "specLocation": "security/_types/Privileges.ts#L360-L402" }, { "kind": "interface", @@ -187729,7 +187735,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L198-L222" + "specLocation": "security/_types/Privileges.ts#L217-L241" }, { "kind": "type_alias", @@ -187743,7 +187749,7 @@ "name": "IndicesPrivilegesQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L279-L287", + "specLocation": "security/_types/Privileges.ts#L315-L323", "type": { "kind": "union_of", "items": [ @@ -187793,7 +187799,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L376-L378" + "specLocation": "security/_types/Privileges.ts#L412-L414" }, { "kind": "interface", @@ -187827,8 +187833,73 @@ ], "specLocation": "security/_types/RealmInfo.ts#L22-L25" }, + { + "kind": "enum", + "members": [ + { + "availability": { + "stack": { + "since": "8.14.0" + } + }, + "name": "monitor_enrich" + }, + { + "availability": { + "stack": { + "since": "8.17.0" + } + }, + "name": "monitor_stats" + } + ], + "name": { + "name": "RemoteClusterPrivilege", + "namespace": "security._types" + }, + "specLocation": "security/_types/Privileges.ts#L201-L214" + }, + { + "kind": "interface", + "description": "The subset of cluster level privileges that can be defined for remote clusters.", + "name": { + "name": "RemoteClusterPrivileges", + "namespace": "security._types" + }, + "properties": [ + { + "description": "A list of cluster aliases to which the permissions in this entry apply.", + "name": "clusters", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Names", + "namespace": "_types" + } + } + }, + { + "description": "The cluster level privileges that owners of the role have on the remote cluster.", + "name": "privileges", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RemoteClusterPrivilege", + "namespace": "security._types" + } + } + } + } + ], + "specLocation": "security/_types/Privileges.ts#L277-L289" + }, { "kind": "interface", + "description": "The subset of index level privileges that can be defined for remote clusters.", "name": { "name": "RemoteIndicesPrivileges", "namespace": "security._types" @@ -187919,7 +187990,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L225-L253" + "specLocation": "security/_types/Privileges.ts#L243-L275" }, { "kind": "interface", @@ -187944,7 +188015,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L380-L385" + "specLocation": "security/_types/Privileges.ts#L416-L421" }, { "kind": "interface", @@ -187986,6 +188057,46 @@ } } }, + { + "availability": { + "stack": { + "since": "8.14.0" + } + }, + "description": "A list of indices permissions for remote clusters.", + "name": "remote_indices", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RemoteIndicesPrivileges", + "namespace": "security._types" + } + } + } + }, + { + "availability": { + "stack": { + "since": "8.15.0" + } + }, + "description": "A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions.", + "name": "remote_cluster", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RemoteClusterPrivileges", + "namespace": "security._types" + } + } + } + }, { "availability": { "stack": {} @@ -188091,7 +188202,7 @@ } } ], - "specLocation": "security/_types/RoleDescriptor.ts#L31-L64" + "specLocation": "security/_types/RoleDescriptor.ts#L33-L79" }, { "kind": "interface", @@ -188153,6 +188264,46 @@ } } }, + { + "availability": { + "stack": { + "since": "8.14.0" + } + }, + "description": "A list of indices permissions for remote clusters.", + "name": "remote_indices", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RemoteIndicesPrivileges", + "namespace": "security._types" + } + } + } + }, + { + "availability": { + "stack": { + "since": "8.15.0" + } + }, + "description": "A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions.", + "name": "remote_cluster", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RemoteClusterPrivileges", + "namespace": "security._types" + } + } + } + }, { "availability": { "stack": {} @@ -188258,7 +188409,7 @@ } } ], - "specLocation": "security/_types/RoleDescriptor.ts#L66-L98" + "specLocation": "security/_types/RoleDescriptor.ts#L81-L124" }, { "kind": "interface", @@ -188436,7 +188587,7 @@ "name": "RoleTemplateInlineQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L321-L322", + "specLocation": "security/_types/Privileges.ts#L357-L358", "type": { "kind": "union_of", "items": [ @@ -188479,7 +188630,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L289-L299" + "specLocation": "security/_types/Privileges.ts#L325-L335" }, { "kind": "interface", @@ -188567,7 +188718,7 @@ } ], "shortcutProperty": "source", - "specLocation": "security/_types/Privileges.ts#L301-L319" + "specLocation": "security/_types/Privileges.ts#L337-L355" }, { "kind": "interface", @@ -188634,7 +188785,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L387-L407" + "specLocation": "security/_types/Privileges.ts#L423-L443" }, { "kind": "enum", @@ -188848,7 +188999,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L255-L277" + "specLocation": "security/_types/Privileges.ts#L291-L313" }, { "kind": "interface", @@ -191843,8 +191994,8 @@ "value": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ClusterPrivilege", + "namespace": "security._types" } } } @@ -191862,6 +192013,20 @@ } } } + }, + { + "name": "remote_cluster", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RemoteClusterPrivilege", + "namespace": "security._types" + } + } + } } ] }, @@ -191869,7 +192034,7 @@ "name": "Response", "namespace": "security.get_builtin_privileges" }, - "specLocation": "security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L22-L24" + "specLocation": "security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L26-L32" }, { "kind": "request", @@ -192039,8 +192204,8 @@ "value": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ClusterPrivilege", + "namespace": "security._types" } } } @@ -192059,6 +192224,44 @@ } } }, + { + "availability": { + "stack": { + "since": "8.14.0" + } + }, + "name": "remote_indices", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RemoteIndicesPrivileges", + "namespace": "security._types" + } + } + } + }, + { + "availability": { + "stack": { + "since": "8.15.0" + } + }, + "name": "remote_cluster", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RemoteClusterPrivileges", + "namespace": "security._types" + } + } + } + }, { "name": "metadata", "required": true, @@ -192184,7 +192387,7 @@ } } ], - "specLocation": "security/get_role/types.ts#L29-L42" + "specLocation": "security/get_role/types.ts#L32-L53" }, { "kind": "request", @@ -194650,6 +194853,26 @@ } } }, + { + "availability": { + "stack": { + "since": "8.15.0" + } + }, + "description": "A list of remote cluster permissions entries.", + "name": "remote_cluster", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RemoteClusterPrivileges", + "namespace": "security._types" + } + } + } + }, { "description": "Optional metadata. Within the metadata object, keys that begin with an underscore (`_`) are reserved for system use.", "name": "metadata", @@ -194751,7 +194974,7 @@ } } ], - "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L31-L95" + "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L32-L102" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 4e1be9944d..beb214d697 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -17638,7 +17638,7 @@ export interface SecurityClusterNode { name: Name } -export type SecurityClusterPrivilege = 'all' | 'cancel_task' | 'create_snapshot' | 'cross_cluster_replication' | 'cross_cluster_search' | 'delegate_pki' | 'grant_api_key' | 'manage' | 'manage_api_key' | 'manage_autoscaling' | 'manage_behavioral_analytics' | 'manage_ccr' | 'manage_data_frame_transforms' | 'manage_data_stream_global_retention' | 'manage_enrich' | 'manage_ilm' | 'manage_index_templates' | 'manage_inference' | 'manage_ingest_pipelines' | 'manage_logstash_pipelines' | 'manage_ml' | 'manage_oidc' | 'manage_own_api_key' | 'manage_pipeline' | 'manage_rollup' | 'manage_saml' | 'manage_search_application' | 'manage_search_query_rules' | 'manage_search_synonyms' | 'manage_security' | 'manage_service_account' | 'manage_slm' | 'manage_token' | 'manage_transform' | 'manage_user_profile' | 'manage_watcher' | 'monitor' | 'monitor_data_frame_transforms' | 'monitor_data_stream_global_retention' | 'monitor_enrich' | 'monitor_inference' | 'monitor_ml' | 'monitor_rollup' | 'monitor_snapshot' | 'monitor_text_structure' | 'monitor_transform' | 'monitor_watcher' | 'none' | 'post_behavioral_analytics_event' | 'read_ccr' | 'read_fleet_secrets' | 'read_ilm' | 'read_pipeline' | 'read_security' | 'read_slm' | 'transport_client' | 'write_connector_secrets' | 'write_fleet_secrets'| string +export type SecurityClusterPrivilege = 'all' | 'cancel_task' | 'create_snapshot' | 'cross_cluster_replication' | 'cross_cluster_search' | 'delegate_pki' | 'grant_api_key' | 'manage' | 'manage_api_key' | 'manage_autoscaling' | 'manage_behavioral_analytics' | 'manage_ccr' | 'manage_data_frame_transforms' | 'manage_data_stream_global_retention' | 'manage_enrich' | 'manage_ilm' | 'manage_index_templates' | 'manage_inference' | 'manage_ingest_pipelines' | 'manage_logstash_pipelines' | 'manage_ml' | 'manage_oidc' | 'manage_own_api_key' | 'manage_pipeline' | 'manage_rollup' | 'manage_saml' | 'manage_search_application' | 'manage_search_query_rules' | 'manage_search_synonyms' | 'manage_security' | 'manage_service_account' | 'manage_slm' | 'manage_token' | 'manage_transform' | 'manage_user_profile' | 'manage_watcher' | 'monitor' | 'monitor_data_frame_transforms' | 'monitor_data_stream_global_retention' | 'monitor_enrich' | 'monitor_inference' | 'monitor_ml' | 'monitor_rollup' | 'monitor_snapshot' | 'monitor_stats' | 'monitor_text_structure' | 'monitor_transform' | 'monitor_watcher' | 'none' | 'post_behavioral_analytics_event' | 'read_ccr' | 'read_fleet_secrets' | 'read_ilm' | 'read_pipeline' | 'read_security' | 'read_slm' | 'transport_client' | 'write_connector_secrets' | 'write_fleet_secrets'| string export interface SecurityCreatedStatus { created: boolean @@ -17682,6 +17682,13 @@ export interface SecurityRealmInfo { type: string } +export type SecurityRemoteClusterPrivilege = 'monitor_enrich' | 'monitor_stats' + +export interface SecurityRemoteClusterPrivileges { + clusters: Names + privileges: SecurityRemoteClusterPrivilege[] +} + export interface SecurityRemoteIndicesPrivileges { clusters: Names field_security?: SecurityFieldSecurity @@ -17699,6 +17706,8 @@ export interface SecurityRoleDescriptor { cluster?: SecurityClusterPrivilege[] indices?: SecurityIndicesPrivileges[] index?: SecurityIndicesPrivileges[] + remote_indices?: SecurityRemoteIndicesPrivileges[] + remote_cluster?: SecurityRemoteClusterPrivileges[] global?: SecurityGlobalPrivilege[] | SecurityGlobalPrivilege applications?: SecurityApplicationPrivileges[] metadata?: Metadata @@ -17711,6 +17720,8 @@ export interface SecurityRoleDescriptorRead { cluster: SecurityClusterPrivilege[] indices: SecurityIndicesPrivileges[] index: SecurityIndicesPrivileges[] + remote_indices?: SecurityRemoteIndicesPrivileges[] + remote_cluster?: SecurityRemoteClusterPrivileges[] global?: SecurityGlobalPrivilege[] | SecurityGlobalPrivilege applications?: SecurityApplicationPrivileges[] metadata?: Metadata @@ -18110,8 +18121,9 @@ export interface SecurityGetBuiltinPrivilegesRequest extends RequestBase { } export interface SecurityGetBuiltinPrivilegesResponse { - cluster: string[] + cluster: SecurityClusterPrivilege[] index: IndexName[] + remote_cluster: SecurityRemoteClusterPrivilege[] } export interface SecurityGetPrivilegesRequest extends RequestBase { @@ -18128,8 +18140,10 @@ export interface SecurityGetRoleRequest extends RequestBase { export type SecurityGetRoleResponse = Record export interface SecurityGetRoleRole { - cluster: string[] + cluster: SecurityClusterPrivilege[] indices: SecurityIndicesPrivileges[] + remote_indices?: SecurityRemoteIndicesPrivileges[] + remote_cluster?: SecurityRemoteClusterPrivileges[] metadata: Metadata run_as: string[] transient_metadata?: Record @@ -18395,6 +18409,7 @@ export interface SecurityPutRoleRequest extends RequestBase { global?: Record indices?: SecurityIndicesPrivileges[] remote_indices?: SecurityRemoteIndicesPrivileges[] + remote_cluster?: SecurityRemoteClusterPrivileges[] metadata?: Metadata run_as?: string[] description?: string diff --git a/package.json b/package.json index 0d26b9a7ed..24cce74a45 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "@stoplight/spectral-cli": "^6.13.1" + "@stoplight/spectral-cli": "^6.14.1" } } diff --git a/specification/security/_types/Privileges.ts b/specification/security/_types/Privileges.ts index 14f2977557..d3d6c7c319 100644 --- a/specification/security/_types/Privileges.ts +++ b/specification/security/_types/Privileges.ts @@ -151,6 +151,10 @@ export enum ClusterPrivilege { * @availability stack */ monitor_snapshot, + /** + * @availability stack since=8.17.0 + */ + monitor_stats, /** * @availability stack */ @@ -194,6 +198,21 @@ export enum ClusterPrivilege { write_fleet_secrets } +/** + * The subset of cluster level privileges that can be defined for remote clusters. + * @availability stack + */ +export enum RemoteClusterPrivilege { + /** + * @availability stack since=8.14.0 + */ + monitor_enrich, + /** + * @availability stack since=8.17.0 + */ + monitor_stats +} + // Keep in sync with RemoteIndicesPrivileges export class IndicesPrivileges { /** @@ -221,6 +240,9 @@ export class IndicesPrivileges { allow_restricted_indices?: boolean } +/** + * The subset of index level privileges that can be defined for remote clusters. + */ // Keep in sync with IndicesPrivileges export class RemoteIndicesPrivileges { /** @@ -252,6 +274,20 @@ export class RemoteIndicesPrivileges { allow_restricted_indices?: boolean } +/** + * The subset of cluster level privileges that can be defined for remote clusters. + */ +export class RemoteClusterPrivileges { + /** + * A list of cluster aliases to which the permissions in this entry apply. + */ + clusters: Names + /** + * The cluster level privileges that owners of the role have on the remote cluster. + */ + privileges: RemoteClusterPrivilege[] +} + export class UserIndicesPrivileges { /** * The document fields that the owners of the role have read access to. diff --git a/specification/security/_types/RoleDescriptor.ts b/specification/security/_types/RoleDescriptor.ts index 6c8130860b..ad8afe33a5 100644 --- a/specification/security/_types/RoleDescriptor.ts +++ b/specification/security/_types/RoleDescriptor.ts @@ -25,7 +25,9 @@ import { ApplicationPrivileges, ClusterPrivilege, GlobalPrivilege, - IndicesPrivileges + IndicesPrivileges, + RemoteClusterPrivileges, + RemoteIndicesPrivileges } from './Privileges' export class RoleDescriptor { @@ -38,6 +40,19 @@ export class RoleDescriptor { * @aliases index */ indices?: IndicesPrivileges[] + + /** + * A list of indices permissions for remote clusters. + * @availability stack since=8.14.0 + */ + remote_indices?: RemoteIndicesPrivileges[] + + /** + * A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions. + * @availability stack since=8.15.0 + */ + remote_cluster?: RemoteClusterPrivileges[] + /** * An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges. * @availability stack @@ -73,6 +88,17 @@ export class RoleDescriptorRead implements OverloadOf { * @aliases index */ indices: IndicesPrivileges[] + /** + * A list of indices permissions for remote clusters. + * @availability stack since=8.14.0 + */ + remote_indices?: RemoteIndicesPrivileges[] + + /** + * A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions. + * @availability stack since=8.15.0 + */ + remote_cluster?: RemoteClusterPrivileges[] /** * An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges. */ diff --git a/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts b/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts index eaf9009d13..a1f81e913e 100644 --- a/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts +++ b/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts @@ -17,8 +17,16 @@ * under the License. */ +import { + ClusterPrivilege, + RemoteClusterPrivilege +} from '@security/_types/Privileges' import { IndexName } from '@_types/common' export class Response { - body: { cluster: string[]; index: IndexName[] } + body: { + cluster: ClusterPrivilege[] + index: IndexName[] + remote_cluster: RemoteClusterPrivilege[] + } } diff --git a/specification/security/get_role/types.ts b/specification/security/get_role/types.ts index 1ba672b074..122b993380 100644 --- a/specification/security/get_role/types.ts +++ b/specification/security/get_role/types.ts @@ -19,7 +19,10 @@ import { ApplicationPrivileges, - IndicesPrivileges + ClusterPrivilege, + IndicesPrivileges, + RemoteClusterPrivileges, + RemoteIndicesPrivileges } from '@security/_types/Privileges' import { RoleTemplate } from '@security/_types/RoleTemplate' import { Dictionary } from '@spec_utils/Dictionary' @@ -27,8 +30,16 @@ import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { Metadata } from '@_types/common' export class Role { - cluster: string[] + cluster: ClusterPrivilege[] indices: IndicesPrivileges[] + /** + * @availability stack since=8.14.0 + */ + remote_indices?: RemoteIndicesPrivileges[] + /** + * @availability stack since=8.15.0 + */ + remote_cluster?: RemoteClusterPrivileges[] metadata: Metadata run_as: string[] transient_metadata?: Dictionary diff --git a/specification/security/put_role/SecurityPutRoleRequest.ts b/specification/security/put_role/SecurityPutRoleRequest.ts index e8ada073d5..00726f27b8 100644 --- a/specification/security/put_role/SecurityPutRoleRequest.ts +++ b/specification/security/put_role/SecurityPutRoleRequest.ts @@ -21,6 +21,7 @@ import { ApplicationPrivileges, ClusterPrivilege, IndicesPrivileges, + RemoteClusterPrivileges, RemoteIndicesPrivileges } from '@security/_types/Privileges' import { Dictionary } from '@spec_utils/Dictionary' @@ -74,6 +75,12 @@ export interface Request extends RequestBase { * */ remote_indices?: RemoteIndicesPrivileges[] + /** + * A list of remote cluster permissions entries. + * @availability stack since=8.15.0 + * + */ + remote_cluster?: RemoteClusterPrivileges[] /** * Optional metadata. Within the metadata object, keys that begin with an underscore (`_`) are reserved for system use. */ From aac56beb228df1e1503eabd8747ae0883bc50dcb Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Thu, 14 Nov 2024 19:41:30 +0000 Subject: [PATCH 07/14] Update specification output --- output/openapi/elasticsearch-openapi.json | 161 +++++++++++++----- .../elasticsearch-serverless-openapi.json | 16 +- output/schema/schema-serverless.json | 53 ++++-- output/schema/schema.json | 4 +- 4 files changed, 175 insertions(+), 59 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 60c66ad20c..81d7eaf7ec 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -28964,7 +28964,7 @@ "cluster": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/security._types:ClusterPrivilege" } }, "index": { @@ -28972,11 +28972,18 @@ "items": { "$ref": "#/components/schemas/_types:IndexName" } + }, + "remote_cluster": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:RemoteClusterPrivilege" + } } }, "required": [ "cluster", - "index" + "index", + "remote_cluster" ] } } @@ -81846,6 +81853,20 @@ "$ref": "#/components/schemas/security._types:IndicesPrivileges" } }, + "remote_indices": { + "description": "A list of indices permissions for remote clusters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:RemoteIndicesPrivileges" + } + }, + "remote_cluster": { + "description": "A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:RemoteClusterPrivileges" + } + }, "global": { "description": "An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges.", "oneOf": [ @@ -81938,6 +81959,7 @@ "monitor_ml", "monitor_rollup", "monitor_snapshot", + "monitor_stats", "monitor_text_structure", "monitor_transform", "monitor_watcher", @@ -82096,6 +82118,69 @@ } ] }, + "security._types:RemoteIndicesPrivileges": { + "type": "object", + "properties": { + "clusters": { + "$ref": "#/components/schemas/_types:Names" + }, + "field_security": { + "$ref": "#/components/schemas/security._types:FieldSecurity" + }, + "names": { + "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:IndexName" + } + }, + "privileges": { + "description": "The index level privileges that owners of the role have on the specified indices.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:IndexPrivilege" + } + }, + "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": [ + "clusters", + "names", + "privileges" + ] + }, + "security._types:RemoteClusterPrivileges": { + "type": "object", + "properties": { + "clusters": { + "$ref": "#/components/schemas/_types:Names" + }, + "privileges": { + "description": "The cluster level privileges that owners of the role have on the remote cluster.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:RemoteClusterPrivilege" + } + } + }, + "required": [ + "clusters", + "privileges" + ] + }, + "security._types:RemoteClusterPrivilege": { + "type": "string", + "enum": [ + "monitor_enrich", + "monitor_stats" + ] + }, "security._types:GlobalPrivilege": { "type": "object", "properties": { @@ -82355,7 +82440,7 @@ "cluster": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/security._types:ClusterPrivilege" } }, "indices": { @@ -82364,6 +82449,18 @@ "$ref": "#/components/schemas/security._types:IndicesPrivileges" } }, + "remote_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:RemoteIndicesPrivileges" + } + }, + "remote_cluster": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:RemoteClusterPrivileges" + } + }, "metadata": { "$ref": "#/components/schemas/_types:Metadata" }, @@ -82536,6 +82633,20 @@ "$ref": "#/components/schemas/security._types:IndicesPrivileges" } }, + "remote_indices": { + "description": "A list of indices permissions for remote clusters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:RemoteIndicesPrivileges" + } + }, + "remote_cluster": { + "description": "A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:RemoteClusterPrivileges" + } + }, "global": { "description": "An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges.", "oneOf": [ @@ -82961,43 +83072,6 @@ "created" ] }, - "security._types:RemoteIndicesPrivileges": { - "type": "object", - "properties": { - "clusters": { - "$ref": "#/components/schemas/_types:Names" - }, - "field_security": { - "$ref": "#/components/schemas/security._types:FieldSecurity" - }, - "names": { - "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:IndexName" - } - }, - "privileges": { - "description": "The index level privileges that owners of the role have on the specified indices.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types:IndexPrivilege" - } - }, - "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": [ - "clusters", - "names", - "privileges" - ] - }, "security.query_api_keys:ApiKeyAggregationContainer": { "allOf": [ { @@ -103746,6 +103820,13 @@ "$ref": "#/components/schemas/security._types:RemoteIndicesPrivileges" } }, + "remote_cluster": { + "description": "A list of remote cluster permissions entries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:RemoteClusterPrivileges" + } + }, "metadata": { "$ref": "#/components/schemas/_types:Metadata" }, diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index a9cbf66396..482e2d7d28 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -17121,7 +17121,7 @@ "cluster": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/security._types:ClusterPrivilege" } }, "index": { @@ -17129,11 +17129,18 @@ "items": { "$ref": "#/components/schemas/_types:IndexName" } + }, + "remote_cluster": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:RemoteClusterPrivilege" + } } }, "required": [ "cluster", - "index" + "index", + "remote_cluster" ] } } @@ -53884,13 +53891,16 @@ "name" ] }, + "security._types:RemoteClusterPrivilege": { + "type": "string" + }, "security.get_role:Role": { "type": "object", "properties": { "cluster": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/security._types:ClusterPrivilege" } }, "indices": { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index b4f72f1491..b172454c53 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -39140,8 +39140,8 @@ "value": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ClusterPrivilege", + "namespace": "security._types" } } } @@ -39159,6 +39159,20 @@ } } } + }, + { + "name": "remote_cluster", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RemoteClusterPrivilege", + "namespace": "security._types" + } + } + } } ] }, @@ -39167,7 +39181,7 @@ "name": "Response", "namespace": "security.get_builtin_privileges" }, - "specLocation": "security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L22-L24" + "specLocation": "security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L26-L32" }, { "attachedBehaviors": [ @@ -39725,7 +39739,7 @@ } } ], - "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L31-L95" + "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L32-L102" }, { "body": { @@ -102975,7 +102989,7 @@ "name": "ClusterPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L42-L195" + "specLocation": "security/_types/Privileges.ts#L42-L199" }, { "kind": "enum", @@ -103052,7 +103066,7 @@ "name": "IndexPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L324-L366" + "specLocation": "security/_types/Privileges.ts#L360-L402" }, { "codegenNames": [ @@ -103066,7 +103080,7 @@ "name": "IndicesPrivilegesQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L279-L287", + "specLocation": "security/_types/Privileges.ts#L315-L323", "type": { "items": [ { @@ -103116,7 +103130,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L289-L299" + "specLocation": "security/_types/Privileges.ts#L325-L335" }, { "kind": "interface", @@ -103204,7 +103218,7 @@ } ], "shortcutProperty": "source", - "specLocation": "security/_types/Privileges.ts#L301-L319" + "specLocation": "security/_types/Privileges.ts#L337-L355" }, { "codegenNames": [ @@ -103216,7 +103230,7 @@ "name": "RoleTemplateInlineQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L321-L322", + "specLocation": "security/_types/Privileges.ts#L357-L358", "type": { "items": [ { @@ -103237,6 +103251,15 @@ "kind": "union_of" } }, + { + "kind": "enum", + "members": [], + "name": { + "name": "RemoteClusterPrivilege", + "namespace": "security._types" + }, + "specLocation": "security/_types/Privileges.ts#L201-L214" + }, { "kind": "enum", "members": [ @@ -139636,7 +139659,7 @@ } } ], - "specLocation": "security/_types/RoleDescriptor.ts#L31-L64" + "specLocation": "security/_types/RoleDescriptor.ts#L33-L79" }, { "kind": "interface", @@ -139702,7 +139725,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L198-L222" + "specLocation": "security/_types/Privileges.ts#L217-L241" }, { "kind": "interface", @@ -139873,8 +139896,8 @@ "value": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ClusterPrivilege", + "namespace": "security._types" } } } @@ -140018,7 +140041,7 @@ } } ], - "specLocation": "security/get_role/types.ts#L29-L42" + "specLocation": "security/get_role/types.ts#L32-L53" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index dee25fcbb2..a4b477f326 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -187341,7 +187341,9 @@ }, { "availability": { - "stack": {} + "stack": { + "since": "8.17.0" + } }, "name": "monitor_stats" }, From 69875c006173bd188390f722f64562d5657854fa Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 15 Nov 2024 08:36:11 +0400 Subject: [PATCH 08/14] Add missing allow_restricted_indices to cross cluster api key APIs (#3128) --- specification/security/_types/Privileges.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/security/_types/Privileges.ts b/specification/security/_types/Privileges.ts index d3d6c7c319..b7ee5bcf81 100644 --- a/specification/security/_types/Privileges.ts +++ b/specification/security/_types/Privileges.ts @@ -418,6 +418,11 @@ export class ReplicationAccess { * A list of indices (or index name patterns) to which the permissions in this entry apply. */ names: IndexName[] + /** + * This needs to be set to true if the patterns in the names field should cover system indices. + * @server_default false + */ + allow_restricted_indices?: boolean } export class SearchAccess { From c74b23b09960d05b8971f8a60b7fe4eeb6db58a4 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Fri, 15 Nov 2024 04:37:03 +0000 Subject: [PATCH 09/14] Update specification output --- output/openapi/elasticsearch-openapi.json | 4 ++++ output/schema/schema.json | 17 +++++++++++++++-- output/typescript/types.ts | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 81d7eaf7ec..d462e586ea 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -82339,6 +82339,10 @@ "items": { "$ref": "#/components/schemas/_types:IndexName" } + }, + "allow_restricted_indices": { + "description": "This needs to be set to true if the patterns in the names field should cover system indices.", + "type": "boolean" } }, "required": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index a4b477f326..65949bcb7f 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -188015,9 +188015,22 @@ } } } + }, + { + "description": "This needs to be set to true if the patterns in the names field should cover system indices.", + "name": "allow_restricted_indices", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "security/_types/Privileges.ts#L416-L421" + "specLocation": "security/_types/Privileges.ts#L416-L426" }, { "kind": "interface", @@ -188787,7 +188800,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L423-L443" + "specLocation": "security/_types/Privileges.ts#L428-L448" }, { "kind": "enum", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index beb214d697..d1c3708385 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -17700,6 +17700,7 @@ export interface SecurityRemoteIndicesPrivileges { export interface SecurityReplicationAccess { names: IndexName[] + allow_restricted_indices?: boolean } export interface SecurityRoleDescriptor { From 8dbde0eadb9b13a059f722b38f075d8c90572a86 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Thu, 14 Nov 2024 22:47:30 -0600 Subject: [PATCH 10/14] Add data_streams to the deprecation info api response (#3130) --- output/openapi/elasticsearch-openapi.json | 10 +++++++ output/schema/schema.json | 27 ++++++++++++++++++- output/typescript/types.ts | 1 + .../deprecations/DeprecationInfoResponse.ts | 1 + 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index d462e586ea..d38e6437b8 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -90406,6 +90406,15 @@ } } }, + "data_streams": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations:Deprecation" + } + } + }, "node_settings": { "type": "array", "items": { @@ -90422,6 +90431,7 @@ "required": [ "cluster_settings", "index_settings", + "data_streams", "node_settings", "ml_settings" ] diff --git a/output/schema/schema.json b/output/schema/schema.json index 65949bcb7f..2e761262d0 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -149015,6 +149015,31 @@ } } }, + { + "name": "data_streams", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Deprecation", + "namespace": "migration.deprecations" + } + } + } + } + }, { "name": "node_settings", "required": true, @@ -149049,7 +149074,7 @@ "name": "Response", "namespace": "migration.deprecations" }, - "specLocation": "migration/deprecations/DeprecationInfoResponse.ts#L23-L30" + "specLocation": "migration/deprecations/DeprecationInfoResponse.ts#L23-L31" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index d1c3708385..39ac6b77e4 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -13565,6 +13565,7 @@ export interface MigrationDeprecationsRequest extends RequestBase { export interface MigrationDeprecationsResponse { cluster_settings: MigrationDeprecationsDeprecation[] index_settings: Record + data_streams: Record node_settings: MigrationDeprecationsDeprecation[] ml_settings: MigrationDeprecationsDeprecation[] } diff --git a/specification/migration/deprecations/DeprecationInfoResponse.ts b/specification/migration/deprecations/DeprecationInfoResponse.ts index 9a0d80ebdd..38cdf5892b 100644 --- a/specification/migration/deprecations/DeprecationInfoResponse.ts +++ b/specification/migration/deprecations/DeprecationInfoResponse.ts @@ -24,6 +24,7 @@ export class Response { body: { cluster_settings: Deprecation[] index_settings: Dictionary + data_streams: Dictionary node_settings: Deprecation[] ml_settings: Deprecation[] } From 2c94880087755e1659734dd9d1bac720cd21700c Mon Sep 17 00:00:00 2001 From: Niels Bauman <33722607+nielsbauman@users.noreply.github.com> Date: Fri, 15 Nov 2024 06:44:27 +0100 Subject: [PATCH 11/14] Add missing fields to `IndexTemplate` (#3129) Co-authored-by: Quentin Pradet --- output/openapi/elasticsearch-openapi.json | 7 ++++ .../elasticsearch-serverless-openapi.json | 7 ++++ output/schema/schema-serverless.json | 42 +++++++++++++++++-- output/schema/schema.json | 42 +++++++++++++++++-- output/typescript/types.ts | 2 + specification/indices/_types/IndexTemplate.ts | 14 +++++++ 6 files changed, 108 insertions(+), 6 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index d38e6437b8..d49ea162ac 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -67499,6 +67499,13 @@ }, "data_stream": { "$ref": "#/components/schemas/indices._types:IndexTemplateDataStreamConfiguration" + }, + "deprecated": { + "description": "Marks this index template as deprecated.\nWhen creating or updating a non-deprecated index template that uses deprecated components,\nElasticsearch will emit a deprecation warning.", + "type": "boolean" + }, + "ignore_missing_component_templates": { + "$ref": "#/components/schemas/_types:Names" } }, "required": [ diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 482e2d7d28..261d6563c3 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -45095,6 +45095,13 @@ }, "data_stream": { "$ref": "#/components/schemas/indices._types:IndexTemplateDataStreamConfiguration" + }, + "deprecated": { + "description": "Marks this index template as deprecated.\nWhen creating or updating a non-deprecated index template that uses deprecated components,\nElasticsearch will emit a deprecation warning.", + "type": "boolean" + }, + "ignore_missing_component_templates": { + "$ref": "#/components/schemas/_types:Names" } }, "required": [ diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index b172454c53..3a97ce424f 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -119244,9 +119244,45 @@ "namespace": "indices._types" } } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.12.0" + } + }, + "description": "Marks this index template as deprecated.\nWhen creating or updating a non-deprecated index template that uses deprecated components,\nElasticsearch will emit a deprecation warning.", + "name": "deprecated", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.7.0" + } + }, + "description": "A list of component template names that are allowed to be absent.", + "name": "ignore_missing_component_templates", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Names", + "namespace": "_types" + } + } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L28-L67" + "specLocation": "indices/_types/IndexTemplate.ts#L28-L81" }, { "kind": "interface", @@ -119323,7 +119359,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L82-L104" + "specLocation": "indices/_types/IndexTemplate.ts#L96-L118" }, { "kind": "interface", @@ -119359,7 +119395,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L69-L80" + "specLocation": "indices/_types/IndexTemplate.ts#L83-L94" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index 2e761262d0..7aba15d81b 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -125515,9 +125515,45 @@ "namespace": "indices._types" } } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.12.0" + } + }, + "description": "Marks this index template as deprecated.\nWhen creating or updating a non-deprecated index template that uses deprecated components,\nElasticsearch will emit a deprecation warning.", + "name": "deprecated", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.7.0" + } + }, + "description": "A list of component template names that are allowed to be absent.", + "name": "ignore_missing_component_templates", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Names", + "namespace": "_types" + } + } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L28-L67" + "specLocation": "indices/_types/IndexTemplate.ts#L28-L81" }, { "kind": "interface", @@ -125553,7 +125589,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L69-L80" + "specLocation": "indices/_types/IndexTemplate.ts#L83-L94" }, { "kind": "interface", @@ -125630,7 +125666,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L82-L104" + "specLocation": "indices/_types/IndexTemplate.ts#L96-L118" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 39ac6b77e4..1d952fa3ac 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11122,6 +11122,8 @@ export interface IndicesIndexTemplate { _meta?: Metadata allow_auto_create?: boolean data_stream?: IndicesIndexTemplateDataStreamConfiguration + deprecated?: boolean + ignore_missing_component_templates?: Names } export interface IndicesIndexTemplateDataStreamConfiguration { diff --git a/specification/indices/_types/IndexTemplate.ts b/specification/indices/_types/IndexTemplate.ts index 3d759530be..f0fe9dad47 100644 --- a/specification/indices/_types/IndexTemplate.ts +++ b/specification/indices/_types/IndexTemplate.ts @@ -64,6 +64,20 @@ export class IndexTemplate { * Data streams require a matching index template with a `data_stream` object. */ data_stream?: IndexTemplateDataStreamConfiguration + /** + * Marks this index template as deprecated. + * When creating or updating a non-deprecated index template that uses deprecated components, + * Elasticsearch will emit a deprecation warning. + * @availability stack since=8.12.0 + * @availability serverless + */ + deprecated?: boolean + /** + * A list of component template names that are allowed to be absent. + * @availability stack since=8.7.0 + * @availability serverless + */ + ignore_missing_component_templates?: Names } export class IndexTemplateDataStreamConfiguration { From 0dbfea3b90771885456300233505e2beb8dad5d5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:27:01 +0400 Subject: [PATCH 12/14] Update rest-api-spec main (#3019) Co-authored-by: pquentin <42327+pquentin@users.noreply.github.com> Co-authored-by: Quentin Pradet --- compiler/package-lock.json | 10 ++- output/schema/schema.json | 84 +++++++++++++++++++ output/schema/validation-errors.json | 18 ++++ .../ingest.delete_ip_location_database.json | 28 +++++++ .../ingest.get_ip_location_database.json | 32 +++++++ .../ingest.put_ip_location_database.json | 33 ++++++++ 6 files changed, 202 insertions(+), 3 deletions(-) create mode 100644 specification/_json_spec/ingest.delete_ip_location_database.json create mode 100644 specification/_json_spec/ingest.get_ip_location_database.json create mode 100644 specification/_json_spec/ingest.put_ip_location_database.json diff --git a/compiler/package-lock.json b/compiler/package-lock.json index ed183152ca..56c687fd0d 100644 --- a/compiler/package-lock.json +++ b/compiler/package-lock.json @@ -33,6 +33,10 @@ "node": ">=14" } }, + "../compiler-rs/compiler-wasm-lib/pkg": { + "name": "compiler-wasm-lib", + "version": "0.1.0" + }, "node_modules/@babel/code-frame": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", @@ -1540,8 +1544,8 @@ "dev": true }, "node_modules/compiler-wasm-lib": { - "version": "0.1.0", - "resolved": "file:../compiler-rs/compiler-wasm-lib/pkg" + "resolved": "../compiler-rs/compiler-wasm-lib/pkg", + "link": true }, "node_modules/concat-map": { "version": "0.0.1", @@ -6484,7 +6488,7 @@ "dev": true }, "compiler-wasm-lib": { - "version": "0.1.0" + "version": "file:../compiler-rs/compiler-wasm-lib/pkg" }, "concat-map": { "version": "0.0.1", diff --git a/output/schema/schema.json b/output/schema/schema.json index 7aba15d81b..025b779f98 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -8561,6 +8561,31 @@ } ] }, + { + "availability": { + "stack": { + "stability": "stable", + "visibility": "public" + } + }, + "description": "Deletes an ip location database configuration", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-ip-location-database-api.html", + "name": "ingest.delete_ip_location_database", + "request": null, + "requestBodyRequired": false, + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "DELETE" + ], + "path": "/_ingest/ip_location/database/{id}" + } + ] + }, { "availability": { "serverless": { @@ -8672,6 +8697,37 @@ } ] }, + { + "availability": { + "stack": { + "stability": "stable", + "visibility": "public" + } + }, + "description": "Returns the specified ip location database configuration", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-ip-location-database-api.html", + "name": "ingest.get_ip_location_database", + "request": null, + "requestBodyRequired": false, + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_ingest/ip_location/database" + }, + { + "methods": [ + "GET" + ], + "path": "/_ingest/ip_location/database/{id}" + } + ] + }, { "availability": { "serverless": { @@ -8786,6 +8842,34 @@ } ] }, + { + "availability": { + "stack": { + "stability": "stable", + "visibility": "public" + } + }, + "description": "Puts the configuration for a ip location database to be downloaded", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-ip-location-database-api.html", + "name": "ingest.put_ip_location_database", + "request": null, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_ingest/ip_location/database/{id}" + } + ] + }, { "availability": { "serverless": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 9c6cbcafe3..8fd060be7a 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -871,12 +871,24 @@ ], "response": [] }, + "ingest.delete_ip_location_database": { + "request": [ + "Missing request & response" + ], + "response": [] + }, "ingest.get_geoip_database": { "request": [ "Request: query parameter 'master_timeout' does not exist in the json spec" ], "response": [] }, + "ingest.get_ip_location_database": { + "request": [ + "Missing request & response" + ], + "response": [] + }, "ingest.put_geoip_database": { "request": [ "Request: query parameter 'master_timeout' does not exist in the json spec", @@ -884,6 +896,12 @@ ], "response": [] }, + "ingest.put_ip_location_database": { + "request": [ + "Missing request & response" + ], + "response": [] + }, "license.delete": { "request": [ "Request: missing json spec query parameter 'master_timeout'", diff --git a/specification/_json_spec/ingest.delete_ip_location_database.json b/specification/_json_spec/ingest.delete_ip_location_database.json new file mode 100644 index 0000000000..629ea86961 --- /dev/null +++ b/specification/_json_spec/ingest.delete_ip_location_database.json @@ -0,0 +1,28 @@ +{ + "ingest.delete_ip_location_database": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-ip-location-database-api.html", + "description": "Deletes an ip location database configuration" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_ingest/ip_location/database/{id}", + "methods": ["DELETE"], + "parts": { + "id": { + "type": "list", + "description": "A comma-separated list of ip location database configurations to delete" + } + } + } + ] + }, + "params": {} + } +} diff --git a/specification/_json_spec/ingest.get_ip_location_database.json b/specification/_json_spec/ingest.get_ip_location_database.json new file mode 100644 index 0000000000..d6dda6573b --- /dev/null +++ b/specification/_json_spec/ingest.get_ip_location_database.json @@ -0,0 +1,32 @@ +{ + "ingest.get_ip_location_database": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-ip-location-database-api.html", + "description": "Returns the specified ip location database configuration" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_ingest/ip_location/database", + "methods": ["GET"] + }, + { + "path": "/_ingest/ip_location/database/{id}", + "methods": ["GET"], + "parts": { + "id": { + "type": "list", + "description": "A comma-separated list of ip location database configurations to get; use `*` to get all ip location database configurations" + } + } + } + ] + }, + "params": {} + } +} diff --git a/specification/_json_spec/ingest.put_ip_location_database.json b/specification/_json_spec/ingest.put_ip_location_database.json new file mode 100644 index 0000000000..b10e290bd4 --- /dev/null +++ b/specification/_json_spec/ingest.put_ip_location_database.json @@ -0,0 +1,33 @@ +{ + "ingest.put_ip_location_database": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-ip-location-database-api.html", + "description": "Puts the configuration for a ip location database to be downloaded" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_ingest/ip_location/database/{id}", + "methods": ["PUT"], + "parts": { + "id": { + "type": "string", + "description": "The id of the database configuration" + } + } + } + ] + }, + "params": {}, + "body": { + "description": "The database configuration definition", + "required": true + } + } +} From 966891bb74aed673d6fe5c4ddbff3b8ce16b988a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 16 Nov 2024 16:46:46 +0400 Subject: [PATCH 13/14] Update rest-api-spec (#3138) Co-authored-by: pquentin <42327+pquentin@users.noreply.github.com> --- output/schema/schema.json | 2 +- specification/_json_spec/inference.delete.json | 2 +- specification/_json_spec/inference.get.json | 2 +- specification/_json_spec/inference.inference.json | 2 +- specification/_json_spec/inference.put.json | 2 +- specification/_json_spec/inference.stream_inference.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 025b779f98..265ae8f9cf 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -8462,7 +8462,7 @@ { "availability": { "stack": { - "stability": "experimental", + "stability": "stable", "visibility": "public" } }, diff --git a/specification/_json_spec/inference.delete.json b/specification/_json_spec/inference.delete.json index d9a0f0b0b6..bfd25b611d 100644 --- a/specification/_json_spec/inference.delete.json +++ b/specification/_json_spec/inference.delete.json @@ -4,7 +4,7 @@ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html", "description": "Delete an inference endpoint" }, - "stability": "experimental", + "stability": "stable", "visibility": "public", "headers": { "accept": ["application/json"] diff --git a/specification/_json_spec/inference.get.json b/specification/_json_spec/inference.get.json index 661f696f43..7f14d8babb 100644 --- a/specification/_json_spec/inference.get.json +++ b/specification/_json_spec/inference.get.json @@ -4,7 +4,7 @@ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html", "description": "Get an inference endpoint" }, - "stability": "experimental", + "stability": "stable", "visibility": "public", "headers": { "accept": ["application/json"] diff --git a/specification/_json_spec/inference.inference.json b/specification/_json_spec/inference.inference.json index 6afa0a8ce6..bf1282dfaa 100644 --- a/specification/_json_spec/inference.inference.json +++ b/specification/_json_spec/inference.inference.json @@ -4,7 +4,7 @@ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html", "description": "Perform inference" }, - "stability": "experimental", + "stability": "stable", "visibility": "public", "headers": { "accept": ["application/json"], diff --git a/specification/_json_spec/inference.put.json b/specification/_json_spec/inference.put.json index 2c7d3fbf14..d48b65cba6 100644 --- a/specification/_json_spec/inference.put.json +++ b/specification/_json_spec/inference.put.json @@ -4,7 +4,7 @@ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html", "description": "Configure an inference endpoint for use in the Inference API" }, - "stability": "experimental", + "stability": "stable", "visibility": "public", "headers": { "accept": ["application/json"], diff --git a/specification/_json_spec/inference.stream_inference.json b/specification/_json_spec/inference.stream_inference.json index c8d0501e2e..03fa95f2ce 100644 --- a/specification/_json_spec/inference.stream_inference.json +++ b/specification/_json_spec/inference.stream_inference.json @@ -4,7 +4,7 @@ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-stream-inference-api.html", "description": "Perform streaming inference" }, - "stability": "experimental", + "stability": "stable", "visibility": "public", "headers": { "accept": ["text/event-stream"], From dd55c46bfe8334f57dfd831b56197ed3574a8a8b Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 18 Nov 2024 10:42:16 +0400 Subject: [PATCH 14/14] Allow index name patterns in Privileges index fields (#3127) --- output/openapi/elasticsearch-openapi.json | 75 ++++++--- .../elasticsearch-serverless-openapi.json | 15 +- output/schema/schema-serverless.json | 38 +++-- output/schema/schema.json | 158 ++++++++++++------ output/typescript/types.ts | 10 +- specification/security/_types/Privileges.ts | 12 +- 6 files changed, 212 insertions(+), 96 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index d49ea162ac..4f237244ed 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -81996,10 +81996,17 @@ }, "names": { "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:IndexName" - } + "oneOf": [ + { + "$ref": "#/components/schemas/_types:IndexName" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:IndexName" + } + } + ] }, "privileges": { "description": "The index level privileges that owners of the role have on the specified indices.", @@ -82136,10 +82143,17 @@ }, "names": { "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:IndexName" - } + "oneOf": [ + { + "$ref": "#/components/schemas/_types:IndexName" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:IndexName" + } + } + ] }, "privileges": { "description": "The index level privileges that owners of the role have on the specified indices.", @@ -82342,10 +82356,17 @@ "properties": { "names": { "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:IndexName" - } + "oneOf": [ + { + "$ref": "#/components/schemas/_types:IndexName" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:IndexName" + } + } + ] }, "allow_restricted_indices": { "description": "This needs to be set to true if the patterns in the names field should cover system indices.", @@ -82364,10 +82385,17 @@ }, "names": { "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:IndexName" - } + "oneOf": [ + { + "$ref": "#/components/schemas/_types:IndexName" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:IndexName" + } + } + ] }, "query": { "$ref": "#/components/schemas/security._types:IndicesPrivilegesQuery" @@ -82869,10 +82897,17 @@ }, "names": { "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:IndexName" - } + "oneOf": [ + { + "$ref": "#/components/schemas/_types:IndexName" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:IndexName" + } + } + ] }, "privileges": { "description": "The index level privileges that owners of the role have on the specified indices.", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 261d6563c3..6fbd28e689 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -53722,10 +53722,17 @@ }, "names": { "description": "A list of indices (or index name patterns) to which the permissions in this entry apply.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:IndexName" - } + "oneOf": [ + { + "$ref": "#/components/schemas/_types:IndexName" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:IndexName" + } + } + ] }, "privileges": { "description": "The index level privileges that owners of the role have on the specified indices.", diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 3a97ce424f..47a1b2cbed 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -103066,7 +103066,7 @@ "name": "IndexPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L360-L402" + "specLocation": "security/_types/Privileges.ts#L362-L404" }, { "codegenNames": [ @@ -103080,7 +103080,7 @@ "name": "IndicesPrivilegesQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L315-L323", + "specLocation": "security/_types/Privileges.ts#L317-L325", "type": { "items": [ { @@ -103130,7 +103130,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L325-L335" + "specLocation": "security/_types/Privileges.ts#L327-L337" }, { "kind": "interface", @@ -103218,7 +103218,7 @@ } ], "shortcutProperty": "source", - "specLocation": "security/_types/Privileges.ts#L337-L355" + "specLocation": "security/_types/Privileges.ts#L339-L357" }, { "codegenNames": [ @@ -103230,7 +103230,7 @@ "name": "RoleTemplateInlineQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L357-L358", + "specLocation": "security/_types/Privileges.ts#L359-L360", "type": { "items": [ { @@ -139723,14 +139723,26 @@ "name": "names", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" + "items": [ + { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } } - } + ], + "kind": "union_of" } }, { @@ -139761,7 +139773,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L217-L241" + "specLocation": "security/_types/Privileges.ts#L217-L243" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index 265ae8f9cf..48d79175cf 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -187162,7 +187162,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L408-L410" + "specLocation": "security/_types/Privileges.ts#L410-L412" }, { "kind": "interface", @@ -187687,7 +187687,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L404-L406" + "specLocation": "security/_types/Privileges.ts#L406-L408" }, { "kind": "enum", @@ -187800,7 +187800,7 @@ "name": "IndexPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L360-L402" + "specLocation": "security/_types/Privileges.ts#L362-L404" }, { "kind": "interface", @@ -187828,14 +187828,26 @@ "name": "names", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } } - } + ] } }, { @@ -187882,7 +187894,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L217-L241" + "specLocation": "security/_types/Privileges.ts#L217-L243" }, { "kind": "type_alias", @@ -187896,7 +187908,7 @@ "name": "IndicesPrivilegesQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L315-L323", + "specLocation": "security/_types/Privileges.ts#L317-L325", "type": { "kind": "union_of", "items": [ @@ -187946,7 +187958,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L412-L414" + "specLocation": "security/_types/Privileges.ts#L414-L416" }, { "kind": "interface", @@ -188042,7 +188054,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L277-L289" + "specLocation": "security/_types/Privileges.ts#L279-L291" }, { "kind": "interface", @@ -188083,14 +188095,26 @@ "name": "names", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } } - } + ] } }, { @@ -188137,7 +188161,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L243-L275" + "specLocation": "security/_types/Privileges.ts#L245-L277" }, { "kind": "interface", @@ -188151,14 +188175,26 @@ "name": "names", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } } - } + ] } }, { @@ -188175,7 +188211,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L416-L426" + "specLocation": "security/_types/Privileges.ts#L418-L428" }, { "kind": "interface", @@ -188747,7 +188783,7 @@ "name": "RoleTemplateInlineQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L357-L358", + "specLocation": "security/_types/Privileges.ts#L359-L360", "type": { "kind": "union_of", "items": [ @@ -188790,7 +188826,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L325-L335" + "specLocation": "security/_types/Privileges.ts#L327-L337" }, { "kind": "interface", @@ -188878,7 +188914,7 @@ } ], "shortcutProperty": "source", - "specLocation": "security/_types/Privileges.ts#L337-L355" + "specLocation": "security/_types/Privileges.ts#L339-L357" }, { "kind": "interface", @@ -188906,14 +188942,26 @@ "name": "names", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } } - } + ] } }, { @@ -188945,7 +188993,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L428-L448" + "specLocation": "security/_types/Privileges.ts#L430-L450" }, { "kind": "enum", @@ -189106,14 +189154,26 @@ "name": "names", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } } - } + ] } }, { @@ -189159,7 +189219,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L291-L313" + "specLocation": "security/_types/Privileges.ts#L293-L315" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 1d952fa3ac..0b40137e2c 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -17668,7 +17668,7 @@ export type SecurityIndexPrivilege = 'all' | 'auto_configure' | 'create' | 'crea export interface SecurityIndicesPrivileges { field_security?: SecurityFieldSecurity - names: IndexName[] + names: IndexName | IndexName[] privileges: SecurityIndexPrivilege[] query?: SecurityIndicesPrivilegesQuery allow_restricted_indices?: boolean @@ -17695,14 +17695,14 @@ export interface SecurityRemoteClusterPrivileges { export interface SecurityRemoteIndicesPrivileges { clusters: Names field_security?: SecurityFieldSecurity - names: IndexName[] + names: IndexName | IndexName[] privileges: SecurityIndexPrivilege[] query?: SecurityIndicesPrivilegesQuery allow_restricted_indices?: boolean } export interface SecurityReplicationAccess { - names: IndexName[] + names: IndexName | IndexName[] allow_restricted_indices?: boolean } @@ -17770,7 +17770,7 @@ export interface SecurityRoleTemplateScript { export interface SecuritySearchAccess { field_security?: SecurityFieldSecurity - names: IndexName[] + names: IndexName | IndexName[] query?: SecurityIndicesPrivilegesQuery allow_restricted_indices?: boolean } @@ -17789,7 +17789,7 @@ export interface SecurityUser { export interface SecurityUserIndicesPrivileges { field_security?: SecurityFieldSecurity[] - names: IndexName[] + names: IndexName | IndexName[] privileges: SecurityIndexPrivilege[] query?: SecurityIndicesPrivilegesQuery[] allow_restricted_indices: boolean diff --git a/specification/security/_types/Privileges.ts b/specification/security/_types/Privileges.ts index b7ee5bcf81..6836f8494e 100644 --- a/specification/security/_types/Privileges.ts +++ b/specification/security/_types/Privileges.ts @@ -220,10 +220,12 @@ export class IndicesPrivileges { * @doc_id field-and-document-access-control */ field_security?: FieldSecurity + // We're using IndexName | IndexName[] instead of Indices in this file on purpose: + // https://github.com/elastic/elasticsearch-specification/pull/3127 /** * A list of indices (or index name patterns) to which the permissions in this entry apply. */ - names: IndexName[] + names: IndexName | IndexName[] /** * The index level privileges that owners of the role have on the specified indices. */ @@ -257,7 +259,7 @@ export class RemoteIndicesPrivileges { /** * A list of indices (or index name patterns) to which the permissions in this entry apply. */ - names: IndexName[] + names: IndexName | IndexName[] /** * The index level privileges that owners of the role have on the specified indices. */ @@ -297,7 +299,7 @@ export class UserIndicesPrivileges { /** * A list of indices (or index name patterns) to which the permissions in this entry apply. */ - names: IndexName[] + names: IndexName | IndexName[] /** * The index level privileges that owners of the role have on the specified indices. */ @@ -417,7 +419,7 @@ export class ReplicationAccess { /** * A list of indices (or index name patterns) to which the permissions in this entry apply. */ - names: IndexName[] + names: IndexName | IndexName[] /** * This needs to be set to true if the patterns in the names field should cover system indices. * @server_default false @@ -434,7 +436,7 @@ export class SearchAccess { /** * A list of indices (or index name patterns) to which the permissions in this entry apply. */ - names: IndexName[] + names: IndexName | IndexName[] /** * A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. */