a first look at database vault david bergmeier. overview installation limitations securing data ...

119
A First look at A First look at Database Vault Database Vault David Bergmeier David Bergmeier

Upload: alfredo-galley

Post on 15-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

A First look atA First look atDatabase VaultDatabase Vault

David BergmeierDavid Bergmeier

Page 2: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Overview

Installation

Limitations

Securing Data

Backups

A trigger problem

AgendaAgenda

Page 3: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Senior Oracle DBA

Worked for MGA nearly 2 years

Background as an Analyst/Programmer

12 years in financial services industry

Started using Oracle in 1996

About meAbout me

Page 4: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Why Oracle Database Vault?

• Don’t trust the DBA

• Regulatory Compliance(e.g. Sarbanes Oxley)

• Separation of duties

OverviewOverview

Page 5: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Separation of dutiesSeparation of duties

connect / as sysdbacreate user david ...grant dba to david;select * from scott.emp;

Page 6: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Separation of dutiesSeparation of duties

connect / as sysdbacreate user david ...grant dba to david;select * from scott.emp;

Page 7: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Separation of dutiesSeparation of duties

Page 8: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Separation of dutiesSeparation of duties

Page 9: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Separation of dutiesSeparation of duties

Page 10: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Overview

Installation

Limitations

Securing Data

Backups

A trigger problem

AgendaAgenda

Page 11: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

• Oracle 10.2.0.3

• 1024 MB of Physical RAM

• Swap space (1.5 times RAM)

• 400 MB in /tmp

• 270 MB for database vault binaries

• 10 MB additional for database files

PrerequisitesPrerequisites

Page 12: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Installation

• Assumes one instance per Oracle home

• But can support more

PrerequisitesPrerequisites

Page 13: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

InstallationInstallation

Page 14: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

InstallationInstallationUser to receive DV_OWNER role

Page 15: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

InstallationInstallationPasswords must

have alpha, numeric & special

Page 16: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

InstallationInstallation

User to receive DV_ACCTMGR role

Page 17: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

InstallationInstallation

Page 18: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

InstallationInstallation

Page 19: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

InstallationInstallation

Page 20: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

InstallationInstallation

Page 21: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

InstallationInstallation

Page 22: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

InstallationInstallation

Page 23: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

InstallationInstallation

Page 24: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Overview

Installation

Limitations

Securing Data

Backups

A trigger problem

AgendaAgenda

Page 25: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Let’s start the database

The First ProblemThe First Problem

Page 26: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

The First ProblemThe First Problem

Page 27: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

The First ProblemThe First Problem

Page 28: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

I cannot login as SYDBA

So how do I start/stop Oracle?

The First ProblemThe First Problem

Page 29: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

connect / as SYSOPER

The First ProblemThe First Problem

Page 30: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

The First ProblemThe First Problem

Page 31: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Overview

Installation

Limitations

Securing Data

Backups

A trigger problem

AgendaAgenda

Page 32: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

$ lsnrctl start

$ emctl start dbconsole

Securing Some DataSecuring Some Data

Page 33: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

$ sqlplus system/manager

SQL> select * from scott.emp;

...

14 rows selected.

SQL>

Securing Some DataSecuring Some Data

Page 34: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing Some DataSecuring Some Data

Page 35: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing Some DataSecuring Some Data

Page 36: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing Some DataSecuring Some Data

Page 37: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing Some DataSecuring Some Data

Page 38: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

A realm is a

functional grouping of schemas and roles that are

secured.

What is a Realm?What is a Realm?

Page 39: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

What is a Realm?What is a Realm?

Realm

Secured Objects Authorizations

One

Many

Page 40: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing Some DataSecuring Some Data

Page 41: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing Some DataSecuring Some Data

Page 42: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing Some DataSecuring Some Data

Page 43: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing Some DataSecuring Some Data

Page 44: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing Some DataSecuring Some Data

Page 45: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing Some DataSecuring Some Data

Page 46: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing Some DataSecuring Some Data

Page 47: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> select * from scott.emp;

select * from scott.emp

*

ERROR at line 1:

ORA-01031: Insufficient Privileges

SQL>

Securing Some DataSecuring Some Data

