opensearch-project / opensearch-project/data-prepper

[BUG] Sigv4 error when hosts has "/ " at the end of URL

Open
#2,843 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
374
Forks
354
Avg merge
3d 18h
Merged PRs (30d)
8

Description

Describe the bug

Data Prepper is throwing Sigv4 error when OpenSearch URL in hosts has "/ " at the end of URL

To Reproduce
Steps to reproduce the behavior:

  1. Go to pipeline.yaml
  2. Click on Sinks
  3. under OpenSearch - hosts give / at the end of URL say - "https://mydomain-us-east-1.es.amazonaws.com/" -- This URL works fine "https://mydomain-us-east-1.es.amazonaws.com"
  4. See error

Caused by: 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.

Expected behavior

Connection to OpenSearch should be successful with or with of "/" at the end of URL

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pipeline.yaml and the OpenSearch sink configuration, then trace how the hosts value reaches SigV4 request signing. Reproduce the failure with a trailing slash and verify that both URL forms connect successfully, adding a regression test if the existing test structure is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.