Db2 Text Search security overview
Db2 Text Search executes administrative operations based on the authorization ID of the user executing the operation. Different to previous releases, there is no prerequisite for database privileges for the instance owner anymore, and it is not necessary for the fenced user to be in the same primary group as the instance owner.
- Text Search Administrator (SYSTS_ADM) - executes operations on database level
- Text Search Manager (SYSTS_MGR) - executes operations on index level
- Text Search User (SYSTS_USR) - has access to text search catalog data
The security administrator can grant or revoke these roles like user-defined roles, however, roles with prefix SYSTS are system managed otherwise and cannot be dropped or created.
When a database is created, the roles are automatically assigned to the database creator, and in non-restricted databases, the SYSTS_USR role is assigned to PUBLIC. All other role assignments must be done explicitly by the security administrator, for example, SYSTS_ADM to enable or disable text search.
In a restricted database setup, the security administrator must grant execute privileges for scheduler procedures to SYSTS_MGR role and user privileges for the SYSTS_USR role.
Table privileges to manage or access content in the SYSIBMTS catalog tables are automatically granted to the roles during database enablement for Db2 Text Search. Similarly, table privileges to manage or access content in the SYSIBMTS administration tables for a specific text search index are automatically granted to the roles during text index creation. For example, to create a text index you will need privileges on the base table corresponding to the privileges that are needed to create other types of indexes, and also the SYSTS_MGR role which provides access privileges to the SYSIBMTS tables.
Certain index-level commands require a connection to the text search server. The relevant connection information is retrieved from the SYSIBMTS.TSSERVERS administrative view and includes an authentication token. The token is generated when the text search server is configured and used as an identification mechanism by callers to ensure that the right text search server is addressed. If the wrong token is used, the index management or search request is rejected.
| Role | Operation | |
|---|---|---|
| Text Search Administrator | SYSTS_ADM | Enable, Disable, Clear command locks (all), Configure |
| Text Search Manager | SYSTS_MGR | Create, Update, Alter, Drop, Clear Events, Clear command locks (per index), Reset Pending |
| Text Search User | SYSTS_USR | Limited access to the text search SYSIBMTS catalog |