Closed skirk-mpr closed 4 years ago
@skirk-mpr I hope this would answer your questions.
https://
and /
. For example, HASH.execute-api.AWS_REGION.amazonaws.com
.prod
.HASH.execute-api.AWS_REGION.amazonaws.com
.dateStamp
since that parameter is not used in the example function in the documentation. For your question, yes, they are constants.For more information, you can see these source files: https://github.com/awslabs/aws-data-lake-solution/blob/master/source/cli/core/credentials.js https://github.com/awslabs/aws-data-lake-solution/blob/master/source/cli/core/apiproxy.js
@beomseoklee Thank you for the prompt reply and the additional information! This is really helpful.
One quick follow up, regarding 4. can you confirm, I see the date in the format YYYYMMDD getting hashed in the provided code samples -- line 28 of credentials.js.
Thanks again!
@skirk-mpr https://github.com/awslabs/aws-data-lake-solution/blob/master/source/cli/core/credentials.js#L28 uses moment
, which means it will create a moment date with YYYYMMDD
format.
Likely, if you search dateStamp
in the documentation, you would see dateStamp
is not used at all instead moment
is going to be used.
Thank you @beomseoklee! Looks like I'm all set signing request -- I appreciate your help and guidance. Have a great day!
I'm having trouble getting the API access to the application working. I'm getting Unauthorized responses, so I'm assuming I'm missing something with respect to the signing process for the requests. I am using the provided JS code to generate this signature for my request, as well as, implemented the signing functionality in another language - which I'm getting the same hash output as the provided JS function, for the same input data. Could you clarify the some of the specifics regarding the steps to sign the requests for this application? (Reference: http://docs.awssolutionsbuilder.com/data-lake/api/working-with-api/)
Lastly, I noticed that traffic from the the web application uses Cognito authernatication with a JWT in the "Auth" header - "tk:" instead of "ak". Is an acceptable access pattern for integrating with the API to hook into Cognito with a custom service user that can retireve its own JWT before running API calls against the API with this token instead of the signing process?
Thank you!