# Setting Up OpenSearch User Permissions for Username and Password Authentication

If you're using AWS OpenSearch in your Immuta installation, use this how-to to set up the proper permissions needed for username and password authentication.

1. In the AWS console, [create an OpenSearch domain](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomains) and create a master user. This user will set up the permissions for the audit user.
2. In the OpenSearch console, [create a new user](https://opensearch.org/docs/latest/security/access-control/users-roles/#defining-users). This user will be the audit user. You will enter the username and password for this user when installing Immuta.
3. [Create a role](https://opensearch.org/docs/latest/security/access-control/users-roles/#defining-roles) for the audit user.
4. Add the audit user to the role.
5. Create the two additional roles to hold the following permission groups. Immuta recommends permission groups for a smooth configuration, but just ensure the user has all the following permissions.
   * **immuta\_cluster\_permission\_grp** with the following permissions:
     * cluster:monitor/health
     * indices:data/write/bulk
     * indices:data/write/bulk\*
     * indices:data/read/scroll
     * indices:data/read/scroll/clear
     * indices:monitor/settings/get
   * **immuta\_index\_permission\_grp** with the following permissions for the `*` index:
     * indices:admin/aliases
     * indices:admin/aliases\*
     * indices:admin/exists
     * indices:admin/create
     * indices:admin/delete
     * indices:admin/settings/update
     * indices:admin/get
     * indices:admin/refresh
     * indices:admin/refresh\*
     * indices:admin/mapping/put
     * indices:data/read/search
     * indices:data/read/scroll
     * indices:data/read/scroll/clear
     * indices:data/write/delete
     * indices:data/write/delete/byquery
     * indices:data/write/index
     * indices:data/write/bulk
     * indices:data/write/bulk\*
     * indices:monitor/settings/get
6. Add the additional roles with the permission to the audit user's role.

After these steps are complete, your audit user should have the required permissions and you can [complete the Immuta install](/latest/configuration/self-managed-deployment/install/managed-public-cloud.md) using the user's username and password.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.immuta.com/latest/configuration/self-managed-deployment/configure/opensearch-authentication/setting-up-opensearch-user-permissions-for-username-and-password-authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
