Database Security Products (MOSC)

MOSC Banner

vpd policy with column masking issue

edited Nov 15, 2011 11:31PM in Database Security Products (MOSC) 2 comments
Hi there i'm trying to create a policy that masks ssn column for users in a particular role.  my code is:

---connected as ops$oraoem user:

Create role VIEW_ACCT_SSN;
/
Grant VIEW_ACCT_SSN to usera;
/

create or replace function fn_acct_ssn_mask( p_owner in varchar2, p_name in varchar2 )
return varchar2
is
lvar_count number;
return_val varchar2(400);
begin
 select count(1) into lvar_count
 from (select distinct sys_context('userenv','session_user') as "user", b.granted_role
  from dual, user_role_privs b where user = b.username and b.granted_role='VIEW_ACCT_SSN');
 if lvar_count = 0

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center