Forum Stats

  • 3,838,667 Users
  • 2,262,392 Discussions
  • 7,900,730 Comments

Discussions

Real Application Security - how can application check if user has privileges on a table without know

AndyH
AndyH Member Posts: 820 Bronze Trophy
edited May 13, 2020 4:34AM in Database Security - General

Hi,

I'm prototyping the use of RAS in an APEX application (using RAS external users)

The assumption is that the APEX developers have limited knowledge of how RAS  was implemented e.g. they would only know about dynamic roles and their assignment to users.

Generally this is OK as we can code up authorization checks against the various tables to see of the current use has privileges on the table e.g. using a 'where exists' authorization

SELECT NULLFROM   dualWHERE  1 = (SELECT ora_check_acl(ora_get_aclids(p                                               ,'update')                                ,'update')            FROM   pipes p            WHERE  rownum < 2)

would return a row if the user has 'update' privileges on the PIPES table.

However, if the user has *no* ACL  access to the PIPES table the above check fails with a ORA-00942 'table does not exist' error.

How can I code the authorization so that I can see if the user has the required table access when they may in fact have no access?

Thanks,

--

Andy

Answers