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
136 iam credentials not used when calling neptune #140
136 iam credentials not used when calling neptune #140
Conversation
Codecov Report
@@ Coverage Diff @@
## main #140 +/- ##
=====================================
Coverage 9.09% 9.09%
=====================================
Files 444 444
Lines 29697 29697
Branches 208 208
=====================================
Hits 2701 2701
Misses 26990 26990
Partials 6 6 |
packages/.DS_Store
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove all .DS_Store
files from the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, this has now been done.
fetch(url, { headers: req.headers, }) | ||
.then(async res => { | ||
console.log("url: ", urlString); | ||
console.log; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this line 74?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed this
service: "neptune-db", | ||
region: headers["aws-neptune-region"], | ||
}).then((data) => { | ||
headers = data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, we are replacing the headers
passed to the function with the IAM headers here.
Q. Is there a risk that if any headers were passed in the request, they would be removed and if so, should we append the IAM headers to headers
instead of replacing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
…rough on every request, even when IAM is turned on.
…rough on every request, even when IAM is turned on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Added some minor comments.
Feel free to override approval requirement and merge if addressing them, thanks.
next(error); | ||
console.log(error); | ||
// send the json response in the next call | ||
res.send(error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have different code in the catch block of RDF summary call compared to PG summary call:
PG one has next(error);
whereas this RDF one has res.send(error);
Not sure if they function similarly thus calling out to double-check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactored to have the same behaviour
console.error("No IAM credentials found in provider chain", e); | ||
} | ||
}; | ||
const e = require("express"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this might be unused, recommend removing it if not required.
packages/.DS_Store
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider deleting the 2 .DS_Store
files explicitely since it looks like the updated .gitignore
is not applying on already committed code.
Issue #136
Description of changes:
Refactored the Proxy server to generate the IAM auth header correctly, and only when IAM is active.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.