Prerequisite: The Resolve Satellite should be installed in your environment.
Configure OpenSearch to allow auth via JWT
To see the official instructions please read https://docs.aws.amazon.com/opensearch-service/latest/developerguide/JSON-Web-tokens.html Below is an example of how to setup JWT authentication on OpenSearch and create a token1
Modifying your domain access policy
Before you can configure your domain to use JWT authentication and authorization, you must update your domain access policy to allow JWT users to access the domain
2
Create your permission keys
Use OpenSSL to create the keys
- privatekey.pem: Used to sign JWTs.
- publickey.pem: Uploaded to OpenSearch to verify JWTs
3
Configure JWT authentication and authorization
The following steps explain how to configure an existing domain for JWT authentication and authorization in the OpenSearch Service console:
- Under Domain configuration, navigate to JWT authentication and authorization for OpenSearch, select Enable JWT authentication and authorization.
- Configure the public key to use for your domain. To do this, you can either upload a PEM file, containing a public key, or manually enter it. Use the key that you generated in the previous section.
-
(Optional) Under Additional settings, you can configure the following optional fields
- Subject key — you can leave this field empty to use the default sub key for your JWTs.
- Roles key — you can leave this field empty to use the default roles key for your JWTs.
Create a JWT for ResolveAI
Use a library (e.g., jsonwebtoken in Node.js or pyjwt in Python) to generate a JWT signed with privatekey.pem. Examples are shown below- Create A JWT in NodeJS
- Create a JWT in Python
First install the following dependenciesThen create a script to generate your token. You will useFinally run the script
- The privatekey.pem that was generated in the step above
- The Subject key and Roles key that were generated in the step above
Configure the integration in Resolve Satellite
Below is an example of how to setup the Opensearch integration in the satellite with the url property as well as using the k8s secret (potentially backed by an AWS secret manager or another mechanism) for authentication.1
Create a Kubernetes secret
Create a Kubernetes secret of the following form. Note that the structure of the secret is important and for a Opensearch API Key, it must have the top-level key token: ‘token-value’.To apply the secret run
opensearch-resolve-access-token.yml
apply secret
2
Configure your OpenSearch JWT token in the Resolve Satellite
Update your helm values override file with the following information (e.g.: resolve-values.yaml)Install the satellite and apply the values from the yaml file that you have just updated. e.g.: resolve-values.yaml. To find the latest version, visit ResolveAI’s docker hub repository for the helm chart and satellite image.Once your satellite is deployed, we will automatically create an integration instance for you.
resolve-values.yaml
apply config to satellite and redeploy
3
Verify your integration status in ResolveAI
Login to https://app0.resolve.ai/. Go to the integrations page and and select “Opensearch”You should see an automatically created integration based on the provided configuration.

