Skip to content

[BUG] Receiving signature mismatch issue with SigV4 #207

@dlvenable

Description

@dlvenable

Describe the bug

In a setup where Logstash is configured to write to an Amazon OpenSearch Service domain. This plugin is using SigV4 signing in this setup.

When a large volume of data is being processed, the plugin will sometimes get an error indicating the request signature does not match the expected signature.

[2023-04-06T16:49:36,735][ERROR][logstash.outputs.opensearch][output_oss][oss_output_cluster] Encountered a retryable error (will retry with exponential backoff) {:code=>403, :url=>"https://vpc-domain.ca-central-1.es.amazonaws.com:443/_bulk ",
:content_length=>188317, :body=>"{"message":"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.\n\nThe Canonical String for
this request should have been\n'POST\n/_bulk\n\ncontent-type:application/json\nhost:vpc-domain.ca-central-1.es.amazonaws.com \nx-amz-content-sha256:***\nx-amz-date:20230406T164936Z\nx-amz-security-token:TOKEN\ncontent-type;host;x-amz-content-sha256;x-amz-date;x-amz-security-token\nTOKEN'\n\nThe
String-to-Sign should have been\n'AWS4-HMAC-SHA256\n20230406T164936Z\n20230406/ca-central-1/es/aws4_request\nTOKEN'\n"}"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions