Can't add setting for all indexes

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):


Describe the issue:

I’m switching from defining index.mapping.total_fields.limit in opensearch.yml to setting via the API. The log message recommended:

curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{
  "index.mapping.total_fields.limit" : "1300"

I fixed the URL (https…) added -H 'Content-Type:application/json' and --user admin but I get:

{"error":{"root_cause":[{"type":"security_exception","reason":"no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null]"}],"type":"security_exception","reason":"no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null]"},"status":4

I thought admin pretty much had full admin rights? I am able to apply that setting to a particular index, but I want it to apply to all winlogbeat-* indexes.

Thanks for any help.

Hey @opoplawski

Yeah you need to add your certificates with that command

-k --cert ./admin.pem --key ./admin-key.pem

1 Like

Thank you, not sure how i ever would have figured that out. Now, will that take effect for new indexes as they are created as well?

1 Like