Missing Information in System Table EXA_ALL_OBJ_PRIVS

Details

Detail name Value
Changelog Number 7002
Type Bug
Status Resolved
Affected Versions EXASolution 5.0.22, Exasol 6.0.12
Fix Versions Exasol 8.6.0
Resolution Date 2022-10-12

Problem

The system table EXA_ALL_OBJ_PRIVS does not show a privilege if it was not granted directly to the current user but to a role of the user.

 Example

The following statements create the user USER1 with role ROLE1. ROLE1 is grantee of a SELECT privilege and owner of schema S.

CREATE USER USER1 IDENTIFIED BY "secret";
GRANT CREATE SESSION TO USER1;
CREATE ROLE ROLE1;
GRANT ROLE1 TO USER1;

CREATE SCHEMA S;
CREATE TABLE T(A INT);
GRANT SELECT ON T TO ROLE1;
ALTER SCHEMA S CHANGE OWNER ROLE1;

The table EXA_DBA_OBJ_PRIVS shows the following privilege

OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE PRIVILEGE GRANTEE GRANTOR OWNER
S T TABLE SELECT ROLE1 SYS ROLE1

When logged in as USER1 the following statements show that USER1 has access to table T but the system table EXA_ALL_OBJ_PRIVS does not show the privilege.

OPEN SCHEMA S;
SELECT * FROM T; 
SELECT * FROM EXA_ALL_OBJ_PRIVS; 

Changed behavior

  • EXA_ALL_OBJ_PRIVS and EXA_ALL_OBJ_PRIVS_MADE include privileges and ownership by roles
  • EXA_USER_OBJ_PRIVS contains privileges that are granted by the current user
  • EXA_USER_OBJ_PRIVS_MADE does not include roles anymore
  • EXA_ROLE_CONNECTION_PRIVS and EXA_ROLE_RESTRICTED_OBJ_PRIVS do not include the current user anymore