From 8d5d9698c2b8a395332eb3ab886fa7712a116625 Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Tue, 12 Nov 2024 12:56:47 -0600 Subject: [PATCH 1/6] support for security:remote_cluster --- compiler/package-lock.json | 10 +- output/schema/schema.json | 269 ++++++++++++++++-- output/typescript/types.ts | 21 +- package-lock.json | 8 +- package.json | 2 +- specification/security/_types/Privileges.ts | 36 +++ .../security/_types/RoleDescriptor.ts | 26 +- .../SecurityGetBuiltinPrivilegesResponse.ts | 3 +- specification/security/get_role/types.ts | 14 +- .../put_role/SecurityPutRoleRequest.ts | 8 +- 10 files changed, 357 insertions(+), 40 deletions(-) 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 c19dea2d46..159e772243 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -186932,7 +186932,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L372-L374" + "specLocation": "security/_types/Privileges.ts#L408-L410" }, { "kind": "interface", @@ -187254,6 +187254,12 @@ }, "name": "monitor_snapshot" }, + { + "availability": { + "stack": {} + }, + "name": "monitor_stats" + }, { "availability": { "stack": {} @@ -187328,7 +187334,33 @@ "name": "ClusterPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L42-L195" + "specLocation": "security/_types/Privileges.ts#L42-L199" + }, + { + "kind": "enum", + "members": [ + { + "availability": { + "stack": { + "since": "8.14.0" + } + }, + "name": "monitor_enrich" + }, + { + "availability": { + "stack": { + "since": "8.17.0" + } + }, + "name": "monitor_stats" + } + ], + "name": { + "name": "ClusterPrivilegeForRemote", + "namespace": "security._types" + }, + "specLocation": "security/_types/Privileges.ts#L201-L214" }, { "kind": "interface", @@ -187449,7 +187481,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L368-L370" + "specLocation": "security/_types/Privileges.ts#L404-L406" }, { "kind": "enum", @@ -187562,7 +187594,7 @@ "name": "IndexPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L324-L366" + "specLocation": "security/_types/Privileges.ts#L360-L402" }, { "kind": "interface", @@ -187644,7 +187676,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L198-L222" + "specLocation": "security/_types/Privileges.ts#L217-L241" }, { "kind": "type_alias", @@ -187658,7 +187690,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": [ @@ -187708,7 +187740,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L376-L378" + "specLocation": "security/_types/Privileges.ts#L412-L414" }, { "kind": "interface", @@ -187744,6 +187776,45 @@ }, { "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": "ClusterPrivilegeForRemote", + "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" @@ -187834,7 +187905,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L225-L253" + "specLocation": "security/_types/Privileges.ts#L243-L275" }, { "kind": "interface", @@ -187859,7 +187930,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L380-L385" + "specLocation": "security/_types/Privileges.ts#L416-L421" }, { "kind": "interface", @@ -187901,6 +187972,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": {} @@ -188006,7 +188117,7 @@ } } ], - "specLocation": "security/_types/RoleDescriptor.ts#L31-L64" + "specLocation": "security/_types/RoleDescriptor.ts#L31-L77" }, { "kind": "interface", @@ -188068,6 +188179,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": {} @@ -188173,7 +188324,7 @@ } } ], - "specLocation": "security/_types/RoleDescriptor.ts#L66-L98" + "specLocation": "security/_types/RoleDescriptor.ts#L79-L122" }, { "kind": "interface", @@ -188351,7 +188502,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": [ @@ -188394,7 +188545,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L289-L299" + "specLocation": "security/_types/Privileges.ts#L325-L335" }, { "kind": "interface", @@ -188482,7 +188633,7 @@ } ], "shortcutProperty": "source", - "specLocation": "security/_types/Privileges.ts#L301-L319" + "specLocation": "security/_types/Privileges.ts#L337-L355" }, { "kind": "interface", @@ -188549,7 +188700,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L387-L407" + "specLocation": "security/_types/Privileges.ts#L423-L443" }, { "kind": "enum", @@ -188763,7 +188914,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L255-L277" + "specLocation": "security/_types/Privileges.ts#L291-L313" }, { "kind": "interface", @@ -191758,8 +191909,8 @@ "value": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ClusterPrivilege", + "namespace": "security._types" } } } @@ -191777,6 +191928,20 @@ } } } + }, + { + "name": "remote_cluster", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "ClusterPrivilegeForRemote", + "namespace": "security._types" + } + } + } } ] }, @@ -191784,7 +191949,7 @@ "name": "Response", "namespace": "security.get_builtin_privileges" }, - "specLocation": "security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L22-L24" + "specLocation": "security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L23-L25" }, { "kind": "request", @@ -191954,8 +192119,8 @@ "value": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ClusterPrivilege", + "namespace": "security._types" } } } @@ -191974,6 +192139,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, @@ -192099,7 +192302,7 @@ } } ], - "specLocation": "security/get_role/types.ts#L29-L42" + "specLocation": "security/get_role/types.ts#L29-L50" }, { "kind": "request", @@ -194565,6 +194768,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", @@ -194666,7 +194889,7 @@ } } ], - "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L31-L95" + "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L31-L101" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 71da122a94..29b343d40f 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -17630,7 +17630,9 @@ 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 type SecurityClusterPrivilegeForRemote = 'monitor_enrich' | 'monitor_stats' export interface SecurityCreatedStatus { created: boolean @@ -17674,6 +17676,11 @@ export interface SecurityRealmInfo { type: string } +export interface SecurityRemoteClusterPrivileges { + clusters: Names + privileges: SecurityClusterPrivilegeForRemote[] +} + export interface SecurityRemoteIndicesPrivileges { clusters: Names field_security?: SecurityFieldSecurity @@ -17691,6 +17698,8 @@ export interface SecurityRoleDescriptor { cluster?: SecurityClusterPrivilege[] indices?: SecurityIndicesPrivileges[] index?: SecurityIndicesPrivileges[] + remote_indices?: SecurityRemoteIndicesPrivileges[] + remote_cluster?: SecurityRemoteClusterPrivileges[] global?: SecurityGlobalPrivilege[] | SecurityGlobalPrivilege applications?: SecurityApplicationPrivileges[] metadata?: Metadata @@ -17703,6 +17712,8 @@ export interface SecurityRoleDescriptorRead { cluster: SecurityClusterPrivilege[] indices: SecurityIndicesPrivileges[] index: SecurityIndicesPrivileges[] + remote_indices?: SecurityRemoteIndicesPrivileges[] + remote_cluster?: SecurityRemoteClusterPrivileges[] global?: SecurityGlobalPrivilege[] | SecurityGlobalPrivilege applications?: SecurityApplicationPrivileges[] metadata?: Metadata @@ -18102,8 +18113,9 @@ export interface SecurityGetBuiltinPrivilegesRequest extends RequestBase { } export interface SecurityGetBuiltinPrivilegesResponse { - cluster: string[] + cluster: SecurityClusterPrivilege[] index: IndexName[] + remote_cluster: SecurityClusterPrivilegeForRemote[] } export interface SecurityGetPrivilegesRequest extends RequestBase { @@ -18120,8 +18132,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 @@ -18387,6 +18401,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-lock.json b/package-lock.json index 8bd812f6b6..2323b099fe 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": { @@ -200,9 +200,9 @@ } }, "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==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-cli/-/spectral-cli-6.13.1.tgz", + "integrity": "sha512-v6ipX4w6wRhtbOotwdPL7RrEkP0m1OwHTIyqzVrAPi932F/zkee24jmf1CHNrTynonmfGoU6/XpeqUHtQdKDFw==", "license": "Apache-2.0", "dependencies": { "@stoplight/json": "~3.21.0", diff --git a/package.json b/package.json index e936d7f831..0d26b9a7ed 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "@stoplight/spectral-cli": "^6.13.0" + "@stoplight/spectral-cli": "^6.13.1" } } diff --git a/specification/security/_types/Privileges.ts b/specification/security/_types/Privileges.ts index 14f2977557..e930b324ee 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 + */ + 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 ClusterPrivilegeForRemote { + /** + * @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: ClusterPrivilegeForRemote[] +} + 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..2df572e6b5 100644 --- a/specification/security/_types/RoleDescriptor.ts +++ b/specification/security/_types/RoleDescriptor.ts @@ -25,7 +25,7 @@ import { ApplicationPrivileges, ClusterPrivilege, GlobalPrivilege, - IndicesPrivileges + IndicesPrivileges, RemoteClusterPrivileges, RemoteIndicesPrivileges } from './Privileges' export class RoleDescriptor { @@ -38,6 +38,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 +86,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..f72456f9e8 100644 --- a/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts +++ b/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts @@ -18,7 +18,8 @@ */ import { IndexName } from '@_types/common' +import {ClusterPrivilege, ClusterPrivilegeForRemote} from "@security/_types/Privileges"; export class Response { - body: { cluster: string[]; index: IndexName[] } + body: { cluster: ClusterPrivilege[]; index: IndexName[]; remote_cluster: ClusterPrivilegeForRemote[] } } diff --git a/specification/security/get_role/types.ts b/specification/security/get_role/types.ts index 1ba672b074..080de468b5 100644 --- a/specification/security/get_role/types.ts +++ b/specification/security/get_role/types.ts @@ -18,8 +18,8 @@ */ import { - ApplicationPrivileges, - IndicesPrivileges + ApplicationPrivileges, ClusterPrivilege, + IndicesPrivileges, RemoteClusterPrivileges, RemoteIndicesPrivileges } from '@security/_types/Privileges' import { RoleTemplate } from '@security/_types/RoleTemplate' import { Dictionary } from '@spec_utils/Dictionary' @@ -27,8 +27,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..ff70fdf357 100644 --- a/specification/security/put_role/SecurityPutRoleRequest.ts +++ b/specification/security/put_role/SecurityPutRoleRequest.ts @@ -20,7 +20,7 @@ import { ApplicationPrivileges, ClusterPrivilege, - IndicesPrivileges, + IndicesPrivileges, RemoteClusterPrivileges, RemoteIndicesPrivileges } from '@security/_types/Privileges' import { Dictionary } from '@spec_utils/Dictionary' @@ -74,6 +74,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 1d5d03a7c17f78b675e2ae52c52eefc9332f638a Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Wed, 13 Nov 2024 14:42:02 -0600 Subject: [PATCH 2/6] make spec-format-fix --- specification/security/_types/RoleDescriptor.ts | 4 +++- .../SecurityGetBuiltinPrivilegesResponse.ts | 11 +++++++++-- specification/security/get_role/types.ts | 7 +++++-- .../security/put_role/SecurityPutRoleRequest.ts | 3 ++- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/specification/security/_types/RoleDescriptor.ts b/specification/security/_types/RoleDescriptor.ts index 2df572e6b5..ad8afe33a5 100644 --- a/specification/security/_types/RoleDescriptor.ts +++ b/specification/security/_types/RoleDescriptor.ts @@ -25,7 +25,9 @@ import { ApplicationPrivileges, ClusterPrivilege, GlobalPrivilege, - IndicesPrivileges, RemoteClusterPrivileges, RemoteIndicesPrivileges + IndicesPrivileges, + RemoteClusterPrivileges, + RemoteIndicesPrivileges } from './Privileges' export class RoleDescriptor { diff --git a/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts b/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts index f72456f9e8..da0eb42e8a 100644 --- a/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts +++ b/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts @@ -17,9 +17,16 @@ * under the License. */ +import { + ClusterPrivilege, + ClusterPrivilegeForRemote +} from '@security/_types/Privileges' import { IndexName } from '@_types/common' -import {ClusterPrivilege, ClusterPrivilegeForRemote} from "@security/_types/Privileges"; export class Response { - body: { cluster: ClusterPrivilege[]; index: IndexName[]; remote_cluster: ClusterPrivilegeForRemote[] } + body: { + cluster: ClusterPrivilege[] + index: IndexName[] + remote_cluster: ClusterPrivilegeForRemote[] + } } diff --git a/specification/security/get_role/types.ts b/specification/security/get_role/types.ts index 080de468b5..122b993380 100644 --- a/specification/security/get_role/types.ts +++ b/specification/security/get_role/types.ts @@ -18,8 +18,11 @@ */ import { - ApplicationPrivileges, ClusterPrivilege, - IndicesPrivileges, RemoteClusterPrivileges, RemoteIndicesPrivileges + ApplicationPrivileges, + ClusterPrivilege, + IndicesPrivileges, + RemoteClusterPrivileges, + RemoteIndicesPrivileges } from '@security/_types/Privileges' import { RoleTemplate } from '@security/_types/RoleTemplate' import { Dictionary } from '@spec_utils/Dictionary' diff --git a/specification/security/put_role/SecurityPutRoleRequest.ts b/specification/security/put_role/SecurityPutRoleRequest.ts index ff70fdf357..00726f27b8 100644 --- a/specification/security/put_role/SecurityPutRoleRequest.ts +++ b/specification/security/put_role/SecurityPutRoleRequest.ts @@ -20,7 +20,8 @@ import { ApplicationPrivileges, ClusterPrivilege, - IndicesPrivileges, RemoteClusterPrivileges, + IndicesPrivileges, + RemoteClusterPrivileges, RemoteIndicesPrivileges } from '@security/_types/Privileges' import { Dictionary } from '@spec_utils/Dictionary' From 57db4e8eece7071a0847e08aa3951cbe6caf746c Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Wed, 13 Nov 2024 14:50:18 -0600 Subject: [PATCH 3/6] validation working --- output/schema/schema.json | 10 +++---- package-lock.json | 62 ++++++++++++++++++++++++--------------- package.json | 2 +- 3 files changed, 45 insertions(+), 29 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index b269f2538b..9d6433f2da 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -188202,7 +188202,7 @@ } } ], - "specLocation": "security/_types/RoleDescriptor.ts#L31-L77" + "specLocation": "security/_types/RoleDescriptor.ts#L33-L79" }, { "kind": "interface", @@ -188409,7 +188409,7 @@ } } ], - "specLocation": "security/_types/RoleDescriptor.ts#L79-L122" + "specLocation": "security/_types/RoleDescriptor.ts#L81-L124" }, { "kind": "interface", @@ -192034,7 +192034,7 @@ "name": "Response", "namespace": "security.get_builtin_privileges" }, - "specLocation": "security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L23-L25" + "specLocation": "security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L26-L32" }, { "kind": "request", @@ -192387,7 +192387,7 @@ } } ], - "specLocation": "security/get_role/types.ts#L29-L50" + "specLocation": "security/get_role/types.ts#L32-L53" }, { "kind": "request", @@ -194974,7 +194974,7 @@ } } ], - "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L31-L101" + "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L32-L102" }, { "kind": "response", diff --git a/package-lock.json b/package-lock.json index 102313c98d..6acb66d5f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@stoplight/spectral-cli": "^6.13.1" + "@stoplight/spectral-cli": "^6.14.1" } }, "node_modules/@asyncapi/specs": { @@ -211,14 +211,15 @@ } }, "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==", + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-cli/-/spectral-cli-6.14.1.tgz", + "integrity": "sha512-bseZnTPDYEfpKLxIiW8qOuTcK1gOey6UUAClEBwpxcfc79IQ1MaVKDHsYlJBZMYI4GIW7AFxulIAG06o2Ey8MA==", + "license": "Apache-2.0", "dependencies": { "@stoplight/json": "~3.21.0", "@stoplight/path": "1.3.2", "@stoplight/spectral-core": "^1.19.2", - "@stoplight/spectral-formatters": "^1.4.0", + "@stoplight/spectral-formatters": "^1.4.1", "@stoplight/spectral-parsers": "^1.0.4", "@stoplight/spectral-ref-resolver": "^1.0.4", "@stoplight/spectral-ruleset-bundler": "^1.6.0", @@ -230,9 +231,9 @@ "fast-glob": "~3.2.12", "hpagent": "~1.2.0", "lodash": "~4.17.21", - "pony-cause": "^1.0.0", - "stacktracey": "^2.1.7", - "tslib": "^2.3.0", + "pony-cause": "^1.1.1", + "stacktracey": "^2.1.8", + "tslib": "^2.8.1", "yargs": "~17.7.2" }, "bin": { @@ -301,13 +302,14 @@ } }, "node_modules/@stoplight/spectral-formatters": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-formatters/-/spectral-formatters-1.4.0.tgz", - "integrity": "sha512-nxYQldDzVg32pxQ4cMX27eMtB1A39ea+GSf0wIJ20mqkSBfIgLnRZ+GKkBxhgF9JzSolc4YtweydsubGQGd7ag==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-formatters/-/spectral-formatters-1.4.2.tgz", + "integrity": "sha512-3EwNpymMwxCeXr0ZTV6OPFU1ZPfg6SnKVtpbyhCCc9WY3VOgSFPpA5EwcUmZTu8hqLW9i7FimlE0xfdo+qYcJg==", + "license": "Apache-2.0", "dependencies": { "@stoplight/path": "^1.3.2", - "@stoplight/spectral-core": "^1.15.1", - "@stoplight/spectral-runtime": "^1.1.0", + "@stoplight/spectral-core": "^1.19.2", + "@stoplight/spectral-runtime": "^1.1.2", "@stoplight/types": "^13.15.0", "@types/markdown-escape": "^1.1.3", "chalk": "4.1.2", @@ -317,10 +319,10 @@ "node-sarif-builder": "^2.0.3", "strip-ansi": "6.0", "text-table": "^0.2.0", - "tslib": "^2.5.0" + "tslib": "^2.8.1" }, "engines": { - "node": "^12.20 || >=14.13" + "node": "^16.20 || ^18.18 || >= 20.17" } }, "node_modules/@stoplight/spectral-functions": { @@ -578,7 +580,8 @@ "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==" + "integrity": "sha512-JIc1+s3y5ujKnt/+N+wq6s/QdL2qZ11fP79MijrVXsAAnzSxCbT2j/3prHRouJdZ2yFLN3vkP0HytfnoCczjOw==", + "license": "MIT" }, "node_modules/@types/node": { "version": "20.14.7", @@ -591,7 +594,8 @@ "node_modules/@types/sarif": { "version": "2.1.7", "resolved": "https://registry.npmjs.org/@types/sarif/-/sarif-2.1.7.tgz", - "integrity": "sha512-kRz0VEkJqWLf1LLVN4pT1cg1Z9wAuvI6L97V3m2f5B76Tg8d413ddvLBPTEHAZJlnn4XSvu0FkZtViCQGVyrXQ==" + "integrity": "sha512-kRz0VEkJqWLf1LLVN4pT1cg1Z9wAuvI6L97V3m2f5B76Tg8d413ddvLBPTEHAZJlnn4XSvu0FkZtViCQGVyrXQ==", + "license": "MIT" }, "node_modules/@types/urijs": { "version": "1.19.25", @@ -816,6 +820,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -831,6 +836,7 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -1185,6 +1191,7 @@ "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -1359,7 +1366,8 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" }, "node_modules/has-bigints": { "version": "1.0.2", @@ -1373,6 +1381,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", "engines": { "node": ">=8" } @@ -1755,6 +1764,7 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, @@ -1817,7 +1827,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==" + "integrity": "sha512-Trz4v0+XWlwy68LJIyw3bLbsJiC8XAbRCKF9DbEtZjyndKOGVx6n+wNB0VfoRmY2LKboQLeniap3xrb6LGSJ8A==", + "license": "MIT" }, "node_modules/merge2": { "version": "1.4.1", @@ -1891,6 +1902,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/node-sarif-builder/-/node-sarif-builder-2.0.3.tgz", "integrity": "sha512-Pzr3rol8fvhG/oJjIq2NTVB0vmdNNlz22FENhhPojYRZ4/ee08CfK4YuKmuL54V9MLhI1kpzxfOJ/63LzmZzDg==", + "license": "MIT", "dependencies": { "@types/sarif": "^2.1.4", "fs-extra": "^10.0.0" @@ -2304,6 +2316,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2326,7 +2339,8 @@ "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "license": "MIT" }, "node_modules/to-regex-range": { "version": "5.0.1", @@ -2345,9 +2359,10 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/typed-array-buffer": { "version": "1.0.2", @@ -2441,6 +2456,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "license": "MIT", "engines": { "node": ">= 10.0.0" } 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" } } From 9a70a07e08e1ad76df845a341c40e16721c70720 Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Wed, 13 Nov 2024 14:52:16 -0600 Subject: [PATCH 4/6] rename to RemoteClusterPrivilege --- output/schema/schema.json | 56 +++++++++---------- output/typescript/types.ts | 8 +-- specification/security/_types/Privileges.ts | 4 +- .../SecurityGetBuiltinPrivilegesResponse.ts | 4 +- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 9d6433f2da..dee25fcbb2 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -187421,32 +187421,6 @@ }, "specLocation": "security/_types/Privileges.ts#L42-L199" }, - { - "kind": "enum", - "members": [ - { - "availability": { - "stack": { - "since": "8.14.0" - } - }, - "name": "monitor_enrich" - }, - { - "availability": { - "stack": { - "since": "8.17.0" - } - }, - "name": "monitor_stats" - } - ], - "name": { - "name": "ClusterPrivilegeForRemote", - "namespace": "security._types" - }, - "specLocation": "security/_types/Privileges.ts#L201-L214" - }, { "kind": "interface", "name": { @@ -187859,6 +187833,32 @@ ], "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.", @@ -187888,7 +187888,7 @@ "value": { "kind": "instance_of", "type": { - "name": "ClusterPrivilegeForRemote", + "name": "RemoteClusterPrivilege", "namespace": "security._types" } } @@ -192022,7 +192022,7 @@ "value": { "kind": "instance_of", "type": { - "name": "ClusterPrivilegeForRemote", + "name": "RemoteClusterPrivilege", "namespace": "security._types" } } diff --git a/output/typescript/types.ts b/output/typescript/types.ts index e107685588..beb214d697 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -17640,8 +17640,6 @@ export interface SecurityClusterNode { 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 type SecurityClusterPrivilegeForRemote = 'monitor_enrich' | 'monitor_stats' - export interface SecurityCreatedStatus { created: boolean } @@ -17684,9 +17682,11 @@ export interface SecurityRealmInfo { type: string } +export type SecurityRemoteClusterPrivilege = 'monitor_enrich' | 'monitor_stats' + export interface SecurityRemoteClusterPrivileges { clusters: Names - privileges: SecurityClusterPrivilegeForRemote[] + privileges: SecurityRemoteClusterPrivilege[] } export interface SecurityRemoteIndicesPrivileges { @@ -18123,7 +18123,7 @@ export interface SecurityGetBuiltinPrivilegesRequest extends RequestBase { export interface SecurityGetBuiltinPrivilegesResponse { cluster: SecurityClusterPrivilege[] index: IndexName[] - remote_cluster: SecurityClusterPrivilegeForRemote[] + remote_cluster: SecurityRemoteClusterPrivilege[] } export interface SecurityGetPrivilegesRequest extends RequestBase { diff --git a/specification/security/_types/Privileges.ts b/specification/security/_types/Privileges.ts index e930b324ee..74fdb51661 100644 --- a/specification/security/_types/Privileges.ts +++ b/specification/security/_types/Privileges.ts @@ -202,7 +202,7 @@ export enum ClusterPrivilege { * The subset of cluster level privileges that can be defined for remote clusters. * @availability stack */ -export enum ClusterPrivilegeForRemote { +export enum RemoteClusterPrivilege { /** * @availability stack since=8.14.0 */ @@ -285,7 +285,7 @@ export class RemoteClusterPrivileges { /** * The cluster level privileges that owners of the role have on the remote cluster. */ - privileges: ClusterPrivilegeForRemote[] + privileges: RemoteClusterPrivilege[] } export class UserIndicesPrivileges { diff --git a/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts b/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts index da0eb42e8a..a1f81e913e 100644 --- a/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts +++ b/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts @@ -19,7 +19,7 @@ import { ClusterPrivilege, - ClusterPrivilegeForRemote + RemoteClusterPrivilege } from '@security/_types/Privileges' import { IndexName } from '@_types/common' @@ -27,6 +27,6 @@ export class Response { body: { cluster: ClusterPrivilege[] index: IndexName[] - remote_cluster: ClusterPrivilegeForRemote[] + remote_cluster: RemoteClusterPrivilege[] } } From ca540518dd3a8e9c887135179aca043f23252739 Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Thu, 14 Nov 2024 11:03:42 -0600 Subject: [PATCH 5/6] revert package-lock.lock to upstream --- compiler/package-lock.json | 10 ++---- package-lock.json | 62 ++++++++++++++------------------------ 2 files changed, 26 insertions(+), 46 deletions(-) diff --git a/compiler/package-lock.json b/compiler/package-lock.json index 56c687fd0d..ed183152ca 100644 --- a/compiler/package-lock.json +++ b/compiler/package-lock.json @@ -33,10 +33,6 @@ "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", @@ -1544,8 +1540,8 @@ "dev": true }, "node_modules/compiler-wasm-lib": { - "resolved": "../compiler-rs/compiler-wasm-lib/pkg", - "link": true + "version": "0.1.0", + "resolved": "file:../compiler-rs/compiler-wasm-lib/pkg" }, "node_modules/concat-map": { "version": "0.0.1", @@ -6488,7 +6484,7 @@ "dev": true }, "compiler-wasm-lib": { - "version": "file:../compiler-rs/compiler-wasm-lib/pkg" + "version": "0.1.0" }, "concat-map": { "version": "0.0.1", diff --git a/package-lock.json b/package-lock.json index 6acb66d5f2..f450c044a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@stoplight/spectral-cli": "^6.14.1" + "@stoplight/spectral-cli": "^6.13.1" } }, "node_modules/@asyncapi/specs": { @@ -211,15 +211,14 @@ } }, "node_modules/@stoplight/spectral-cli": { - "version": "6.14.1", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-cli/-/spectral-cli-6.14.1.tgz", - "integrity": "sha512-bseZnTPDYEfpKLxIiW8qOuTcK1gOey6UUAClEBwpxcfc79IQ1MaVKDHsYlJBZMYI4GIW7AFxulIAG06o2Ey8MA==", - "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.19.2", - "@stoplight/spectral-formatters": "^1.4.1", + "@stoplight/spectral-formatters": "^1.4.0", "@stoplight/spectral-parsers": "^1.0.4", "@stoplight/spectral-ref-resolver": "^1.0.4", "@stoplight/spectral-ruleset-bundler": "^1.6.0", @@ -231,9 +230,9 @@ "fast-glob": "~3.2.12", "hpagent": "~1.2.0", "lodash": "~4.17.21", - "pony-cause": "^1.1.1", - "stacktracey": "^2.1.8", - "tslib": "^2.8.1", + "pony-cause": "^1.0.0", + "stacktracey": "^2.1.7", + "tslib": "^2.3.0", "yargs": "~17.7.2" }, "bin": { @@ -302,14 +301,13 @@ } }, "node_modules/@stoplight/spectral-formatters": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-formatters/-/spectral-formatters-1.4.2.tgz", - "integrity": "sha512-3EwNpymMwxCeXr0ZTV6OPFU1ZPfg6SnKVtpbyhCCc9WY3VOgSFPpA5EwcUmZTu8hqLW9i7FimlE0xfdo+qYcJg==", - "license": "Apache-2.0", + "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.19.2", - "@stoplight/spectral-runtime": "^1.1.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", @@ -319,10 +317,10 @@ "node-sarif-builder": "^2.0.3", "strip-ansi": "6.0", "text-table": "^0.2.0", - "tslib": "^2.8.1" + "tslib": "^2.5.0" }, "engines": { - "node": "^16.20 || ^18.18 || >= 20.17" + "node": "^12.20 || >=14.13" } }, "node_modules/@stoplight/spectral-functions": { @@ -580,8 +578,7 @@ "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==", - "license": "MIT" + "integrity": "sha512-JIc1+s3y5ujKnt/+N+wq6s/QdL2qZ11fP79MijrVXsAAnzSxCbT2j/3prHRouJdZ2yFLN3vkP0HytfnoCczjOw==" }, "node_modules/@types/node": { "version": "20.14.7", @@ -594,8 +591,7 @@ "node_modules/@types/sarif": { "version": "2.1.7", "resolved": "https://registry.npmjs.org/@types/sarif/-/sarif-2.1.7.tgz", - "integrity": "sha512-kRz0VEkJqWLf1LLVN4pT1cg1Z9wAuvI6L97V3m2f5B76Tg8d413ddvLBPTEHAZJlnn4XSvu0FkZtViCQGVyrXQ==", - "license": "MIT" + "integrity": "sha512-kRz0VEkJqWLf1LLVN4pT1cg1Z9wAuvI6L97V3m2f5B76Tg8d413ddvLBPTEHAZJlnn4XSvu0FkZtViCQGVyrXQ==" }, "node_modules/@types/urijs": { "version": "1.19.25", @@ -820,7 +816,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -836,7 +831,6 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -1191,7 +1185,6 @@ "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -1366,8 +1359,7 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "license": "ISC" + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/has-bigints": { "version": "1.0.2", @@ -1381,7 +1373,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", "engines": { "node": ">=8" } @@ -1764,7 +1755,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, @@ -1827,8 +1817,7 @@ "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==", - "license": "MIT" + "integrity": "sha512-Trz4v0+XWlwy68LJIyw3bLbsJiC8XAbRCKF9DbEtZjyndKOGVx6n+wNB0VfoRmY2LKboQLeniap3xrb6LGSJ8A==" }, "node_modules/merge2": { "version": "1.4.1", @@ -1902,7 +1891,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/node-sarif-builder/-/node-sarif-builder-2.0.3.tgz", "integrity": "sha512-Pzr3rol8fvhG/oJjIq2NTVB0vmdNNlz22FENhhPojYRZ4/ee08CfK4YuKmuL54V9MLhI1kpzxfOJ/63LzmZzDg==", - "license": "MIT", "dependencies": { "@types/sarif": "^2.1.4", "fs-extra": "^10.0.0" @@ -2316,7 +2304,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2339,8 +2326,7 @@ "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "license": "MIT" + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "node_modules/to-regex-range": { "version": "5.0.1", @@ -2359,10 +2345,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" }, "node_modules/typed-array-buffer": { "version": "1.0.2", @@ -2456,7 +2441,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", "engines": { "node": ">= 10.0.0" } From 720e1f0b7cd3f408d799a4d698740056ca37b2f0 Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Thu, 14 Nov 2024 11:10:22 -0600 Subject: [PATCH 6/6] additional constraint --- specification/security/_types/Privileges.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/security/_types/Privileges.ts b/specification/security/_types/Privileges.ts index 74fdb51661..d3d6c7c319 100644 --- a/specification/security/_types/Privileges.ts +++ b/specification/security/_types/Privileges.ts @@ -152,7 +152,7 @@ export enum ClusterPrivilege { */ monitor_snapshot, /** - * @availability stack + * @availability stack since=8.17.0 */ monitor_stats, /**