Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

From a security perspective, keep in mind the errors like "access denied" or "password invalid" are typically bad not good when compared to more generic "table does not exist" or "failed logon attempt".

These errors tell you something positive about the existence of something you don't have the rights to know about and that is a defect in my opinion.

I not saying good error messages are not valuable or that Oracle's are fine, but the answer should never be that error messages tell you information about something you don't have permission to know about.



That assumes developers with access to the database are a _threat_, which is not exactly the posture one might expect or prefer.

If your database error messages are exposed to users that actually are a threat ... that already seems like a world of pain.


Unless "table does not exist" does take precisely the same time as “access denied” you still leak the same information by replacing the latter.

For logged in users I would prefer logging with explicit error messages. Like that you can tell if someone is poking around or was hacked. And still get clear error messages.


Sure, if "table does not exist" actually means that, which it does not. It means you have no access to such a table if it exists or not


Came here to find the thread discussing this. You stated what I'd think is the conventional wisdom and I expected this to be the top thread.

However, this thinking comes at the cost of UX (or Developer eXperience). Much more mundane instance of the same thinking is hiding elements of the UI you are not allowed to use. This often gets me thinking - is there a way to do this that I'm not allowed to see, or is it just that I can't find the function in the UI?

A solution for the DX issue is logging the real error somewhere only accessible for an admin. Has this been implemeted anywhere in the wild? For UIs, just be honest and show the menu items disabled.


I have some resolutions:

> Table does not exist or you do not have access. Please contact your DBA if it should exist.

For login, assuming sql*plus

> Either you have an invalid password, user does not exist, or database cannot be found at this endpoint. Please contact your DBA if it should exist.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: