SlideShare a Scribd company logo
Oracle Data Redaction
Presented by:
Alex Zaballa, Oracle DBA
Oracle Database 12.1.0.2 New Features [UGF11311]
Deiby Mauricio Gómez Robles, Oracle Database Consultant, Pythian
Alex Zaballa, Oracle Senior DBA, Accenture Enkitec Group
Sunday, Oct 25, 11:00 a.m. | Moscone West—3011
More Than Another 12 on Oracle Database 12c [UGF3190]
Sunday, Oct 25, 1:30 p.m. | Moscone South—306
Alex Zaballa
http://alexzaballa.blogspot.com/
@alexzaballa
146 and counting…
Worked 8 years for the Ministry of Finance
March - 2007 until March - 2015
Oracle Database 12c - Data Redaction
Oracle Database 12c - Data Redaction
Oracle Data Redaction
Data Redaction
• One of the new features introduced in Oracle
Database 12c
• Part of the Advanced Security option
• Enables the protection of data shown to the
user in real time, without requiring changes to
the application
Data Redaction
• This new feature has been backported to
Oracle Database 11.2.0.4
• Applies protection at query execution time
• The stored data remain unchanged
Redaction takes place immediately preceding the return of selected data and
only at the top level of a SELECT list
• It is not an operation shown in the execution plan
Policy
SELECT rep.object_name as "OBJECT",
rep.policy_name,
rep.expression,
rep.enable,
rec.column_name as "COLUMN",
rec.function_type
FROM redaction_policies rep,
redaction_columns rec
WHERE rep.object_owner = rec.object_owner
AND rep.object_name = rec.object_name;
OBJECT POLICY_NAME EXPRESSION ENABLE COLUMN FUNCTION_TYPE
------ ----------- ------------------------------------------------ ------ ------ --------------
EMP SCOTT_EMP SYS_CONTEXT('SYS_SESSION_ROLES','MGR') = 'FALSE' YES SALARY FULL REDACTION
SQL> EXPLAIN PLAN FOR SELECT * FROM EMP;
SQL> SELECT * FROM table(DBMS_XPLAN.DISPLAY(format=>'ALL'));
As SCOTT with the MGR role:
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 3 | 36 | 3 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| EMP | 3 | 36 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
As SCOTT without the MGR role:
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 3 | 36 | 3 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| EMP | 3 | 36 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
Not to be confused with
Oracle Data Masking
With Oracle Data Masking, the data is processed
using masked shapes and this updated data is
stored in new data blocks. For this reason, Data
Masking is more suitable for non-production
environments.
** Oracle Data Masking is available only with Enterprise
Edition database and it requires licensing of Advanced
Security.
Oracle Data Masking – Secure Your
Nonproduction Environments
• Introduced in 10G;
• Designed to hide sensitive data during the copy
from production to non-production;
• Useful to create environments like Development,
Testing, UAT, etc;
Oracle Data Masking – Secure Your
Nonproduction Environments
• Replaces the real data based on masking rules, like: Credit
Card numbers, names, phone, address, social security
number, etc;
• Compliance with regulatory requirements:
(Sarbanes - Oxley, PCI DSS or HIPAA);
Oracle Data Masking
Source: Oracle Documentation
Below are some other features that already
existed to help making the data more secure:
•Virtual Private Database (VPD) - Allows control access
on both row and column levels by dynamically adding a
predicate to SQL statements issued against the database.
•Oracle Label Security – Allows you to add user-defined
values ​​to table records combining it with VPD to allow fine
control of who sees what​​.
•Database Vault – Data Redaction does not prevent
privileged users (such as DBAs) from having access to the
data being protected. To solve this, you can make use of
Database Vault.
Planning on Oracle Data Redaction Policy
1. Ensure that you have been granted the EXECUTE privilege on
the DBMS_REDACT PL/SQL package.
2. Determine the data type of the table or view column that you want to
redact.
3. Ensure that this column is not used in an Oracle Virtual Private
Database (VPD) row filtering condition. That is, it must not be part of
the VPD predicate generated by the VPD policy function.
4. Decide on the type of redaction that you want to perform: full,
random, partial, regular expressions, or none.
5. Decide which users to apply the Data Redaction policy to.
6. Based on this information, create the Data Redaction policy by using
the DBMS_REDACT.ADD_POLICY procedure.
7. Configure the policy to have additional columns to be redacted
Conditional Redaction Examples
•User Environment
expression => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') = ''SMITH'''
•Database Role
expression => 'SYS_CONTEXT(''SYS_SESSION_ROLES'',''SUPERVISOR'') = ''FALSE'''
•Oracle Label Security Label Dominance
expression => 'OLS_LABEL_DOMINATES (''hr_ols_pol'',''hs'') = 0'
•Application Express Session States
expression => 'V(''APP_USER'') != ''mavis@example.com'' or V(''APP_USER'') is null'
DBMS_REDACT
• DBMS_REDACT.ALTER_POLICY
Allows changes to existing policies.
• DBMS_REDACT.DISABLE_POLICY
Disables an existing policy.
• DBMS_REDACT.DROP_POLICY
Drop an existing policy.
• DBMS_REDACT.ENABLE_POLICY
Enables an existing policy.
• DBMS_REDACT.UPDATE_FULL_REDACTION_VALUES
Change the default return value for full redaction.
You must restart the database to take effect.
Oracle Database 12c - Data Redaction
Redaction Methods
• Full redaction
• Partial redaction
• Regular expressions
• Random redaction
• No redaction
FULL Data Redaction
• Character Data Types
The output text is a single space
Column Real Value Redacted Value
Last_Name Smith ‘ ‘
FULL Data Redaction
• Number Data Types
The output text is a zero
Column Real Value Redacted Value
Salary 8000 0
FULL Data Redaction
• Date-Time Data Types
The output text is set to the first day of January, 2001
Column Real Value Redacted Value
BirthDay 01/Dec/1980 01/Jan/2001
RANDOM Data Redaction
• CHAR Data Types
Redacted in same character set and byte length as the column
definition
Select 1
Column Real Value Redacted Value
Last_Name Smith Txaqw
Select 2
Column Real Value Redacted Value
Last_Name Smith Wascq
RANDOM Data Redaction
•Number Data Types
Redacted in same character set and the length is limited based
on the length of the actual data
Select 1
Column Real Value Redacted Value
Salary 8000 4321
Select 2
Column Real Value Redacted Value
Salary 8000 6789
RANDOM Data Redaction
•Date-Time Data Types
Redacted as random dates that are always different from those
of the actual data
Select 1
Column Real Value Redacted Value
BirthDay 01/Dec/1980 10/Oct/1960
Select 2
Column Real Value Redacted Value
BirthDay 01/Dec/1980 30/Aug/1932
Oracle Database 12c - Data Redaction
Column data types
NUMBER, BINARY_FLOAT, BINARY_DOUBLE,
CHAR, VARCHAR2, NCHAR, NVARCHAR2,
DATE, TIMESTAMP, TIMESTAMP WITH TIME
ZONE, BLOB, CLOB, and NCLOB
Oracle Database 12c - Data Redaction
Oracle Database 12c - Data Redaction
Oracle Database 12c - Data Redaction
Oracle Database 12c - Data Redaction
Oracle Database 12c - Data Redaction
Oracle Database 12c - Data Redaction
Oracle Database 12c - Data Redaction
Oracle Database 12c - Data Redaction
Operational Activities - No Redaction
•Backup and Restore
•Import and Export
•Patching and Upgrades
•Replication
•Users SYS and SYSTEM automatically have
the EXEMPT REDACTION POLICY system
privilege
•Data Redaction is not enforced for users
connected as SYSDBA
Data Redaction and Data Pump
ORA-28081: Insufficient privileges - the command
references a redacted object
Use the EXEMPT REDACTION POLICY system privilege
in these cases. However, use it with caution.
Note that the role DATAPUMP_EXP_FULL_DATABASE
includes the EXEMPT REDACTION POLICY system
privilege
If you try to CREATE TABLE ... AS SELECT (CTAS) against a
redacted table you get the following error message: ORA-
28081: Insufficient privileges - the command references a
redacted object.
In order to perform a CREATE TABLE AS SELECT operation from
a table protected by an active redaction policy, the user must
have privileges to see the actual data on the source table
Because applications may need to perform CREATE TABLE AS
SELECT operations that involve redacted source columns, you
can grant the application the EXEMPT DDL REDACTION
POLICY system privilege.
Data Redaction and CTAS
Redacted Columns and GROUP BY SQL Expressions
Redacted Columns included in SQL expressions on a GROUP BY clause will fail as follows:
SQL> select * from emp;
EMP_NO NAME SALARY
---------- ---------------------------------------- ----------
1 Daniel 702
2 Juca 607
3 Manuel 314
SQL> select (salary*1.10) from emp group by (salary*1.10);
select (salary*1.10) from emp group by (salary*1.10)
*
ERROR at line 1:
ORA-00979: not a GROUP BY expression
Redacted Columns and Virtual Columns
SQL> alter table hr.employees add sal number as (salary*1.10) virtual;
alter table hr.employees add sal number as (salary*1.10) virtual
*
ERROR at line 1:
ORA-28083: A redacted column was referenced in a virtual column expression.
•Columns from MVIEWS as well as regular VIEWS
can be redacted
Data Redaction and Views
Overhead
• It could reach up to 10% of performance impact
when using complex Regular Expressions
• Between 2-3% performance impact using other
redaction methods
•Never to be considered as a way to protect data from
anyone with SQL access to the database
•Extremely easy to hack once you have access to
SQL
Hacking
Oracle Database 12c - Data Redaction
Oracle Database 12c - Data Redaction
Time for SQLcl ?
Thank You

