Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Multiple Datasource] Support serverless AWS OpenSearch in SigV4 auth type #3623

Closed
6 tasks done
zhongnansu opened this issue Mar 16, 2023 · 3 comments
Closed
6 tasks done
Assignees
Labels
enhancement New feature or request multiple datasource multiple datasource project ux / ui Improvements or additions to user experience, flows, components, UI elements v2.8.0

Comments

@zhongnansu
Copy link
Member

zhongnansu commented Mar 16, 2023

Problem statement

Multiple datasource should be able to connect to serverless AWS OpenSearch: https://aws.amazon.com/opensearch-service/features/serverless/

UI/UX changes (proposal only)

To create a serverless data source, there needs to be a way for user to specify serverless opensearch. I propose a new required field service type in the "create data source" flow, with options AWS OpenSearch and AWS OpenSearch serverless. Below image only explains the proposal. Please help with actual UI mock-up @shanilpa, and the correct naming.
image

Task breakdown

Reference:

@zhongnansu zhongnansu added enhancement New feature or request multiple datasource multiple datasource project research labels Mar 16, 2023
@zhongnansu zhongnansu added ux / ui Improvements or additions to user experience, flows, components, UI elements needs research v2.8.0 and removed research labels Mar 31, 2023
@zhongnansu zhongnansu self-assigned this Apr 17, 2023
@zhongnansu
Copy link
Member Author

zhongnansu commented Apr 18, 2023

To support serverless for legacy datasource client is not as straight-forward as new client, because unlike new clients, legacy client package elasticsearch.js doesn't

  1. provide option to sign requests using sigv4.
  2. provide option to set service: aoss, when singing and sending reuqests.

For 1), we solved it in MD while releasing the sigV4 support in 2.6, by using a third party Connection handler for Amazon ES, https://github.com/TheDeveloper/http-aws-es. HttpAmazonESConnector

import HttpAmazonESConnector from 'http-aws-es';

const getAWSClient = (credential: SigV4Content, clientOptions: ConfigOptions): LegacyClient => {
const { accessKey, secretKey, region } = credential;
const client = new LegacyClient({
connectionClass: HttpAmazonESConnector,
awsConfig: new Config({
region,
credentials: new Credentials({ accessKeyId: accessKey, secretAccessKey: secretKey }),
}),
...clientOptions,
});
return client;
};

For 2), since the http-aws-es package hardcoded service:es when signing and sending requests, we can't configure the client with serverless identifier directly.

Proposal

  1. Short term: use a drop-in replacement package of http-aws-es, to add support of configurable service name.
  2. Long term: Once Migrate from legacy client to opensearch client #2220 is completed, we'll remove the usage of legacy client, along with http-aws-es. Because new client natively have support for all we need

@KrooshalUX
Copy link

this project will be @shanilpa for UX/UI support, @zhongnansu

@zhongnansu zhongnansu changed the title [Multiple Datasource] Support serverless AWS OpenSearch [Multiple Datasource] Support serverless AWS OpenSearch in SigV4 auth type May 16, 2023
@kavilla
Copy link
Member

kavilla commented May 31, 2023

Closing per @zhongnansu

@kavilla kavilla closed this as completed May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request multiple datasource multiple datasource project ux / ui Improvements or additions to user experience, flows, components, UI elements v2.8.0
Projects
None yet
Development

No branches or pull requests

3 participants