Configure OTDS to act as an OAuth system
This article documents how to configure OTDS to act as an OAuth system for OpenSearch and OpenSearch Dashboards.
📘 OTDS Configuration
Navigate to the OTDS admin page <otds url>/otds-admin
(e.g. https://lab-opensearch-01.lab.shinydocs.local:8443/otds-admin)Navigate to OAuth Clients in the left sidebar.
Click the Add button to add a new OAuth client.
Provide the following details on the add page.
Client ID: This is the unique ID of the OAuth client, you will need this value later to configure opensearch dashboards.
Description: fill in a description of what this OAuth client’s purpose
Confidential: check this checkbox, this will generate a client secret to be used with OpenSearch Dashboards.
Sign out URL: can be left blank
Sign out Method: can be left blank.
Click Next to go to the next section and provide the following details
User Partition: Select one of the radio buttons, Global or User Partition. Global means that all users in OTDS would be able to authenticate with this OAuth client, User Partition means that it would be restricted to only users in the specified partition
Click the Next button to go to the Advanced section.
Grant refresh token (when protocol permits): unchecked
Use session lifetime as refresh token lifetime: unchecked
Access token lifetime (seconds): how long should the access token be valid, 3600 seconds - 1 hour
Refresh token lifetime (seconds): can be left blank
Permissible scopes: add the value openid to the list
Default scopes: add the value openid to the list
Click the Next button to go to the Redirect Urls section.
Click the Add button to add a redirect url, the url should be the base url to opensearch dashboards
(e.g. https://lab-opensearch-01.lab.shinydocs.local:5601). Note, if it is not just the base url, there may be problems logging out of OpenSearch Dashboards.
Click the Next button to go to the Custom Attributes section.
This can be left blank.
Click the Save button to save the OAuth client.
Upon save, a Secret Key will be displayed on the screen. Save this value, it will be needed when setting up OpenSearch Dashboards. It will not be displayed again, so make sure you get a copy of it.
🥳 Congratulations, you are done configuring OTDS as an OAuth system.