More Related Content

What's hot (19)

PDF
Pertemuan 10 Metadata Datawarehouse
Endang Retnoningsih
 
PDF
Tutorial membuat form dalam netbeans
stephan EL'wiin Shaarawy
 
PDF
Multi-language database design appoaches
SudabaSolaimankhil
 
PDF
Kacang kacangan
Agnescia Sera
 
PPTX
SQL(DDL,DML,DCL,TCL)
Irsyad Casanova
 
PPT
Slide6 Arsitektur Hardware
Hz Tena
 
PDF
[PBO] Pertemuan 10 - Exception & Error Handling
rizki adam kurniawan
 
PPTX
Dbms acid
Zaheer Soomro
 
PDF
Materi Data Mining - C4.5
dedidarwis
 
PDF
Performance Stability, Tips and Tricks and Underscores
Jitendra Singh
 
PPTX
The Key Responsibilities of a Database Administrator
dsp
 
PDF
Haccp dan implementasinya dalam industri pangan
Rian Indrajaya
 
PPTX
Database Administrator
Dhrumil Panchal
 
PDF
File management
Mohd Arif
 
PDF
Data Flow Diagram
Sherly Uda
 
DOCX
Ilmu gizi lemak
Khomsha Sholikhah
 
PDF
Metode pengawetan pangan dengan suhu tinggi
Agnescia Sera
 
