DB2 – Does DB2 Support Host-Based Access Control?

access-controldb2

Coming from MySQL I was wondering whether DB2 has something similar to MySQL's user@host access rights concept.

Best Answer

By default DB2 delegates all authentication to the operating system of the server, so the "host" is always the same -- the DB2 server host and the authenticated user ID does have the "host" component and all privileges are verified against the user ID only.

Depending on what you are actually trying to achieve, you may be able to restrict access to certain actions or objects via custom authentication plugin, workload manager controls, or row/column access control mechanisms.

Edit

Thanks to @IanBjorhovde for reminding us of yet another option: trusted contexts (see tutorial), although it still is not an exact match. Even though you can restrict clients with certain IPs from connecting to the database, authentication is still performed at the server, so it's not exactly "user@remote_host" but rather "user@server_host connecting from remote_host".