Closed kevpfowler closed 2 years ago
I didn't ship the ec2 authentication module with the R package yet. Is that really needed? I think you can just authenticate with mongodb atlas if you remove the authMechanism=MONGODB-AWS
part from your url? (i'm using mongodb atlas in the unit tests as well...)
I am using (or want to be using) the configured EC2 Instance IAM Role for authenticating to the Atlas cluster. This allows authenticating without including any passwords or aws secret access key material in the application (or managing env vars on each instance). This is considered a best practice for production deployments.
The only way for me to achieve this is if the driver supports MONGODB-AWS, which kicks in the magic glue in libmongoc.
Can you test if things now work with mongolite 2.6.0 ?
I just completed basic testing and yes, this does now work with 2.6.0. Thank you for the quick response!
I am using mongolite with an app that runs on an AWS EC2 instance (running Ubuntu 20.04) and connects to an Atlas MongoDB cluster.
When using
authMechanism=MONGODB-AWS
, i.e. with a URL like:mongodb+srv://mytestcluster-pl-0.xxxxx.mongodb.net/myDb?authMechanism=MONGODB-AWS
on connect I get back:
When I install the mongolite package I see it builds the mongoc on the fly. Does mongolite build mongoc with ENABLE_MONGODB_AWS_AUTH=ON?
I have libssl-dev and libsasl2-dev installed. Is there something more I need in my environment so that mongolite builds with this setting?