PPTX
Database Security And Authentication
Sudeb Das
 
PDF
Oracle SQL Basics
Dhananjay Goel
 
Pertemuan 10 Metadata Datawarehouse
Endang Retnoningsih
 
Tutorial membuat form dalam netbeans
stephan EL'wiin Shaarawy
 
Multi-language database design appoaches
SudabaSolaimankhil
 
Kacang kacangan
Agnescia Sera
 
SQL(DDL,DML,DCL,TCL)
Irsyad Casanova
 
Slide6 Arsitektur Hardware
Hz Tena
 
[PBO] Pertemuan 10 - Exception & Error Handling
rizki adam kurniawan
 
Dbms acid
Zaheer Soomro
 
Materi Data Mining - C4.5
dedidarwis
 
Performance Stability, Tips and Tricks and Underscores
Jitendra Singh
 
The Key Responsibilities of a Database Administrator
dsp
 
Haccp dan implementasinya dalam industri pangan
Rian Indrajaya
 
Database Administrator
Dhrumil Panchal
 
File management
Mohd Arif
 
Data Flow Diagram
Sherly Uda
 
Ilmu gizi lemak
Khomsha Sholikhah
 
Metode pengawetan pangan dengan suhu tinggi
Agnescia Sera
 
Database Security And Authentication
Sudeb Das
 