Page 48: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> select * from scott.dept; DEPTNO DNAME LOC---------- -------------- -------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTONSQL>

Securing Some DataSecuring Some Data

Page 49: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

That’s the end of the tutorial.

So now let’s consider a real world application.

Securing Some DataSecuring Some Data

Page 50: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Real world ExampleReal world Example

EMP

application user

SCOTT

Application server connects to database as

single user

Page 51: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Real world ExampleReal world Example

EMP

application user

support users

SCOTT

Support users connect with

individual accounts with

read-only access

Page 52: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Real world ExampleReal world Example

EMP

grant select insert update delete

scott_app_user

scott_ro_role

scott_rogrant select

grant role

SCOTT

Page 53: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect system/manager

SQL> create user scott_app_user

2> identified by tiger

3> default tablespace USERS;

identified by tiger

*

ERROR at line 2:

ORA-01031: Insufficient Privileges

Create UserCreate User

Page 54: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect dbu/manager

SQL> create user scott_app_user

2> identified by tiger

3> default tablespace USERS;

User created.

SQL> grant connect to scott_app_user;

Create UserCreate User

Page 55: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect dbu/manager

SQL> create user scott_ro

2> identified by tiger

3> default tablespace USERS;

User created.

SQL> grant connect to scott_ro;

Create UserCreate User

Page 56: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect system/manager

SQL> create role scott_ro_role;

Role created.

SQL> grant scott_ro_role to scott_ro;

Grant succeeded.

SQL>

Create RoleCreate Role

Page 57: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect scott/tiger

SQL> grant select,insert,update,delete on emp to scott_app_user;

Grant succeeded.

SQL> grant select on emp to scott_ro_role;

Grant succeeded.

SQL>

GrantsGrants

Page 58: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Now to test it...

Real world ExampleReal world Example

Page 59: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect scott_ro/tiger

SQL> select * from scott.emp;

14 rows selected.

SQL> delete from scott.emp;

delete from scott.emp

*

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing scott_roTesting scott_ro

Page 60: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect scott_ro/tiger

SQL> select * from scott.emp;

14 rows selected.

SQL> delete from scott.emp;

delete from scott.emp

*

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing scott_roTesting scott_ro

Page 61: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect scott_app_user/tiger

SQL> select * from scott.emp;

14 rows selected.

SQL> delete from scott.emp;

14 rows deleted.

SQL> rollback;

Testing scott_app_userTesting scott_app_user

Page 62: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect scott_app_user/tiger

SQL> select * from scott.emp;

14 rows selected.

SQL> delete from scott.emp;

14 rows deleted.

SQL> rollback;

Testing scott_app_userTesting scott_app_user

Page 63: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect system/manager

SQL> select * from scott.emp;

14 rows selected.

SQL> delete from scott.emp;

delete from scott.emp

*

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing systemTesting system

Page 64: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect system/manager

SQL> select * from scott.emp;

14 rows selected.

SQL> delete from scott.emp;

delete from scott.emp

*

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing systemTesting system

Page 65: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect system/manager

SQL> select * from session_roles;

ROLE---------------------------DV_PUBLICDBA...SCOTT_RO_ROLE

14 rows selected.

SQL>

What went wrong?What went wrong?

Page 66: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

How did SYSTEM get

SCOTT_RO_ROLE?

What went wrong?What went wrong?

Page 67: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect system/manager

SQL> create role foo;

Role created.

SQL> set role all;

Role set.

SQL> select * from session_roles;

ROLE---------------------------DV_PUBLIC...FOO

What went wrong?What went wrong?

Page 68: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

So now we have a problem!

What went wrong?What went wrong?

If we only revoke the role, SYSTEM can grant it again.

How do we prevent this?

Page 69: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect system/manager

SQL> drop role scott_ro_role;

Role dropped.

SQL> select * from session_roles;

ROLE---------------------------DV_PUBLIC...MGMT_USER

13 rows selected.

SQL>

Remove the RoleRemove the Role

Page 70: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

DV_ACCTMGR has• create/drop user

• alter user account lock/unlock

• alter user password expire

• grant/revoke CONNECT role

Problem with DV_ACCTMGRProblem with DV_ACCTMGR

Page 71: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

