Skip to content

Commit

Permalink
Add restriction to RoleDescriptor (#3142)
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin authored Nov 19, 2024
1 parent 60466c7 commit 496e0b8
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 7 deletions.
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
}

0 comments on commit 496e0b8

Please sign in to comment.