Oracle SQL Basics
Dhananjay Goel
 

Viewers also liked (19)

PDF
HS CN Pledge Book
Wang Ava
 
PDF
SJ GROUP presentation-All
Jimmy Yan
 
PPTX
Oracle Data Redaction - UKOUG - TECH14
Alex Zaballa
 
PPTX
ADTELLIGENCE White Paper: Monetizationof strategies and business models for S...
Michael Altendorf
 
PPTX
Webinar integración jira ms project
atSistemas
 
PDF
Python typing module
Ryan Blunden
 
PPTX
Partitioning on Oracle 12c - What changed on the most important Oracle feature
Luis Marques
 
PPTX
Institution research
Gliff
 
PPTX
Webinar Oracle adf12c EN
atSistemas
 
PPTX
Em13c New Features- One of Two
Kellyn Pot'Vin-Gorman
 
PPTX
Upgrading Em13c Collaborate 2016
Kellyn Pot'Vin-Gorman
 
PPTX
Em13c New Features- Two of Two
Kellyn Pot'Vin-Gorman
 
PPTX
Garment industry presentation
Jumpei Takaichi
 
PPTX
Oracle R12.1.2 and R12.1.3 features
ravisagaram
 
PPTX
La transformacion digital en nuestra vida cotidiana. Un vistazo a las APIs
Guatemala User Group
 
PDF
Oracle 12.2 sharded database management
Leyi (Kamus) Zhang
 
PPT
Differences R12 Vs 11i.5.10
Dharmalingam Kandampalayam Shanmugam
 
PDF
Weblogic 11g admin basic with screencast
Rajiv Gupta
 
PPTX
Institution analysis final (1)
wojstarrr123
 
HS CN Pledge Book
Wang Ava
 
SJ GROUP presentation-All
Jimmy Yan
 
Oracle Data Redaction - UKOUG - TECH14
Alex Zaballa
 
ADTELLIGENCE White Paper: Monetizationof strategies and business models for S...
Michael Altendorf
 
Webinar integración jira ms project
atSistemas
 
Python typing module
Ryan Blunden
 
Partitioning on Oracle 12c - What changed on the most important Oracle feature
Luis Marques
 
Institution research
Gliff
 
Webinar Oracle adf12c EN
atSistemas
 
Em13c New Features- One of Two
Kellyn Pot'Vin-Gorman
 
Upgrading Em13c Collaborate 2016
Kellyn Pot'Vin-Gorman
 
Em13c New Features- Two of Two
Kellyn Pot'Vin-Gorman
 
Garment industry presentation
Jumpei Takaichi
 
Oracle R12.1.2 and R12.1.3 features
ravisagaram
 
La transformacion digital en nuestra vida cotidiana. Un vistazo a las APIs
Guatemala User Group
 
Oracle 12.2 sharded database management
Leyi (Kamus) Zhang
 
Differences R12 Vs 11i.5.10
Dharmalingam Kandampalayam Shanmugam
 
Weblogic 11g admin basic with screencast
Rajiv Gupta
 
Institution analysis final (1)
wojstarrr123
 
Ad

