Giter VIP home page Giter VIP logo

aws-signer-v4's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aws-signer-v4's Issues

Trailing slash required

Hi,

It's not an issue just maybe something to note in the README in the signHeaders example. If you don't include the trailing slash in the URL, you will get an InvalidSignatureException from AWS. Adding the trailing slash fixes the issue. This was with using POST for DynamoDB.

For anyone curious:

Here is my URL without the trailing slashes

po signingData.unsignedURL
https://dynamodb.us-west-1.amazonaws.com

po signingData.unsignedURL.path
""

As per step 2 in Task 1 of Signing AWS Requests

Add the canonical URI parameter ...

Example Canonical URI with encoding
/documents%2520and%2520settings/

Example Canonical URI
/

So, no trailing slash == 400

Signing URLs with explicit ports

Great library, definitely gets the job done for us! We've vendored it and noticed an issue with how this code interacts with URLSession.

When signing a url (e.g., for S3) with a port in it, such as https://s3.amazonaws.com:443/bucket... the signature will be computed with the port. However, when requesting the content of that URL with URLSession (or Data(contentsOf:)), the port is stripped out, and the signature is no longer correct, and AWS returns a 403.

We're currently playing with a few solutions, including stripping the port before signing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.