Reason: no permissions for []... what?

Using default Docker image, passing creds and disabling ssl check on client (nodeJS @opensearch-project/opensearch)

  return new Client({
      node: 'https://admin:admin@localhost:9200',
      ssl: {
        rejectUnauthorized: false,
        requestCert: false
      }
    })

Trying to delete indices:

await client.indices.delete({
    index: index || '_all',
    ignore_unavailable: true
  })

Yields this meaningless error:

 ResponseError: security_exception: [security_exception] Reason: no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null]

Any clues? I don’t have any config files. I just want to run basic tests locally. Gah!

@cyberwombat Are you trying to delete all indices? If so, the admin user is not privileged to remove .opendistro_security index

You need to use securityadmin.sh script and admin certificates to delete and recreate that index.

1 Like