Similar to Oracle Database 12c - Data Redaction (20)

PPTX
Oracle Data Redaction
Alex Zaballa
 
PPTX
Data Redaction - OTN TOUR LA 2015
Alex Zaballa
 
PPTX
Oracle Data Redaction
Ivica Arsov
 
PDF
Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...
EDB
 
PPTX
Oracle Data redaction - GUOB - OTN TOUR LA - 2015
Alex Zaballa
 
PPTX
Oracle Data Redaction - EOUC
Alex Zaballa
 
PPTX
Oracle Database 12c - New Features for Developers and DBAs
Alex Zaballa
 
PPTX
Oracle Database 12c - New Features for Developers and DBAs
Alex Zaballa
 
PPTX
Security in Oracle Database
atousa_ahsani
 
PPTX
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 
PPTX
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 
PDF
security in oracle database
ssuser40bb47
 
PDF
Security in oracle
ssuser40bb47
 
PDF
OER Unit 4 Virtual Private Database
Girija Muscut
 
PPTX
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Alex Zaballa
 
PPTX
Securing data in Oracle Database 12c - 2015
Connor McDonald
 
DOCX
Dbms question
Ricky Dky
 
PPTX
12_more_idea_things_about_oracle_12c.pptx
ankitmodidba
 
PDF
Overview of Oracle database12c for developers
Getting value from IoT, Integration and Data Analytics
 
Oracle Data Redaction
Alex Zaballa
 
Data Redaction - OTN TOUR LA 2015
Alex Zaballa
 
Oracle Data Redaction
Ivica Arsov
 
Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...
EDB
 
Oracle Data redaction - GUOB - OTN TOUR LA - 2015
Alex Zaballa
 
Oracle Data Redaction - EOUC
Alex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Alex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Alex Zaballa
 
Security in Oracle Database
atousa_ahsani
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 
security in oracle database
ssuser40bb47
 
Security in oracle
ssuser40bb47
 
OER Unit 4 Virtual Private Database
Girija Muscut
 
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Alex Zaballa
 
Securing data in Oracle Database 12c - 2015
Connor McDonald
 
Dbms question
Ricky Dky
 
12_more_idea_things_about_oracle_12c.pptx
ankitmodidba
 
Overview of Oracle database12c for developers
Getting value from IoT, Integration and Data Analytics
 
Ad

More from Alex Zaballa (20)

PDF
Migrating Oracle Databases from AWS to OCI
Alex Zaballa
 
PPTX
Exploring All options to move your Oracle Databases to the Oracle Cloud
Alex Zaballa
 
PPTX
Moving Your Oracle Databases To The Oracle Cloud
Alex Zaballa
 
PPTX
SQL TUNING 101
Alex Zaballa
 
PPTX
SQL TUNING 101
Alex Zaballa
 
PPTX
DBA Commands and Concepts That Every Developer Should Know - Part 2
Alex Zaballa
 
PPTX
DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
PPTX
LET’S GET STARTED WITH ORACLE DATABASE CLOUD
Alex Zaballa
 
PPTX
DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
PPTX
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
PPTX
Moving your Oracle Databases to the Oracle Cloud
Alex Zaballa
 
PPTX
Os melhores recursos novos do Oracle Database 12c para desenvolvedores e DBAs...
Alex Zaballa
 
PPTX
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
PDF
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
Alex Zaballa
 
PDF
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
Alex Zaballa
 
PPTX
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Alex Zaballa
 
PPT
Oracle SQL Tuning
Alex Zaballa
 
PPTX
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
PPTX
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Alex Zaballa
 
PPTX
DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
Migrating Oracle Databases from AWS to OCI
Alex Zaballa
 
Exploring All options to move your Oracle Databases to the Oracle Cloud
Alex Zaballa
 
Moving Your Oracle Databases To The Oracle Cloud
Alex Zaballa
 
SQL TUNING 101
Alex Zaballa
 
