Can't retrieve documents for system index by _count, _doc, _search

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

opensearch version: 2.11.1

Describe the issue:

System index has been set up and permissions have been set successfully.
indexing is possible in the system index, but _search, _doc, _count query returns only 0 data. why does the query return only 0 data?

There is no permission error, but 0 data is always returned.

API responses

  • POST {system_index}/_doc/1
    • indexing success
  • GET _cat/indices?v
    • system index’s doc count increased

  • GET {system_index}/_doc/1
    • Not found
  • GET {system_index}/_count
    • return 0
  • GET {system_index}/_search
    • hit 0

I accessed the system index by manager user by below configuration

Configuration:

  • security config

    plugins.security.system_indices.enabled: true
    plugins.security.system_indices.permission.enabled: true
    plugins.security.system_indices.indices: [".my-system-index"]
    
  • roles config

    internal_index_manager:
      reserved: true
      hidden: true
      description: ""
      index_permissions:
        - index_patterns:
            - ".my-system-index"
          allowed_actions:
            - "*"
            - "system:admin/system_index"
      tenant_permissions:
        - tenant_patterns:
            - "*"
          allowed_actions:
            - "*"
    
  • internalusers config

    manager:
      hash: "{hash}"
      reserved: true
      opendistro_security_roles:
        - "internal_index_manager"
      description: ""
    

Relevant Logs or Screenshots:

Hi @leedonggyu

Could you please describe or send a link for your blow configuration ? I haven’t found anything in the OS docs about that.

@Eugene7

I refer to system index documents

hey @leedonggyu

From the link you posted , it states…

you first need to authenticate with an admin certificate to gain access:

Have you tried something like this?

curl -k --cert ./kirk.pem --key ./kirk-key.pem -XGET 'https://localhost:9200/.opendistro_security/_search'