-
Notifications
You must be signed in to change notification settings - Fork 49
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
Support AwsSigV4 signing for Amazon OpenSearch Serverless #133
Support AwsSigV4 signing for Amazon OpenSearch Serverless #133
Conversation
USER_GUIDE.md
Outdated
@@ -219,6 +220,21 @@ var config = new ConnectionSettings(endpoint, connection); | |||
var client = new OpenSearchClient(config); | |||
``` | |||
|
|||
### Amazon OpenSearch Serverless | |||
To configure signing when making requests to [Amazon OpenSearch Serverless](https://aws.amazon.com/opensearch-service/features/serverless/) is nearly identical to all above configuration for AwsSigV4, the only difference being the need to configure the service identifier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Maybe not so english :) How about "Use the oass
service identifier to make requests to ..."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good.
Is there any different between managed service and serverless implementation anywhere and have you tested both with this change, including with POSTing a request body (add data)? There shouldn't be any variation between the two.
Have done some testing using BulkIndex and Search on both managed service and serverless with these changes. There's no branching in logic between the two in signing, only difference being the service ID. |
One test failed for |
@@ -20,19 +20,21 @@ internal class AwsSigV4HttpClientHandler : DelegatingHandler | |||
{ | |||
private readonly AWSCredentials _credentials; | |||
private readonly RegionEndpoint _region; | |||
private readonly string _serviceId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://docs.aws.amazon.com/general/latest/gr/signing-elements.html this should be called "service code". I see other clients use "service" or "service name". At least I think we shouldn't introduce a new one 😅
This could use some tests that the service name is passed through. |
- Make the service ID customizable, so it can be set to "aoss" for serverless - Include the x-amz-content-sha256 header - Don't sign the content-length header Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
ba2957a
to
5bb6994
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good if you can bring it to 🟢.
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
… platforms Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Description
Support AwsSigV4 signing for Amazon OpenSearch Serverless
Relates to #129, however does not solve documenting of methods unsupported by serverless.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.