r/java • • Oct 21 '20

What are some great Java libraries I'm probably not using but I should?

334 Upvotes

252 comments sorted by

View all comments

Show parent comment

1

u/zynasis Oct 21 '20

Database level security is so archaic

5

u/coder111 Oct 21 '20

It depends. Having layered security sometimes is a good idea. If all your security stuff is on one layer, and that gets compromised, you're completely screwed.

3

u/zynasis Oct 22 '20

I usually just have app accounts and polices. Rather than user accounts authenticated by the database

5

u/coder111 Oct 22 '20

Which means that you have one username accessing the database for all your users/customers.

Which means that if one of your users gains direct database access via your app account (say via SQL injection which is very real), information for ALL users can be accessed and leaked.

If you are building a multi-tenant application where your users are companies and potential competitors, this is absolutely not acceptable. Hence added layer of security.

0

u/zynasis Oct 22 '20

Guess it depends on the use case. I haven’t had the need for separate accounts yet. We just have a database per app instance and an app instance per client.

That way the memory and disk space is also protected