Skip to content
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

Add restriction to RoleDescriptor #3142

Merged
merged 1 commit into from
Nov 19, 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
33 changes: 33 additions & 0 deletions output/openapi/elasticsearch-openapi.json

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

30 changes: 30 additions & 0 deletions output/openapi/elasticsearch-serverless-openapi.json

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

52 changes: 51 additions & 1 deletion output/schema/schema-serverless.json

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

66 changes: 64 additions & 2 deletions output/schema/schema.json

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

8 changes: 8 additions & 0 deletions output/typescript/types.ts

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

21 changes: 17 additions & 4 deletions specification/security/_types/RoleDescriptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,16 @@ 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
Expand All @@ -75,6 +72,10 @@ export class RoleDescriptor {
* Optional description of the role descriptor
*/
description?: string
/**
* Restriction for when the role descriptor is allowed to be effective.
*/
restriction?: Restriction
transient_metadata?: Dictionary<string, UserDefinedValue>
}

Expand All @@ -93,7 +94,6 @@ export class RoleDescriptorRead implements OverloadOf<RoleDescriptor> {
* @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
Expand All @@ -120,5 +120,18 @@ export class RoleDescriptorRead implements OverloadOf<RoleDescriptor> {
* Optional description of the role descriptor
*/
description?: string
/**
* Restriction for when the role descriptor is allowed to be effective.
*/
restriction?: Restriction
transient_metadata?: Dictionary<string, UserDefinedValue>
}

export class Restriction {
workflows: RestrictionWorkflow[]
}

/** @non_exhaustive */
export enum RestrictionWorkflow {
search_application_query
}
Loading