SQL TUNING 101
Alex Zaballa
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
Alex Zaballa
 
DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
LET’S GET STARTED WITH ORACLE DATABASE CLOUD
Alex Zaballa
 
DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
Moving your Oracle Databases to the Oracle Cloud
Alex Zaballa
 
Os melhores recursos novos do Oracle Database 12c para desenvolvedores e DBAs...
Alex Zaballa
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
Alex Zaballa
 
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
Alex Zaballa
 
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Alex Zaballa
 
Oracle SQL Tuning
Alex Zaballa
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Alex Zaballa
 
DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 

Recently uploaded (20)

PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
July Patch Tuesday
Ivanti
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 

Oracle Database 12c - Data Redaction

  • 1. Oracle Data Redaction Presented by: Alex Zaballa, Oracle DBA
  • 2. Oracle Database 12.1.0.2 New Features [UGF11311] Deiby Mauricio Gómez Robles, Oracle Database Consultant, Pythian Alex Zaballa, Oracle Senior DBA, Accenture Enkitec Group Sunday, Oct 25, 11:00 a.m. | Moscone West—3011 More Than Another 12 on Oracle Database 12c [UGF3190] Sunday, Oct 25, 1:30 p.m. | Moscone South—306
  • 4. Worked 8 years for the Ministry of Finance March - 2007 until March - 2015
  • 8. Data Redaction • One of the new features introduced in Oracle Database 12c • Part of the Advanced Security option • Enables the protection of data shown to the user in real time, without requiring changes to the application
  • 9. Data Redaction • This new feature has been backported to Oracle Database 11.2.0.4
  • 10. • Applies protection at query execution time • The stored data remain unchanged Redaction takes place immediately preceding the return of selected data and only at the top level of a SELECT list • It is not an operation shown in the execution plan
  • 11. Policy SELECT rep.object_name as "OBJECT", rep.policy_name, rep.expression, rep.enable, rec.column_name as "COLUMN", rec.function_type FROM redaction_policies rep, redaction_columns rec WHERE rep.object_owner = rec.object_owner AND rep.object_name = rec.object_name; OBJECT POLICY_NAME EXPRESSION ENABLE COLUMN FUNCTION_TYPE ------ ----------- ------------------------------------------------ ------ ------ -------------- EMP SCOTT_EMP SYS_CONTEXT('SYS_SESSION_ROLES','MGR') = 'FALSE' YES SALARY FULL REDACTION
  • 12. SQL> EXPLAIN PLAN FOR SELECT * FROM EMP; SQL> SELECT * FROM table(DBMS_XPLAN.DISPLAY(format=>'ALL')); As SCOTT with the MGR role: -------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 3 | 36 | 3 (0)| 00:00:01 | | 1 | TABLE ACCESS FULL| EMP | 3 | 36 | 3 (0)| 00:00:01 | -------------------------------------------------------------------------- As SCOTT without the MGR role: -------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 3 | 36 | 3 (0)| 00:00:01 | | 1 | TABLE ACCESS FULL| EMP | 3 | 36 | 3 (0)| 00:00:01 | --------------------------------------------------------------------------
  • 13. Not to be confused with Oracle Data Masking With Oracle Data Masking, the data is processed using masked shapes and this updated data is stored in new data blocks. For this reason, Data Masking is more suitable for non-production environments. ** Oracle Data Masking is available only with Enterprise Edition database and it requires licensing of Advanced Security.
  • 14. Oracle Data Masking – Secure Your Nonproduction Environments • Introduced in 10G; • Designed to hide sensitive data during the copy from production to non-production; • Useful to create environments like Development, Testing, UAT, etc;
  • 15. Oracle Data Masking – Secure Your Nonproduction Environments • Replaces the real data based on masking rules, like: Credit Card numbers, names, phone, address, social security number, etc; • Compliance with regulatory requirements: (Sarbanes - Oxley, PCI DSS or HIPAA);
  • 16. Oracle Data Masking Source: Oracle Documentation
  • 17. Below are some other features that already existed to help making the data more secure: •Virtual Private Database (VPD) - Allows control access on both row and column levels by dynamically adding a predicate to SQL statements issued against the database. •Oracle Label Security – Allows you to add user-defined values ​​to table records combining it with VPD to allow fine control of who sees what​​. •Database Vault – Data Redaction does not prevent privileged users (such as DBAs) from having access to the data being protected. To solve this, you can make use of Database Vault.
  • 18. Planning on Oracle Data Redaction Policy 1. Ensure that you have been granted the EXECUTE privilege on the DBMS_REDACT PL/SQL package. 2. Determine the data type of the table or view column that you want to redact. 3. Ensure that this column is not used in an Oracle Virtual Private Database (VPD) row filtering condition. That is, it must not be part of the VPD predicate generated by the VPD policy function. 4. Decide on the type of redaction that you want to perform: full, random, partial, regular expressions, or none. 5. Decide which users to apply the Data Redaction policy to. 6. Based on this information, create the Data Redaction policy by using the DBMS_REDACT.ADD_POLICY procedure. 7. Configure the policy to have additional columns to be redacted
  • 19. Conditional Redaction Examples •User Environment expression => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') = ''SMITH''' •Database Role expression => 'SYS_CONTEXT(''SYS_SESSION_ROLES'',''SUPERVISOR'') = ''FALSE''' •Oracle Label Security Label Dominance expression => 'OLS_LABEL_DOMINATES (''hr_ols_pol'',''hs'') = 0' •Application Express Session States expression => 'V(''APP_USER'') != ''[email protected]'' or V(''APP_USER'') is null'
  • 20. DBMS_REDACT • DBMS_REDACT.ALTER_POLICY Allows changes to existing policies. • DBMS_REDACT.DISABLE_POLICY Disables an existing policy. • DBMS_REDACT.DROP_POLICY Drop an existing policy. • DBMS_REDACT.ENABLE_POLICY Enables an existing policy. • DBMS_REDACT.UPDATE_FULL_REDACTION_VALUES Change the default return value for full redaction. You must restart the database to take effect.
  • 22. Redaction Methods • Full redaction • Partial redaction • Regular expressions • Random redaction • No redaction
  • 23. FULL Data Redaction • Character Data Types The output text is a single space Column Real Value Redacted Value Last_Name Smith ‘ ‘
  • 24. FULL Data Redaction • Number Data Types The output text is a zero Column Real Value Redacted Value Salary 8000 0
  • 25. FULL Data Redaction • Date-Time Data Types The output text is set to the first day of January, 2001 Column Real Value Redacted Value BirthDay 01/Dec/1980 01/Jan/2001
  • 26. RANDOM Data Redaction • CHAR Data Types Redacted in same character set and byte length as the column definition Select 1 Column Real Value Redacted Value Last_Name Smith Txaqw Select 2 Column Real Value Redacted Value Last_Name Smith Wascq
  • 27. RANDOM Data Redaction •Number Data Types Redacted in same character set and the length is limited based on the length of the actual data Select 1 Column Real Value Redacted Value Salary 8000 4321 Select 2 Column Real Value Redacted Value Salary 8000 6789
  • 28. RANDOM Data Redaction •Date-Time Data Types Redacted as random dates that are always different from those of the actual data Select 1 Column Real Value Redacted Value BirthDay 01/Dec/1980 10/Oct/1960 Select 2 Column Real Value Redacted Value BirthDay 01/Dec/1980 30/Aug/1932
  • 30. Column data types NUMBER, BINARY_FLOAT, BINARY_DOUBLE, CHAR, VARCHAR2, NCHAR, NVARCHAR2, DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE, BLOB, CLOB, and NCLOB
  • 39. Operational Activities - No Redaction •Backup and Restore •Import and Export •Patching and Upgrades •Replication •Users SYS and SYSTEM automatically have the EXEMPT REDACTION POLICY system privilege •Data Redaction is not enforced for users connected as SYSDBA
  • 40. Data Redaction and Data Pump ORA-28081: Insufficient privileges - the command references a redacted object Use the EXEMPT REDACTION POLICY system privilege in these cases. However, use it with caution. Note that the role DATAPUMP_EXP_FULL_DATABASE includes the EXEMPT REDACTION POLICY system privilege
  • 41. If you try to CREATE TABLE ... AS SELECT (CTAS) against a redacted table you get the following error message: ORA- 28081: Insufficient privileges - the command references a redacted object. In order to perform a CREATE TABLE AS SELECT operation from a table protected by an active redaction policy, the user must have privileges to see the actual data on the source table Because applications may need to perform CREATE TABLE AS SELECT operations that involve redacted source columns, you can grant the application the EXEMPT DDL REDACTION POLICY system privilege. Data Redaction and CTAS
  • 42. Redacted Columns and GROUP BY SQL Expressions Redacted Columns included in SQL expressions on a GROUP BY clause will fail as follows: SQL> select * from emp; EMP_NO NAME SALARY ---------- ---------------------------------------- ---------- 1 Daniel 702 2 Juca 607 3 Manuel 314 SQL> select (salary*1.10) from emp group by (salary*1.10); select (salary*1.10) from emp group by (salary*1.10) * ERROR at line 1: ORA-00979: not a GROUP BY expression
  • 43. Redacted Columns and Virtual Columns SQL> alter table hr.employees add sal number as (salary*1.10) virtual; alter table hr.employees add sal number as (salary*1.10) virtual * ERROR at line 1: ORA-28083: A redacted column was referenced in a virtual column expression.
  • 44. •Columns from MVIEWS as well as regular VIEWS can be redacted Data Redaction and Views
  • 45. Overhead • It could reach up to 10% of performance impact when using complex Regular Expressions • Between 2-3% performance impact using other redaction methods
  • 46. •Never to be considered as a way to protect data from anyone with SQL access to the database •Extremely easy to hack once you have access to SQL Hacking

