Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move s3 url signing to car-store #66

Merged
merged 10 commits into from
Dec 8, 2022

Commits on Dec 5, 2022

  1. refactor: move s2 url signing to car-store

    - Add `createUploadUrl` to `car-store.js` as creating presigned s3 urls is a job for the bucket abstraction and having a thing called `signer` that wasn't a keypair for a DID for ucanto was confusing.
    - Switch to the `@aws-sdk/s3-request-presigner` for creation of signed s3 urls to simplify credential management. The existing s3 client is reused.
    
    TODO:
    - add in content-length assertion for presigned url
    - check if we can remove the amz header from store/add response. The checksum must be enforced via the URL, not from an additional header that the client may(not) send.
    
    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Dec 5, 2022
    Configuration menu
    Copy the full SHA
    25e26bc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ea0c7c3 View commit details
    Browse the repository at this point in the history
  3. chore: update package-lock

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Dec 5, 2022
    Configuration menu
    Copy the full SHA
    5167fa3 View commit details
    Browse the repository at this point in the history
  4. fix: add content-length to the signed url

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Dec 5, 2022
    Configuration menu
    Copy the full SHA
    da05337 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2022

  1. chore: more tests for content-length in presigned url sig

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    c55cfa8 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2022

  1. Configuration menu
    Copy the full SHA
    6e3b3ea View commit details
    Browse the repository at this point in the history
  2. chore: mark presigned upload bytes match test as failing

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    f76ca84 View commit details
    Browse the repository at this point in the history
  3. fix: need global fetch for store test

    also add engines as a hint that folks need at least node 16.15 for --experimental-fetch to work
    
    see: https://nodejs.org/docs/latest-v16.x/api/globals.html#fetch
    see: https://docs.npmjs.com/cli/v6/configuring-npm/package-json#engines
    
    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    ac82223 View commit details
    Browse the repository at this point in the history
  4. fix: test passes with latest minio!

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    2caf606 View commit details
    Browse the repository at this point in the history
  5. chore: seperate out test for content-length

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    ef07da2 View commit details
    Browse the repository at this point in the history