-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: add awsv4 presign and rds util #44
Conversation
@Tieske Could you please review this? Thanks! I will continue adding more test cases for presign during the review process |
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.
had a quick look, but running out of time, will have to check again.
ngx.time = function() | ||
return 1667543171 | ||
end |
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.
This changes the global environment, and hence will spill over to other tests.
This should probably be in a setup
block, with a matching teardown
block to undo the change
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.
fixed in before_each
and after_each
fixed in setup
and teardown
@windmgc I added a commit to update the doc comments to render properly. please check;
|
@Tieske thanks a lot! |
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
This PR adds two features:
Performing aws_v4 presign on request
The aws_v4 presigning flow has a few differences from the aws_v4 signing flow, this PR is imitating the presigning flow in AWS Go SDK(I'm not very much familiar with JS syntax but the AWS JS SDK would do a similar thing I guess).
Providing RDS utils to build IAM auth token
This is a pre-step of implementing the IAM Database authentication feature in the Kong Gateway(KAG-167. For more details about generating IAM RDS Authentication token, please check https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.Connecting.Go.html
and https://github.com/aws/aws-sdk-go/blob/c7ddff5bbc5ce2facdb433d814b05b3a46d7da05/service/rds/rdsutils/connect.go#L36
Please note that the PR is still working in progress.TODO: