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

Integrate AWS IAM Role-based Authentication for MongoDB Atlas #1987

Merged
merged 9 commits into from
Jul 23, 2024

Conversation

hu-ahmed
Copy link
Contributor

@hu-ahmed hu-ahmed commented Jul 22, 2024

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.

@hu-ahmed hu-ahmed force-pushed the add-mongo-aws-iam-support branch from 321c7e2 to d8705dc Compare July 23, 2024 06:55
Copy link
Member

@thjaeckle thjaeckle left a 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.

@thjaeckle thjaeckle added this to the 3.6.0 milestone Jul 23, 2024
@hu-ahmed

This comment was marked as duplicate.

@hu-ahmed hu-ahmed changed the title add mongo aws iam role configuration Integrate AWS IAM Role-based Authentication for MongoDB Atlas Jul 23, 2024
Copy link
Member

@thjaeckle thjaeckle left a 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 👍 🎉

@thjaeckle thjaeckle merged commit c55c0a0 into eclipse-ditto:master Jul 23, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants