Skip to content

Commit 2731ca8

Browse files
authored
API specification changes for custom roles (#2491)
1 parent 17c8dea commit 2731ca8

File tree

8 files changed

+659
-82
lines changed

8 files changed

+659
-82
lines changed

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 310 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 121 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema/schema.json

Lines changed: 118 additions & 15 deletions
Large diffs are not rendered by default.

output/schema/validation-errors.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/security/_types/Privileges.ts

Lines changed: 94 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,58 +42,134 @@ export class ApplicationPrivileges {
4242
export enum ClusterPrivilege {
4343
all,
4444
cancel_task,
45+
/**
46+
* @availability stack
47+
*/
4548
create_snapshot,
49+
/**
50+
* @availability stack
51+
*/
52+
grant_api_key,
53+
/**
54+
* @availability stack
55+
*/
4656
cross_cluster_replication,
57+
/**
58+
* @availability stack
59+
*/
4760
cross_cluster_search,
61+
/**
62+
* @availability stack
63+
*/
4864
delegate_pki,
49-
grant_api_key,
5065
manage,
5166
manage_api_key,
67+
/**
68+
* @availability stack
69+
*/
5270
manage_autoscaling,
5371
manage_behavioral_analytics,
72+
/**
73+
* @availability stack
74+
*/
5475
manage_ccr,
5576
manage_data_frame_transforms,
5677
manage_data_stream_global_retention,
5778
manage_enrich,
79+
/**
80+
* @availability stack
81+
*/
5882
manage_ilm,
5983
manage_index_templates,
84+
/**
85+
* @availability stack
86+
*/
6087
manage_inference,
6188
manage_ingest_pipelines,
6289
manage_logstash_pipelines,
6390
manage_ml,
91+
/**
92+
* @availability stack
93+
*/
6494
manage_oidc,
6595
manage_own_api_key,
6696
manage_pipeline,
97+
/**
98+
* @availability stack
99+
*/
67100
manage_rollup,
101+
/**
102+
* @availability stack
103+
*/
68104
manage_saml,
69105
manage_search_application,
70106
manage_search_query_rules,
71107
manage_search_synonyms,
72108
manage_security,
109+
/**
110+
* @availability stack
111+
*/
73112
manage_service_account,
113+
/**
114+
* @availability stack
115+
*/
74116
manage_slm,
117+
/**
118+
* @availability stack
119+
*/
75120
manage_token,
76121
manage_transform,
122+
/**
123+
* @availability stack
124+
*/
77125
manage_user_profile,
126+
/**
127+
* @availability stack
128+
*/
78129
manage_watcher,
79130
monitor,
80131
monitor_data_frame_transforms,
81132
monitor_data_stream_global_retention,
82133
monitor_enrich,
83134
monitor_inference,
84135
monitor_ml,
136+
/**
137+
* @availability stack
138+
*/
85139
monitor_rollup,
140+
/**
141+
* @availability stack
142+
*/
86143
monitor_snapshot,
144+
/**
145+
* @availability stack
146+
*/
87147
monitor_text_structure,
88148
monitor_transform,
149+
/**
150+
* @availability stack
151+
*/
89152
monitor_watcher,
90-
none,
91-
post_behavioral_analytics_event,
153+
/**
154+
* @availability stack
155+
*/
92156
read_ccr,
93-
read_connector_secrets,
94-
read_fleet_secrets,
157+
/**
158+
* @availability stack
159+
*/
95160
read_ilm,
96161
read_pipeline,
162+
/**
163+
* @availability stack
164+
*/
165+
read_slm,
166+
/**
167+
* @availability stack
168+
*/
169+
transport_client,
170+
none,
171+
post_behavioral_analytics_event,
172+
read_pipeline,
97173
read_security,
98174
read_slm,
99175
transport_client,
@@ -122,6 +198,7 @@ export class IndicesPrivileges {
122198
/**
123199
* 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`.
124200
* @server_default false
201+
* @availability stack
125202
*/
126203
allow_restricted_indices?: boolean
127204
}
@@ -200,12 +277,24 @@ export enum IndexPrivilege {
200277
maintenance,
201278
manage,
202279
manage_data_stream_lifecycle,
280+
/**
281+
* @availability stack
282+
*/
203283
manage_follow_index,
284+
/**
285+
* @availability stack
286+
*/
204287
manage_ilm,
288+
/**
289+
* @availability stack
290+
*/
205291
manage_leader_index,
206292
monitor,
207293
none,
208294
read,
295+
/**
296+
* @availability stack
297+
*/
209298
read_cross_cluster,
210299
view_index_metadata,
211300
write

specification/security/get_role/SecurityGetRoleRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { Names } from '@_types/common'
2525
* The get roles API cannot retrieve roles that are defined in roles files.
2626
* @rest_spec_name security.get_role
2727
* @availability stack since=0.0.0 stability=stable
28-
* @availability serverless stability=stable visibility=private
28+
* @availability serverless stability=stable visibility=public
2929
* @cluster_privileges manage_security
3030
*/
3131
export interface Request extends RequestBase {

specification/security/put_role/SecurityPutRoleRequest.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { Metadata, Name, Refresh } from '@_types/common'
3232
* The create or update roles API cannot update roles that are defined in roles files.
3333
* @rest_spec_name security.put_role
3434
* @availability stack since=0.0.0 stability=stable
35-
* @availability serverless stability=stable visibility=private
35+
* @availability serverless stability=stable visibility=public
3636
* @cluster_privileges manage_security
3737
*/
3838
export interface Request extends RequestBase {
@@ -56,6 +56,7 @@ export interface Request extends RequestBase {
5656
cluster?: ClusterPrivilege[]
5757
/**
5858
* 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.
59+
* @availability stack
5960
*/
6061
global?: Dictionary<string, UserDefinedValue>
6162
/**
@@ -67,7 +68,7 @@ export interface Request extends RequestBase {
6768
*/
6869
metadata?: Metadata
6970
/**
70-
* A list of users that the owners of this role can impersonate.
71+
* A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.
7172
* @doc_id run-as-privilege
7273
*/
7374
run_as?: string[]

0 commit comments

Comments
 (0)