Questions tagged [mongodb-authentication]

Used for questions about the authentication and role model on MongoDB.

MongoDB per default starts without the requirement for authentication of a user. It is highly recommended to enable authentication for any kind of production setup following the official documentation. Otherwise anyone knowing the endpoint to connect to the database can execute any command without restrictions including the deletion of all data.

25 questions
3
votes
1 answer

As of MongoDB 4, how to check if authentication is enabled

I have had an elaborated check picked here and there on my ansible playbook to check whether authentication is enabled on mongo and it seems it doesn't work any longer with 4.0. Up to now it always works as expected. /usr/bin/mongo --eval…
black sensei
  • 6,528
  • 22
  • 109
  • 188
1
vote
1 answer

Reset mongodb root password

I have forgot my mongodb root user password for the shared cluster of 3 nodes. I have gone through stack overflow for the same issue but was unable to replicate due to different configuration. Below is my configuration mongodb version…
1
vote
1 answer

Spring Boot authentication error on connection to MongoDB

I have MongoDB and mongodb-express running with docker-compose, I am trying to build a REST API from Spring Boot that can talk to MongoDB, but the Spring Boot application is failing to start while trying to connect to…
1
vote
1 answer

MongoDB URI Connection String Using TLS?

I'm trying to connect to a local MongoDB using only a URI string over TLS. I can connect just fine using flags, but for my project's purposes I'd like to have a URI string too. For example, the following works: mongo mongodb://127.0.0.1:27017/dbName…
1
vote
1 answer

Why store user credential in MongoDB when using Auth0?

I am currently fixing an old project that my club made about a year ago and I saw they used Auth0 for user authentication but also store username and hashed pw in mongodb in a user document. user documents also have roles like admin, manager, or…
1
vote
1 answer

No user in mongodb with admin privileges - how can create an user with admin privileges?

At first there is no authentication in mongodb, so I created one for one database with readWrite role. Now I want to create more users for other databases but as this user doesn't have the privileges to create other users I'm stuck.
ParmuTownley
  • 957
  • 2
  • 14
  • 34
1
vote
0 answers

Is there have a way to offline authenticate android application with using MongoDB Realm?

I want to make an android APP that can be used totally without internet. currently, I'm using MongoDB Realm service with MongoDB Atlas as a database. I'm having a problem application can't log in without the internet. once it is log in with the…
1
vote
0 answers

How to resolve pymongo authentication failure error?

I am trying to fetch data from my mongodb but it fails with: pymongo.errors.OperationFailure: Authentication failed. It is weird because when I am trying to authenticate with same credentials through robo3T (MongoDB GUI) it is able to connect…
0
votes
0 answers

getting command find requires authentication from mongodb in laravel project

I have a project in laravel 8 where i have integrated mongodb. project is fetching data from 2 databases. for security perpose i have enabled the authorization in mongo.conf. when i try to fetch data using my local machine i am getting data and…
0
votes
0 answers

Is it possible to pass AWS VPC endpoints to overwrite the default ones in Percona

We are running a MongoDB cluster in a series of AWS private subnets that don’t have a NAT gateway. This was all working as expected until we decided to introduce the AWS IAM MongoDB authentication. We’ve noticed that MongoDB needs to communicate…
Painy James
  • 805
  • 2
  • 13
  • 26
0
votes
0 answers

Next.js 13 MongoDB connection failed

I am working on authentication using Next.JS but when I try to signin a user I am getting a mongo server error this the error that I am getting MongoServerError: bad auth : authentication failed ok: 0, code: 8000, codeName:…
0
votes
0 answers

MongoServerError: bad auth : Authentication failed error

I am following the https://www.mongodb.com/languages/mern-stack-tutorial guide. Then installed atlas using https://www.mongodb.com/docs/atlas/cli/stable/install-atlas-cli/ using windows binary installation. I've set up everything according to the…
0
votes
0 answers

How do I create an access token with anonymous authentication with MongoDB realm GraphQL API?

I'm new to MongoDB, and I have been loitering on their docs for...an embarrassingly long time. I keep getting this error: Uncaught TypeError: Cannot read properties of null (reading '_accessToken') somewhere between my AnonProvider element and my…
0
votes
1 answer

MongoDB Atlas failing, could not find user

I’m trying to connect to the atlas cluster from mongoDb compose I keep getting the following error. What might be the reason for this? and what will help to resolve this problem? Error: Could not find user "arn:aws:iam::123545332123:user/iam_user"…
0
votes
0 answers

MONGODB-AWS autentication with EKS node instance role

I'm using MongoDB Atlas to host my MongoDB database and I want to use the MONGODB-AWS authentication mechanism for authentication. When I'm trying it locally with my personal IAM user it works as it should, however when it runs in production I get…
1
2