Your question is a bit broad, but here are some advises to implement what you expect:
Even if the DB has user authentication, don't rely on it:
- Authentication is highly DB-specific, so your code won't be easily migrated to another kind of DB;
- Leaking the DB credentials is always a bad idea, for security reasons: anyone able to connect to the DB would be able to modify it with raw SQL...
So, in a perfect world, I would use a n-Tier architecture, and keep the Authentication on the server side. But it won't apply to a RAD application.
A typical way is to define some User
table, with an ID, and authentication using e.g. a hashed password. Then some other UserRight
table, with features names as string keys, which I would test in my VCL/UI code: e.g. "ModifyThisKindOfData", "ExportThisKindOfContent"... See for instance how to distinguish Authorization and Authentication.
About security, if you are using Access, you need to secure Authorization and Authentication by using proper hashing of the password (use e.g. PBKDF2/SHA-256 with a secret and a stored salt), and by signing both User
and UserRight
table rows e.g. with a HMAC-SHA-256. Then validate it in the software to detect if the DB has been tempered. It will avoid most obvious security flaws. But switch to a proper n-Tier design, or a client-server DB will be better.