-
Notifications
You must be signed in to change notification settings - Fork 231
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
Integrate AWS IAM Role-based Authentication for MongoDB Atlas #1987
Integrate AWS IAM Role-based Authentication for MongoDB Atlas #1987
Conversation
321c7e2
to
d8705dc
Compare
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.
Hi @hu-ahmed
Thanks a lot for this contribution.
You should mention in the PR that this is about Passwordless authentication of MongoDB with AWS IAM
The build contains a test error:
Error: Failures:
Error: DefaultOptionsConfigTest.testHashCodeAndEquals:63 EqualsVerifier found a problem in class org.eclipse.ditto.internal.utils.persistence.mongo.config.DefaultOptionsConfig.
-> Significant fields: equals does not use useAwsIamRole, or it is stateless.
And when updating the Helm chart, please update the Chart version - there is a linting in place which verifies that.
I added some inline comments, please check them.
...nce/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/MongoClientWrapper.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/config/MongoDbConfig.java
Show resolved
Hide resolved
...nce/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/MongoClientWrapper.java
Outdated
Show resolved
Hide resolved
This comment was marked as duplicate.
This comment was marked as duplicate.
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 a lot for the quick reaction on the review.
And thanks a lot for your first contribution to Ditto, I am happy to approve the PR 👍 🎉
This PR introduces the integration of AWS IAM Role-based authentication for MongoDB Atlas in our application (Passwordless authentication of MongoDB with AWS IAM). By leveraging the AWS SDK's DefaultCredentialsProvider, we ensure secure and seamless authentication to MongoDB Atlas using the IAM role associated with the Kubernetes service account. The environment variables set by the service account are utilized to fetch the necessary credentials dynamically within the application. This implementation enhances security by eliminating the need for hardcoded credentials and leverages AWS's robust IAM policies for access control.