Editor's Notes

  • #9: For me, oracle should provide security features for free, specially for enterprise edition But it is just my opinion.
  • #11: The next slide will show that the execution plans do not change between queries which return redacted data and queries that do not return redacted data.
  • #12: The above slide shows that a policy named SCOTT_EMP exists for a table called EMP. The policy is enabled and it is supposed to redact the salary column for sessions that do not have the MGR role.
  • #13: This slide makes it clear that there is no distinction between execution plans of the same statement with or without data redaction taking place. The redaction magic must happen right after the TOP level operation of the execution plan and before the data is sent to the client.
  • #20: Here a some examples of conditional artefacts that can be used to drive redaction policies
  • #40: Import and Export: Data Redaction policies associated with tables and views are included in the export and import operation. Therefore, the policies are enabled and the data is redacted when users query the objects in the imported database SYSTEM has the EXP_FULL_DATABASE role, which includes the EXEMPT REDACTION POLICY system privilege.
  • #41: Alternatively, you can perform the export with a user that is exempt from the redaction policy. Namely, a user that doesn't fall under the redaction criteria
  • #42: Because applications may need to perform CREATE TABLE AS SELECT operations that involve redacted source columns, you can grant the application the EXEMPT DDL REDACTION POLICY system privilege.
  • #43: The above example shows a table emp that has a redaction policy enabled on column SALARY.
  • #44: The above example shows a table emp that has a redaction policy enabled on column SALARY.
  • #45: Inline Views SELECT XYZ … AS SELECT A… AS SELECT B… AS SELECT C…, SELECT XYZ is redacted first, followed by AS SELECT A, then AS SELECT B, and so on. AS SELECT C is redacted last.
  • #46: According to our tests it could reach up to 10% of performance impact when using complex RegEx and between 2-3% performance impact using other redaction methods