From 5f0128d6e2d7b3550b1b27dc2d83df5c3e766447 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 18 Nov 2024 10:42:16 +0400 Subject: [PATCH] Allow index name patterns in Privileges index fields (#3127) (cherry picked from commit dd55c46bfe8334f57dfd831b56197ed3574a8a8b) --- specification/security/_types/Privileges.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/specification/security/_types/Privileges.ts b/specification/security/_types/Privileges.ts index e285e45e2f..f599235e87 100644 --- a/specification/security/_types/Privileges.ts +++ b/specification/security/_types/Privileges.ts @@ -220,10 +220,12 @@ export class IndicesPrivileges { * @doc_id field-and-document-access-control */ field_security?: FieldSecurity + // We're using IndexName | IndexName[] instead of Indices in this file on purpose: + // https://github.com/elastic/elasticsearch-specification/pull/3127 /** * A list of indices (or index name patterns) to which the permissions in this entry apply. */ - names: Indices + names: IndexName | IndexName[] /** * The index level privileges that owners of the role have on the specified indices. */ @@ -257,7 +259,7 @@ export class RemoteIndicesPrivileges { /** * A list of indices (or index name patterns) to which the permissions in this entry apply. */ - names: Indices + names: IndexName | IndexName[] /** * The index level privileges that owners of the role have on the specified indices. */ @@ -297,7 +299,7 @@ export class UserIndicesPrivileges { /** * A list of indices (or index name patterns) to which the permissions in this entry apply. */ - names: Indices + names: IndexName | IndexName[] /** * The index level privileges that owners of the role have on the specified indices. */ @@ -417,7 +419,7 @@ export class ReplicationAccess { /** * A list of indices (or index name patterns) to which the permissions in this entry apply. */ - names: IndexName[] + names: IndexName | IndexName[] /** * This needs to be set to true if the patterns in the names field should cover system indices. * @server_default false @@ -434,7 +436,7 @@ export class SearchAccess { /** * A list of indices (or index name patterns) to which the permissions in this entry apply. */ - names: IndexName[] + names: IndexName | IndexName[] /** * A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. */