aby wrote:
What i have observed with firebird is that, immaterial of who the owner of your database is, your database objects can still be viewed by any user who is in the security database. Although any other user cannot r/w neither to these object nor to the system tables Is there a way by which i can restrict my DB connection for only the owner and no one else.?
Fidel Viegas answers:
If you are using Firebird 2.1+, then you can use database triggers to achieve that.
Milan Babuskov adds:
There's an example of a similar trigger here:
http://www.firebirdfaq.org/faq344
Basically, you check the CURRENT_USER and throw an exception to prevent connecting. Something like:
if (not exists(
SELECT 1
FROM RDB$RELATIONS a
WHERE a.RDB$RELATION_NAME = 'RDB$DATABASE'
and a.RDB$OWNER_NAME = current_user))
then
exception disallow 'Only owner can connect';