Database Security Products (MOSC)

MOSC Banner

DATA redaction expression to redact data for particular users(assigned with supervisor role) not wor

edited Aug 8, 2018 5:07AM in Database Security Products (MOSC) 1 commentAnswered

1) BEGIN

  DBMS_REDACT.add_policy(

    object_schema => 'test_redact',

    object_name   => 'CMC_STTM_DATES',

    column_name   => 'BRANCH_CODE',

    policy_name   => 'redact_date_info',

    function_type => DBMS_REDACT.full,

    expression    => 'SYS_CONTEXT('SYS_SESSION_ROLES', 'SUPERVISOR') = 'FALSE''

  );

END;

/

2) BEGIN

  DBMS_REDACT.add_policy(

    object_schema => 'test_redact',

    object_name   => 'CMC_DUPLICATE_FIELDS',

    column_name   => 'FUNCTIONID',

    policy_name   => 'redact_fnid_info',

    function_type => DBMS_REDACT.full,

       expression    => 'SYS_CONTEXT(''USERENV'', ''SESSION_USER'') != ''SUPERVISOR'''

  );

END;

/

I used the following 2 redaction methods to exempt redaction for users with supervisor role in 1 and 2 (user test_redact has supervisor role but test_redact can see redacted data only ,once i granted test_redact EXEMPT redaction policy privileges test_redact user is able to see data without redaction but applicable to all tables. What if i want to give redaction to only certain tables to user

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