Skip to content

Commit

Permalink
[Docs] Updates dev guide for security
Browse files Browse the repository at this point in the history
Signed-off-by: Ashwin P Chandran <[email protected]>
  • Loading branch information
ashwin-pc committed Jan 25, 2024
1 parent 058dfbc commit 4d49ade
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,19 +280,23 @@ This method can also be used to develop against the [full distribution of OpenSe

### Configure OpenSearch Dashboards for security

_This step is only mandatory if you have the [`security` plugin](https://github.com/opensearch-project/security) installed on your OpenSearch cluster with https/authentication enabled._
_This step is only needed if you want your dev environment to also start with security. To do so both the OpenSearch node and OpenSearch Dashboards cluster need to have the security plugin installed. Follow the steps below to get setup correctly._

> 1. Run `export initialAdminPassword=<initial admin password>` since it's needed by the configuration script
> 2. Run `yarn opensearch snapshot --security`
> 3. Wait a few seconds while the plugin is installed, configured, and OpenSearch starts up.
To startup the OpenSearch snapshot with security

Then within another window. You can start:
1. Run `export OPENSEARCH_INITIAL_ADMIN_PASSWORD=<initial admin password>` since it's needed by the configuration script
2. Run `yarn opensearch snapshot --security`
3. Wait a few seconds while the plugin is installed, configured, and OpenSearch starts up.

> 1. Run `export OPENSEARCH_USERNAME=admin`
> 2. Run `export OPENSEARCH_PASSWORD=<initial admin password>`
> 3. Optional: Run `export OPENSEARCH_SECURITY_READONLY_ROLE=<read only role>`
> 4. Run `yarn start:security`
> 5. Navigate to OpenSearch Dashboards and login with the above username and password.
Then within another window you can start OpenSearch Dashboards:

> Before doing so make sure to clone the https://github.com/opensearch-project/security-dashboards-plugin repo into the plugins folder and build it and set it up using the instructions here https://github.com/opensearch-project/security-dashboards-plugin/blob/main/DEVELOPER_GUIDE.md#install-opensearch-dashboards-with-security-dashboards-plugin. Then do the following:
1. Run `export OPENSEARCH_USERNAME=admin`
2. Run `export OPENSEARCH_PASSWORD=<initial admin password>`
3. Optional: Run `export OPENSEARCH_SECURITY_READONLY_ROLE=<read only role>`
4. Run `yarn start:security`
5. Navigate to OpenSearch Dashboards and login with the above username and password.

Once the bootstrap of OpenSearch Dashboards is finished, you need to apply some
changes to the default [`opensearch_dashboards.yml`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/config/opensearch_dashboards.yml#L25-L72) in order to connect to OpenSearch.
Expand Down

0 comments on commit 4d49ade

Please sign in to comment.