DV_ACCTMGR needs• create role

• alter any role

• drop any role

• SELECT_CATALOG_ROLE

To get these, we need to login as SYSDBA

Problem with DV_ACCTMGRProblem with DV_ACCTMGR

Page 72: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

$ cd $ORACLE_HOME/dbs

$ orapwd file=orapwmozart password=mozart entries=20 force=y nosysdba=n

$ sqlplus sys/mozart as sysdba

SQL> startup

SQL> alter user sys identified by mozart;

Allow SYSDBAAllow SYSDBA

Page 73: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect sys/mozart as sysdba

SQL> grant create role to DV_ACCTMGR;

SQL> grant alter any role to DV_ACCTMGR;

SQL> grant drop any role to DV_ACCTMGR;

Grants to DV_ACCTMGRGrants to DV_ACCTMGR

Page 74: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SELECT_CATALOG_ROLESELECT_CATALOG_ROLE

Page 75: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SELECT_CATALOG_ROLESELECT_CATALOG_ROLE

Page 76: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Fixing DV_ACCTMGRFixing DV_ACCTMGR

Page 77: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Fixing DV_ACCTMGRFixing DV_ACCTMGR

Page 78: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Fixing DV_ACCTMGRFixing DV_ACCTMGR

Page 79: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect dbu/manager

SQL> create role scott_ro_role;

Role created.

SQL>

Create Role as DV_ACCTMGRCreate Role as DV_ACCTMGR

At this stage we delay granting scott_ro_role

Page 80: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing SCOTT_RO_ROLESecuring SCOTT_RO_ROLE

Page 81: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Securing SCOTT_RO_ROLESecuring SCOTT_RO_ROLE

Page 82: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect dbu/manager

SQL> grant scott_ro_role to scott_ro;

grant scott_ro_role to scott_ro

*

ERROR at line 1:

ORA-47401: Realm violation for grant role privilege on SCOTT_RO_ROLE

Granting SCOTT_RO_ROLEGranting SCOTT_RO_ROLE

Page 83: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

So who can/should

do the grant of SCOTT_RO_ROLE ?

Granting SCOTT_RO_ROLEGranting SCOTT_RO_ROLE

Page 84: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

So who can/should

do the grant of SCOTT_RO_ROLE ?

Answer: SCOTT

Granting SCOTT_RO_ROLEGranting SCOTT_RO_ROLE

Page 85: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Answer: SCOTT

Provided SCOTT can only grant SCOTT_RO_ROLE

and not other roles

like DBA.

Granting SCOTT_RO_ROLEGranting SCOTT_RO_ROLE

Page 86: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

One more grant as SYSDBA

Granting SCOTT_RO_ROLEGranting SCOTT_RO_ROLE

SQL> connect sys/mozart as sysdba

SQL> grant grant any role to scott;

Grant succeeded.

SQL>

Page 87: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect scott/tiger

SQL> grant scott_ro_role to scott_ro;

Grant succeeded.

SQL> revoke scott_ro_role from dbu;

Revoke succeeded.

SQL>

Granting SCOTT_RO_ROLEGranting SCOTT_RO_ROLE

Page 88: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect scott/tigerSQL> grant DBA to scott;grant DBA to scott*ERROR at line 1:ORA-00604: error occurred at recursive SQL level 1

ORA-47401: Realm violation for grant role privilege on UNLIMITED TABLESPACE.

Granting SCOTT_RO_ROLEGranting SCOTT_RO_ROLE

Page 89: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

WHY?

Granting SCOTT_RO_ROLEGranting SCOTT_RO_ROLE

Page 90: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

The DBA role

is protected by the

“Oracle Data Dictionary” Realm.

Granting SCOTT_RO_ROLEGranting SCOTT_RO_ROLE

Page 91: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Now to test it...

Again

Granting SCOTT_RO_ROLEGranting SCOTT_RO_ROLE

Page 92: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect scott_ro/tiger

SQL> select * from scott.emp;

14 rows selected.

SQL> delete from scott.emp;

delete from scott.emp

*

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing scott_ro againTesting scott_ro again

Page 93: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect scott_ro/tiger

SQL> select * from scott.emp;

14 rows selected.

SQL> delete from scott.emp;

delete from scott.emp

