Skip to content
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

GODRIVER-1395 add MONGODB-AWS auth mechanism #334

Merged
merged 5 commits into from
Mar 17, 2020

Conversation

iwysiu
Copy link
Contributor

@iwysiu iwysiu commented Mar 12, 2020

I had to run mod vendor, so the pr seems a lot larger than it is. All of the changes in the vendor directory can be ignored.

Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I'll leave the rest up to the other reviewers.

x/mongo/driver/auth/mongodbaws.go Outdated Show resolved Hide resolved
@ShaneHarvey ShaneHarvey requested review from ShaneHarvey and removed request for ShaneHarvey March 12, 2020 20:03
.evergreen/config.yml Outdated Show resolved Hide resolved
.evergreen/config.yml Outdated Show resolved Hide resolved
@iwysiu iwysiu requested a review from bazile-clyde March 16, 2020 15:08
@bazile-clyde
Copy link

LGTM

Copy link
Contributor

@divjotarora divjotarora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good! My comments are primarily about using constants and improving the code consistency, but I didn't see any errors from a spec perspective.

Also, you'll need to add documentation for the AuthMechanism and AuthMechanismProperties fields in the options.Credential struct: https://github.com/mongodb/mongo-go-driver/blob/master/mongo/options/clientoptions.go#L80.

x/mongo/driver/auth/aws_conv.go Outdated Show resolved Hide resolved
x/mongo/driver/auth/aws_conv.go Show resolved Hide resolved
x/mongo/driver/auth/aws_conv.go Outdated Show resolved Hide resolved
x/mongo/driver/auth/aws_conv.go Outdated Show resolved Hide resolved
x/mongo/driver/auth/aws_conv.go Outdated Show resolved Hide resolved
x/mongo/driver/auth/aws_conv.go Outdated Show resolved Hide resolved
x/mongo/driver/auth/aws_conv.go Show resolved Hide resolved
x/mongo/driver/auth/mongodbaws.go Outdated Show resolved Hide resolved
x/mongo/driver/connstring/connstring.go Outdated Show resolved Hide resolved
x/mongo/driver/auth/aws_conv.go Outdated Show resolved Hide resolved
@iwysiu iwysiu requested a review from divjotarora March 16, 2020 21:45
Copy link
Contributor

@divjotarora divjotarora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one nit, but no need for re-review.

amzDateFormat = "20060102T150405Z"
awsRelativeURI = "http://169.254.170.2/"
awsEC2URI = "http://169.254.169.254/"
awsEC2Path = "latest/meta-data/iam/security-credentials/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename awsEC2Path to awsEC2RolePath and awsEC2Token to awsEC2TokenPath.

@iwysiu iwysiu merged commit a794f53 into mongodb:master Mar 17, 2020
@iwysiu iwysiu deleted the GODRIVER-1395 branch March 17, 2020 15:16
@cagataycali
Copy link

I'll not gonna use AWS or AWS login. Why the existing library depends on AWS at all?

@divjotarora
Copy link
Contributor

Hi @cagataycali,

If you have questions or would like to report bugs/improvements related to the driver, please file a ticket in our Jira project for tracking purposes.

-- Divjot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants