Open jaguililla opened 3 years ago
Hi! I'd like to work on this issue if it's still up to grab.
Absolutely, it's all yours. I'll update the task's status.
Thanks for your cooperation and if you need anything, just write me :)
I have a question regarding some of the parameters required to sign an AWS request. (This is the reference from the AWS documentation I've been following so far.)
To calculate the signing key, the AWS (secret) access key
, region
and service
are required. Are we expecting the HttpContext
passed to the callback to contain these or in what other way could this be done?
If there's a misunderstanding on how the callback is supposed to work, could you please show me to the correct part in the documentation to read up on this?
Thanks in advance!
Ok, as the callback is a class. Could you pass those values as parameters in the constructor?
The user then will be forced to supply values for those parameters at callback instantiation time (at the application start up or routing definition).
The user could fetch those values from environment, configuration files, etc. before passing them to the callback (decoupling the AWS signing from the configuration/environment).
What do you think? does this make sense to you?
Passing it to the constructor makes it easy then, thanks!
Hello, the Hexagon GitHub organization has been renamed to https://github.com/hexagontk
. You will need to change your local clone remotes to reflect this change. Thanks and sorry for the inconvenience.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Create an HTTP callback to sign HTTP requests using the AWS signing request algorithm.
Callbacks already developed in the
http/http_server
module (on thecom/hexagonkt/http/server/callbacks
package) can be used as reference for development and testing of such components.There is also an example of a callback used in the HTTP client as opposed to the callbacks used in the server (the class name is
com.hexagonkt.rest.SerializeRequestCallback
).Note that the callback should be of
before
type and to pass the modified request, therequest
method should be used insteadsend
.The callback should be added to the
http/rest_tools
module on thecom.hexagonkt.rest.tools.aws
package.A previous Java implementation can be checked at: https://github.com/jaguililla/sabina/blob/master/bali/src/main/java/co/there4/bali/Aws.java
The callback must pass the most of the AWS signing V4 Test Suite cases, and at least implement the tests included here: https://github.com/jaguililla/sabina/tree/master/bali/src/test/resources/aws-sig-v4-test-suite
Previous Java implementation tests can be found at: https://github.com/jaguililla/sabina/blob/master/bali/src/test/groovy/co/there4/bali/AwsTest.groovy
For information on how to build the project and pass the tests please refer to the contributing guide.
If you have any question or suggestion, please feel free to use this issue's comments to discuss them 🙂