opensearch-project / opensearch-project/opensearch-java
[BUG] Delete PIT and clear scroll request fails with AwsSdk2Transport & ApacheHttpClient
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 165
- Forks
- 250
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 26
Description
What is the bug?
deletePit request to opensearch client fails with sigv4 signing mismatch
org.opensearch.client.opensearch._types.OpenSearchException: Request failed: [security_exception] The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
The Canonical String for this request should have been
'DELETE
/_search/point_in_time
... remaining request info...
How can one reproduce the bug?
Create an OpenSearchClient following instructions from here (https://opensearch.org/docs/2.7/clients/java/#connecting-to-amazon-opensearch-service) and then attempt to use the client's deletePit API.
I believe this is because it is a DELETE request with a body. The createPit method works as intended. Sending the request results in a sigv4 error
What is the expected behavior?
The deletePit API call does not have a signature mismatch
What is your host/environment?
Mac OS
implementation 'org.opensearch.client:opensearch-java:2.5.0'
implementation 'org.opensearch.client:opensearch-rest-client:2.7.0'
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure using the OpenSearchClient setup from the linked Amazon OpenSearch Service instructions, then trace the deletePit request through AwsSdk2Transport and ApacheHttpClient. Compare its DELETE-with-body signing behavior with the working createPit call; done means deletePit no longer produces a SigV4 signature mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, java
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100