Skip to content

API specification changes for custom roles #2491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
343 changes: 310 additions & 33 deletions output/openapi/elasticsearch-serverless-openapi.json

Large diffs are not rendered by default.

146 changes: 121 additions & 25 deletions output/schema/schema.json

Large diffs are not rendered by default.

133 changes: 118 additions & 15 deletions output/schema/schema/schema.json

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions output/schema/validation-errors.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 94 additions & 5 deletions specification/security/_types/Privileges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,58 +42,134 @@ export class ApplicationPrivileges {
export enum ClusterPrivilege {
all,
cancel_task,
/**
* @availability stack
*/
create_snapshot,
/**
* @availability stack
*/
grant_api_key,
/**
* @availability stack
*/
cross_cluster_replication,
/**
* @availability stack
*/
cross_cluster_search,
/**
* @availability stack
*/
delegate_pki,
grant_api_key,
manage,
manage_api_key,
/**
* @availability stack
*/
manage_autoscaling,
manage_behavioral_analytics,
/**
* @availability stack
*/
manage_ccr,
manage_data_frame_transforms,
manage_data_stream_global_retention,
manage_enrich,
/**
* @availability stack
*/
manage_ilm,
manage_index_templates,
/**
* @availability stack
*/
manage_inference,
manage_ingest_pipelines,
manage_logstash_pipelines,
manage_ml,
/**
* @availability stack
*/
manage_oidc,
manage_own_api_key,
manage_pipeline,
/**
* @availability stack
*/
manage_rollup,
/**
* @availability stack
*/
manage_saml,
manage_search_application,
manage_search_query_rules,
manage_search_synonyms,
manage_security,
/**
* @availability stack
*/
manage_service_account,
/**
* @availability stack
*/
manage_slm,
/**
* @availability stack
*/
manage_token,
manage_transform,
/**
* @availability stack
*/
manage_user_profile,
/**
* @availability stack
*/
manage_watcher,
monitor,
monitor_data_frame_transforms,
monitor_data_stream_global_retention,
monitor_enrich,
monitor_inference,
monitor_ml,
/**
* @availability stack
*/
monitor_rollup,
/**
* @availability stack
*/
monitor_snapshot,
/**
* @availability stack
*/
monitor_text_structure,
monitor_transform,
/**
* @availability stack
*/
monitor_watcher,
none,
post_behavioral_analytics_event,
/**
* @availability stack
*/
read_ccr,
read_connector_secrets,
read_fleet_secrets,
/**
* @availability stack
*/
read_ilm,
read_pipeline,
/**
* @availability stack
*/
read_slm,
/**
* @availability stack
*/
transport_client,
none,
post_behavioral_analytics_event,
read_pipeline,
read_security,
read_slm,
transport_client,
Expand Down Expand Up @@ -122,6 +198,7 @@ export class IndicesPrivileges {
/**
* 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`.
* @server_default false
* @availability stack
*/
allow_restricted_indices?: boolean
}
Expand Down Expand Up @@ -200,12 +277,24 @@ export enum IndexPrivilege {
maintenance,
manage,
manage_data_stream_lifecycle,
/**
* @availability stack
*/
manage_follow_index,
/**
* @availability stack
*/
manage_ilm,
/**
* @availability stack
*/
manage_leader_index,
monitor,
none,
read,
/**
* @availability stack
*/
read_cross_cluster,
view_index_metadata,
write
Expand Down
2 changes: 1 addition & 1 deletion specification/security/get_role/SecurityGetRoleRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { Names } from '@_types/common'
* The get roles API cannot retrieve roles that are defined in roles files.
* @rest_spec_name security.get_role
* @availability stack since=0.0.0 stability=stable
* @availability serverless stability=stable visibility=private
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_security
*/
export interface Request extends RequestBase {
Expand Down
5 changes: 3 additions & 2 deletions specification/security/put_role/SecurityPutRoleRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { Metadata, Name, Refresh } from '@_types/common'
* The create or update roles API cannot update roles that are defined in roles files.
* @rest_spec_name security.put_role
* @availability stack since=0.0.0 stability=stable
* @availability serverless stability=stable visibility=private
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_security
*/
export interface Request extends RequestBase {
Expand All @@ -56,6 +56,7 @@ export interface Request extends RequestBase {
cluster?: ClusterPrivilege[]
/**
* 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
*/
global?: Dictionary<string, UserDefinedValue>
/**
Expand All @@ -67,7 +68,7 @@ export interface Request extends RequestBase {
*/
metadata?: Metadata
/**
* A list of users that the owners of this role can impersonate.
* 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.
* @doc_id run-as-privilege
*/
run_as?: string[]
Expand Down
Loading