tivac / aws-sig Goto Github PK
View Code? Open in Web Editor NEW๐ AWS sigv4, optimized for size
License: MIT License
๐ AWS sigv4, optimized for size
License: MIT License
Was seeing some signing errors and narrowed it down to path segments needing to be encoded.
It looks like adding ".map(encodeURIComponent)" in the path function solves the issue:
function path (ref) {
var url = ref.url;
return url.pathname
.replace(multipleSlashesRegex, "/")
.split("/")
.reduce(function (prev, curr) {
if(curr === "..") {
prev.pop();
return prev;
}
if(curr === ".") {
return prev;
}
prev.push(curr);
return prev;
}, [])
.map(encodeURIComponent)
.join("/");
}
References: (ctrl + f "segment")
https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
https://docs.aws.amazon.com/AlexaWebInfoService/latest/CalculatingSignatures.html
https://github.com/Caligatio/jsSHA/
Might be smaller than the custom crypto-js form being included now. Need to validate perf as well as bundle size!
Should be straightforward using the rollup API, will need to figure out how to then take the generated code and run it within the same node process for validating though.
In case the client's clock is skewed from AWS.
I'm getting failures creating requests, and it looks like the issue is that X-Amz-Expires is not supported and is required for S3 Query Parameter authorization.
Ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.