Skip to content

Client generates Faraday request URLs with leading double slashes which trips up AWS signing #278

Closed
@julik

Description

@julik

I am experimenting with the ES client in combo with AWS v4 and I use a request to create an index:

client.indices.create(index: index_name, body: INDEX_STRUCTURE)

using the workflow recommended in the README for AWS ES servers (using the Faraday signers). I was receiving an error that the canonical string used for signature generation was not matching the expected one. After some time and after having added some "putsie debugging statements" to the Aws::Signer::V4 I figured that it was getting the URL with a path having a double slash at the start. This made the index creation request fail. So it looks like the client is sending the request to Faraday with a double-slash at the start of the path, and that works fine with a bare ES, but does not work when you need to use this path to compute a request signature.

I think this might be related to how the -api gem works, and is probably easy to fix - but I don't currently have time to dive into it myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions