I have a Flask application that uses pymongo to access a mongo database and satisfy users' requests. I have enabled access control in Mongo and now there are several users associated with different roles. More specifically, each user has read-write privileges only in a specific subset of collections in the db.
I would like to have users logging into the application and having access only to their specific subset of collections. This means that each user request that needs to fetch some data from the db is binded to a (specific) db-authenticated connection.
The main extensions of flask like flask-login and flask-security do not seem to use MongoDB own authentication mechanism.
Have been looking for a while now but I was not able to solve this.