*

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing scott_ro againTesting scott_ro again

Page 94: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect scott_app_user/tiger

SQL> select * from scott.emp;

14 rows selected.

SQL> delete from scott.emp;

14 rows deleted.

SQL> rollback;

Testing scott_app_userTesting scott_app_user

Page 95: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect scott_app_user/tiger

SQL> select * from scott.emp;

14 rows selected.

SQL> delete from scott.emp;

14 rows deleted.

SQL> rollback;

Testing scott_app_userTesting scott_app_user

Page 96: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect system/manager

SQL> select * from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

SQL> delete from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing system againTesting system again

Page 97: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect system/manager

SQL> select * from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

SQL> delete from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing system againTesting system again

Page 98: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect sys/mozart as sysdba

SQL> select * from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

SQL> delete from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing SYSDBATesting SYSDBA

Page 99: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect sys/mozart as sysdba

SQL> select * from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

SQL> delete from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing SYSDBATesting SYSDBA

Page 100: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect dbu/manager

SQL> select * from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

SQL> delete from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing DV_ACCTMGRTesting DV_ACCTMGR

Page 101: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect dbu/manager

SQL> select * from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

SQL> delete from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing DV_ACCTMGRTesting DV_ACCTMGR

Page 102: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect dbv/manager

SQL> select * from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

SQL> delete from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing DV_ADMINTesting DV_ADMIN

Page 103: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SQL> connect dbv/manager

SQL> select * from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

SQL> delete from scott.emp;

ERROR at line 1:

ORA-01031: Insufficient Privileges

Testing DV_ADMINTesting DV_ADMIN

Page 104: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Let’s review the actions performed by each of the different users/roles

Separation of DutiesSeparation of Duties

Page 105: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

SYS as SYSDBA

• Grant role privileges to DV_ACCTMGR(one time)

• Grant “grant any role” to SCOTT(once per application)

Separation of DutiesSeparation of Duties

Page 106: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

DV_ADMIN (user = dbv)

• Realm authorizations (once per application)

• Command Rules(one time)

Separation of DutiesSeparation of Duties

Page 107: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

DV_ACCTMGR (user = dbu)

• Create user (ongoing)

• Grant connect (ongoing)

• Create role (once per app)

Separation of DutiesSeparation of Duties

Page 108: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Schema owner (SCOTT)

• Grant object privileges(once per application)

• Grant SCOTT_RO_ROLE (ongoing)

Separation of DutiesSeparation of Duties

Page 109: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

DBA (user = system)

• Nothing

Separation of DutiesSeparation of Duties

Page 110: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Overview

Installation

Limitations

Securing Data

Backups

A trigger problem

AgendaAgenda

Page 111: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Impact of Backups

• Export

• Data Pump

• RMAN

BackupsBackups

Page 112: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Export

• Lots of ORA-01031

• Will be unable to Import

• Not viable

BackupsBackups

Page 113: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Data Pump

• Not tested

BackupsBackups

Page 114: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

RMAN

• Requires SYSDBA access

• May need to hardcode SYS password or use wallet

• Works successfully

BackupsBackups

Page 115: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Overview

Installation

Limitations

Securing Data

Backups

A trigger problem

AgendaAgenda

Page 116: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Error creating trigger

• Minor changes to whitespace in trigger source caused compile success/failure

• Known Bug: 5630439

• ORA-47999: internal Database Vault error: create trigger

Trigger ProblemTrigger Problem

Page 117: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

Workaround available• Login as dv_owner account

• alter trigger dvsys.DV_BEFORE_DDL_TRG disable

• Login as SCOTT and create trigger

• Login as dv_owner account

• alter trigger dvsys.DV_BEFORE_DDL_TRG enable

Trigger ProblemTrigger Problem

Page 118: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

You probably don’t need Database Vault

It’s a trade off between more security with more bureaucracy

It seems to work okay but there are some bugs

Typical work arounds involve deactivating Database Vault

ConclusionConclusion

Page 119: A First look at Database Vault David Bergmeier.  Overview  Installation  Limitations  Securing Data  Backups  A trigger problem Agenda

The EndThe End

Thank you for your attendance

[email protected]

http://www.mga.com.au