Closed asal-hesehus closed 1 month ago
I tried to add "a", "b"... as a workaround, but that was not serialized as a string array but as a joined string: {"name":"ElasticKeyName","role_descriptors":{"myname":{"cluster":["manage_pipeline","manage"],"indices":[{"names":"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y*","privileges":["all"]}]}}}
In the documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html "names" is a array of strings.
Elastic.Clients.Elasticsearch version: 8.15.8
Elasticsearch version:8.15.1
.NET runtime version:8.0
Operating system version: Windows 11
Description of the problem including expected versus actual behavior: CreateApiKeyRequest, has RoleDescriptors, witch has IndicesPrivileges with Names Names are Indicies. But when setting Indices to "" the "" is converted to "_all". But _all is not supported by the elastic search server.
It is the same issue with GetApiKeyResponse, where the Name is "*" and is then converted to _all when deserilized:
Expected behavior "*" is serialized as {"name":"ElasticKeyName","role_descriptors":{"rolename":{"cluster":["manage_pipeline","manage"],"indices":[{"names":"_all","privileges":["all"]}]}}}
I would expected it to be "" is serialized as {"name":"ElasticKeyName","role_descriptors":{"rolename":{"cluster":["manage_pipeline","manage"],"indices":[{"names":"","privileges":["all"]}]}}}