I am building a simple web app where one set of users have varying admin privileges who can write to database and the other set can only view data.
I am used to securing APIs with JWT or session tokens, but my boss is 50-year-old DBA who thinks it's not secure. He is saying I should implement security within database itself and create all users with appropriate roles in database. The application would then connect to the database using the credentials of each user and perform operations they are allowed. He is also asking me to do all data validations in database using triggers rather than dealing with it on application layer.
His reasoning is that if the application gets compromised in some way the data would still be consistent and secure. I can't really argue with it because it is true.
I understand his reasoning, but I am used to building apps with ORMs which uses one role to get all data. Is it even possible to do it with common Orms like Prisma, hibernate or EF core? I think it could even conflict with a lot of caching mechanisms ORM tools employ.
I don't really understand how to proceed. I can do it, but it will significantly increase the development and maintenance time.
How should I proceed?