Is there any way to apply field level authorization while writing/updating in mongodb?

Viewed 47

I know there are various Role based authentication/authorisation available for mongodb on db as well as collection level. But Is there any way to implement authorisation on field level inside collection? For example: Their is a collection user:

User :{
      id: String,
      name: String, 
      roles: ArrayList,
      ....
    }

So here I want to give access of writing/updating the roles to only DB admin and the rest fields can be updated by anyone. Is there any way to implement this on DB layer only without going to application layer? If yes, Then how to implement that using Spring boot ?

0 Answers
Related