# Why I don't find logstash in roles.yml?

**URL:** <https://forum.opensearch.org/t/why-i-dont-find-logstash-in-roles-yml/16553>\
**Category:** OpenSearch\
**Tags:** troubleshoot, configure\
**Created:** [November 3, 2023, 6:04pm UTC](https://forum.opensearch.org/t/why-i-dont-find-logstash-in-roles-yml/16553 "2023-11-03T18:04:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miky](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Miky](https://forum.opensearch.org/u/Miky)\
**Post date:** [November 3, 2023, 6:04pm UTC](https://forum.opensearch.org/t/why-i-dont-find-logstash-in-roles-yml/16553/1 "2023-11-03T18:04:07Z")

</div>

Version: 2.10

Hello,

I have a user named logstash defined in internal\_users.yml

```auto
logstash:
  hash: "$2y$12$MAP/qDbbbTmyCl9KaaaaaaaaaaaaaaaaaaaaaaadhaA6ONnl.wg.jK2"
  reserved: false
  backend_roles:
  - "logstash"
  description: "Demo logstash user, using external role mapping"

```

I find logstash in roles\_mapping.yml

```auto
logstash:
  reserved: false
  backend_roles:
  - "logstash"

```

But I don’t find logstash in roles.yml, I don’t understand why considering that in roles.yml is the place where you are supposed to define cluster\_permissions, index\_permissions, index\_patterns and allowed\_actions.  
Where are they stored then ?

Also, what are the right permissions to give to the user logstash ? I don’t what to give all permissions.

Thank you

---

<div class="post-metadata">

**Author:** ![Gsmitt](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gsmitt/32/1718_2.png) [@Gsmitt](https://forum.opensearch.org/u/Gsmitt)\
**Post date:** [November 3, 2023, 11:15pm UTC](https://forum.opensearch.org/t/why-i-dont-find-logstash-in-roles-yml/16553/2 "2023-11-03T23:15:35Z")

</div>

Hey @Miky

By chance did you save you old role.yml file?

If you have the user already called logstash you can add the permission from the dashboard needed.

> **[Users and roles](https://opensearch.org/docs/latest/security/access-control/users-roles/#rolesyml)**
>
> Users and roles

---

<div class="post-metadata">

**Author:** ![Miky](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Miky](https://forum.opensearch.org/u/Miky)\
**Post date:** [November 4, 2023, 6:47am UTC](https://forum.opensearch.org/t/why-i-dont-find-logstash-in-roles-yml/16553/3 "2023-11-04T06:47:37Z")

</div>

Hello,

Yes I have the “old” roles.yml. I took it from the examples.  
But in it there is no logstash permissions.

I wanted to set the logstash user properly in the configuration files because when you execute securityadmin.sh it overrides what is configured in API.

Also I wanted to understand why I find the user logstash and the role\_mapping logstash but there’s no link with the roles.yml permission file.

Thanks

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [November 6, 2023, 9:12am UTC](https://forum.opensearch.org/t/why-i-dont-find-logstash-in-roles-yml/16553/4 "2023-11-06T09:12:57Z")

</div>

@Miky This might be due to the fact that logstash is a built-in role as few others.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/a/ab61ad429982ed2b37b479b95d5b577e29b8beb9.png)

It is not backed up by securityadmin.sh script, that’s why you can’t see it in the roles.yml file.  
However, you can find it in the roles of the running cluster.

```auto
curl --insecure -u admin:admin -XGET https://localhost:9200/_plugins/_security/api/roles/logstash?pretty

```

```auto
{
  "logstash" : {
    "reserved" : true,
    "hidden" : false,
    "description" : "Provide the minimum permissions for logstash and beats",
    "cluster_permissions" : [
      "cluster_monitor",
      "cluster_composite_ops",
      "indices:admin/template/get",
      "indices:admin/template/put",
      "cluster:admin/ingest/pipeline/put",
      "cluster:admin/ingest/pipeline/get"
    ],
    "index_permissions" : [
      {
        "index_patterns" : [
          "logstash-*"
        ],
        "fls" : [],
        "masked_fields" : [],
        "allowed_actions" : [
          "crud",
          "create_index"
        ]
      },
      {
        "index_patterns" : [
          "*beat*"
        ],
        "fls" : [],
        "masked_fields" : [],
        "allowed_actions" : [
          "crud",
          "create_index"
        ]
      }
    ],
    "tenant_permissions" : [],
    "static" : true
  }
}

```

If you’d like to use this role with a different user, you can either duplicate it through OpenSearch Dashboards or assign logstash as backend\_role to your custom user.

---

<div class="post-metadata">

**Author:** ![Miky](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Miky](https://forum.opensearch.org/u/Miky)\
**Post date:** [December 29, 2023, 2:48am UTC](https://forum.opensearch.org/t/why-i-dont-find-logstash-in-roles-yml/16553/5 "2023-12-29T02:48:25Z")

</div>

Hello Pablo,  
Thank you very much for your detailed answer.
