How to add new tenant for a role

Hi,

I have created a role as below using roles.yml. This role has given kibana_read_only access from roles_mapping.yml.

reader:
  reserved: false
  hidden: false
  cluster_permissions:
  - cluster_composite_ops_ro
  - 'cluster:admin/opensearch/ql/datasources/read'
  index_permissions:
  - index_patterns:
        - "index1"
    dls: ""
    allowed_actions:
      - 'indices:admin/resolve/index'
      - 'indices:data/read/field_caps'
      - 'indices:data/read/search'
      - 'indices:data/read/get'
      - 'indices:admin/mappings/get'
      - 'indices:monitor/settings/get'
      - 'indices:admin/aliases/get'
      - 'indices:data/read/search*'
      - 'search'
      - 'read'
  - index_patterns:
        - ".kibana*"
    allowed_actions:
      - 'indices:data/read/search'
      - 'indices:data/write/update'
      - 'indices:data/write/index'
      - 'indices:data/write/bulk'
      - 'indices:data/read/get'
      - 'indices:data/read/mget[shard]'
  tenant_permissions:
    - tenant_patterns:
        - "test_tenant"
      allowed_actions:
        - 'read'
        - 'write'
  static: false

I am trying to add test_tenant tenant for it. But it is giving me an error “Application Not Found” when I try to access Dashboards by switching to test_tenant.

How to resolve it?

Hi @sayalipatil9689. What’s the OpenSearch version?

@sayalipatil9689 Could you also run the below command and share the output? It will provide all the mappings of the reported user.

curl --insecure -u <username>:<password> https://<OpenSearch_node_IP_or_FQDN>:9200/_plugins/_security/authinfo?pretty

I restarted the server and It got resolved.