SlideShare a Scribd company logo
1 of 13
Fine GrainedAuditing
Step1. Createuserzoe assign10monuser.
SQL> create user zoe identified by zoe
2 default tablespace users
3 temporary tablespace temp
4 quota 10m on users
5 account unlock;
User created.
SQL> grant connect,create table,resource tozoe;
Grant succeeded.
Step2. Make a table toys, and insertsome rows.
SQL> conn zoe/zoe;
Connected.
SQL> create table toy
2 (toynonumber(2),
3 name varchar(10),
4 cost number(5),
5 manf char(10) );
Table created.
SQL> desc toy;
Name Null? Type
----------------------------------------- -------- ----------------------------
TOYNO NUMBER(2)
NAME VARCHAR2(10)
COST NUMBER(5)
MANF CHAR(10)
SQL> insertintotoy values
2 (01, 'bugati',2500,'italy');
1 rowcreated.
SQL> insertintotoy values
2 (02,'cameross', 2000, 'chevy');
1 rowcreated.
SQL> commit; ---- insertsome more rows.
Commitcomplete.
SQL> select * from toy;
TOYNONAME COST MANF
----------------------------------------
3 charger 1500 dodge
4 plymounth 1200 plymounth
5 landcruser 2000 toyota
6 audi ax 1400 audi
7 mustang 2200 ford
8 trino 1800 ford
9 challenger 1900 dodge
10 mursilago 2800 lamorghini
11 golorado 2300 lamorghini
12 civic 1200 honda
1 bugati 2500 italy
TOYNONAME COST MANF
----------------------------------------
2 camero ss 2000 chevy
12 rows selected.
Step3. AssignFGAprivilegeto zoe.
SQL> conn / as sysdba
Connected.
SQL> grant EXECUTE ONdbms_fgato zoe;
Grant succeeded.
Step4. Createusersasha, jiyaandassign5m each onuser.
SQL> showuser
USER is"SYS"
SQL> create usersashaidentifiedbysasha
2 defaulttablespace users
3 temporarytablespace temp
4 quota5m onusers
5 account unlock;
User created.
SQL> create userjiyaidentifiedbyjiya
2 defaulttablespace users
3 temporarytablespace temp
4 quota5m onusers
5 account unlock;
User created.
SQL> grant connect,resource to sasha;
Grant succeeded.
SQL> grant connect,resource to jiya;
Grant succeeded.
Step5. GrantTOY tableto sasha, jiya.
SQL> conn zoe/zoe;
Connected.
SQL> grant select, insert, update on toy to jiya;
Grant succeeded.
SQL> grant select , insert, update on toy to sasha;
Grant succeeded.
SQL> conn sasha/sasha
Connected.
SQL> select* from zoe.toy; ---sashacan accesstoy table fromzoe.
TOYNONAME COST MANF
---------- -------------------- ----------
3 charger 1500 dodge
4 plymounth 1200 plymounth
5 landcruser 2000 toyota
6 audi ax 1400 audi
7 mustang 2200 ford
8 trino 1800 ford
9 challenger 1900 dodge
10 mursilago 2800 lamorghini
11 golorado 2300 lamorghini
12 civic 1200 honda
1 bugati 2500 italy
2 cameross 2000 chevy
12 rows selected.
SQL> conn jiya/jiya
Connected.
SQL> select* from zoe.toy; --- jiyacan alsoaccesstoy table fromzoe
TOYNONAME COST MANF
---------- -------------------- ----------
3 charger 1500 dodge
4 plymounth 1200 plymounth
5 landcruser 2000 toyota
6 audi ax 1400 audi
7 mustang 2200 ford
8 trino 1800 ford
9 challenger 1900 dodge
10 mursilago 2800 lamorghini
11 golorado 2300 lamorghini
12 civic 1200 honda
1 bugati 2500 italy
2 cameross 2000 chevy
12 rows selected.
Step6. Enablefinegrainaduitontable TOY byuser zoe.
SQL> conn / as sysdba
Connected.
SQL> select* from dba_fga_audit_trail;
no rowsselected --- table dba_fga_audit_trail will containthe auditreportafterexecutingdbms.fga
--- NowZoe will executea procedureto assignthe conditionforauditing.
SQL> conn zoe/zoe
Connected.
SQL> execDBMS_FGA.ADD_POLICY( object_schema=>'ZOE', object_name =>'TOY', policy_name =>
'expensive_cars',audit_condition=>'cost>=1500', audit_column=> 'name',statement_types=>'select,
insert,update,delete',handler_schema=>null,handler_module=>null,enable =>true );
PL/SQL procedure successfullycompleted.
--- Zoe put the conditionto auditthe query which return the nameof car which cost>=1500. Every
select commandfor that condition, auditwill alsorecord insert, updateand delete commandissue
againstthe table TOY.
---Checkingtheaudittable.
SQL> conn / as sysdba
Connected.
SQL> select* from dba_fga_audit_trail;
no rowsselected
-- as we can see dba_fga_audit_trail table doesnotcontainanyauditrecord
-- Nowbelowsql querywill hitthe auditconditions,that will save audit recordinthe table
dba_fga_audit_trial, let’shavea look.
SQL> conn jiya/jiya
Connected.
SQL> select* from zoe.toy; --- 1st
Query issue by jiya
TOYNONAME COST MANF
---------- -------------------- ----------
3 charger 1500 dodge
4 plymounth 1200 plymounth
5 landcruser 2000 toyota
6 audi ax 1400 audi
7 mustang 2200 ford
8 trino 1800 ford
9 challenger 1900 dodge
10 mursilago 2800 lamorghini
11 golorado 2300 lamorghini
12 civic 1200 honda
1 bugati 2500 italy
2 cameross 2000 chevy
12 rows selected.
SQL> insertintozoe.toyvalues(13,'viper',1700,'dodge'); --- 2nd
query
1 rowcreated.
SQL> commit; --- insertisinthe audit condition.
SQL> select* from zoe.toywhere cost>1600; ---3rd
query
TOYNONAME COST MANF
---------- -------------------- ----------
5 landcruser 2000 toyota
7 mustang 2200 ford
8 trino 1800 ford
9 challenger 1900 dodge
10 mursilago 2800 lamorghini
11 golorado 2300 lamorghini
1 bugati 2500 italy
2 cameross 2000 chevy
13 viper 1700 dodge
9 rowsselected.
SQL> conn sasha/sasha --- 4th
query fromsasha
Connected.
SQL> select* from zoe.toywhere cost>1800;
TOYNONAME COST MANF
---------- -------------------- ----------
5 landcruser 2000 toyota
7 mustang 2200 ford
9 challenger 1900 dodge
10 mursilago 2800 lamorghini
11 golorado 2300 lamorghini
1 bugati 2500 italy
2 cameross 2000 chevy
7 rowsselected.
SQL> conn sasha/sasha
Connected.
SQL> selectname,manf fromzoe.toywhere cost>1700; ---5th
query
NAME MANF
---------- ----------
landcrusertoyota
mustang ford
trino ford
challengerdodge
mursilago lamorghini
golorado lamorghini
bugati italy
cameross chevy
8 rowsselected.
SQL> conn jiya/jiya
Connected.
SQL> selecttoyno,name,manf fromzoe.toywhere cost>2000; ---6th
query
TOYNONAME MANF
---------- --------------------
7 mustang ford
10 mursilago lamorghini
11 golorado lamorghini
1 bugati italy
Step7. Nowlet’scheckwhat do wegot in ouraudittable i.e. DBA_FGA_AUDIR_TRAIL
SQL> conn / as sysdba
Connected.
SQL> select timestamp, db_user, os_user, object_schema,object_name, policy_name,sql_textfrom
dba_fga_audit_trailorder by timestamp;
TIMESTAMP DB_USER
---------------------------------------
OS_USER
-----------------------------------------------------------------------------------
-------------------------------------------------------------------
OBJECT_SCHEMA
------------------------------
OBJECT_NAME
-----------------------------------------------------------------------------------
---------------------------------------------
POLICY_NAME
------------------------------
SQL_TEXT
-----------------------------------------------------------------------------------
-------------------------------------------------------------------
09-APR-15 JIYA
oracle
ZOE
TOY
EXPENSIVE_CARS
select * from zoe.toy -- 1st query audited
09-APR-15 JIYA
oracle
ZOE
TOY
EXPENSIVE_CARS
insert into zoe.toy values (13, 'viper',1700,'dodge') --2nd query audited
09-APR-15 JIYA
oracle
ZOE
TOY
EXPENSIVE_CARS
select * from zoe.toy where cost>1600 --3rd query audited
09-APR-15 SASHA
oracle
ZOE
TOY
EXPENSIVE_CARS
select * from zoe.toy where cost>1800 --4th query aduited
09-APR-15 SASHA
oracle
ZOE
TOY
EXPENSIVE_CARS
select name, manf from zoe.toy where cost> 1700 --5th query audited
09-APR-15 JIYA
oracle
ZOE
TOY
EXPENSIVE_CARS
select toyno, name, manf from zoe.toy where cost>2000 --6th query audited
8 rows selected.

More Related Content

Viewers also liked

Frogs and Toads of Minnesota
Frogs and Toads of MinnesotaFrogs and Toads of Minnesota
Frogs and Toads of Minnesotakvanbooven
 
Volunteer Awards Banquet 2016
Volunteer Awards Banquet 2016Volunteer Awards Banquet 2016
Volunteer Awards Banquet 2016kvanbooven
 
Volunteer Enrichment- Belwin Outing Fall 2015
Volunteer Enrichment- Belwin Outing Fall 2015Volunteer Enrichment- Belwin Outing Fall 2015
Volunteer Enrichment- Belwin Outing Fall 2015kvanbooven
 
mi super presentacion
mi super presentacionmi super presentacion
mi super presentacionJoosuHD
 
Social Media and Marketing Strategies
Social Media and Marketing Strategies Social Media and Marketing Strategies
Social Media and Marketing Strategies Natalia A. Wong
 
Should Start Ups Outsource Their DRTV Sales and Support Right Away
Should Start Ups Outsource Their DRTV Sales and Support Right AwayShould Start Ups Outsource Their DRTV Sales and Support Right Away
Should Start Ups Outsource Their DRTV Sales and Support Right AwayBinary Ideas Mobile Marketing
 
PersonalBankingBrochureNL
PersonalBankingBrochureNLPersonalBankingBrochureNL
PersonalBankingBrochureNLChristine Bohyn
 
Draytek art designer work content
Draytek art designer work contentDraytek art designer work content
Draytek art designer work contentmark chang
 
Escala de gravedad de sintomas de estres post traumático
Escala de gravedad de sintomas de estres post traumáticoEscala de gravedad de sintomas de estres post traumático
Escala de gravedad de sintomas de estres post traumáticoRosario María Lívano Herrera
 
Jack ma (alibaba) three sisters and a brother group project
Jack ma (alibaba)   three sisters and a brother group projectJack ma (alibaba)   three sisters and a brother group project
Jack ma (alibaba) three sisters and a brother group projectIndiaW
 
Bizkaia 2
Bizkaia 2 Bizkaia 2
Bizkaia 2 JoosuHD
 
Brochure serenity drive 2017v1
Brochure serenity drive 2017v1Brochure serenity drive 2017v1
Brochure serenity drive 2017v1Serenity Drive
 

Viewers also liked (15)

Frogs and Toads of Minnesota
Frogs and Toads of MinnesotaFrogs and Toads of Minnesota
Frogs and Toads of Minnesota
 
NFD Australia (3)
NFD Australia (3)NFD Australia (3)
NFD Australia (3)
 
Volunteer Awards Banquet 2016
Volunteer Awards Banquet 2016Volunteer Awards Banquet 2016
Volunteer Awards Banquet 2016
 
Volunteer Enrichment- Belwin Outing Fall 2015
Volunteer Enrichment- Belwin Outing Fall 2015Volunteer Enrichment- Belwin Outing Fall 2015
Volunteer Enrichment- Belwin Outing Fall 2015
 
mi super presentacion
mi super presentacionmi super presentacion
mi super presentacion
 
Track ID Quiz
Track ID QuizTrack ID Quiz
Track ID Quiz
 
Social Media and Marketing Strategies
Social Media and Marketing Strategies Social Media and Marketing Strategies
Social Media and Marketing Strategies
 
Should Start Ups Outsource Their DRTV Sales and Support Right Away
Should Start Ups Outsource Their DRTV Sales and Support Right AwayShould Start Ups Outsource Their DRTV Sales and Support Right Away
Should Start Ups Outsource Their DRTV Sales and Support Right Away
 
PersonalBankingBrochureNL
PersonalBankingBrochureNLPersonalBankingBrochureNL
PersonalBankingBrochureNL
 
Draytek art designer work content
Draytek art designer work contentDraytek art designer work content
Draytek art designer work content
 
Escala de gravedad de sintomas de estres post traumático
Escala de gravedad de sintomas de estres post traumáticoEscala de gravedad de sintomas de estres post traumático
Escala de gravedad de sintomas de estres post traumático
 
Jack ma (alibaba) three sisters and a brother group project
Jack ma (alibaba)   three sisters and a brother group projectJack ma (alibaba)   three sisters and a brother group project
Jack ma (alibaba) three sisters and a brother group project
 
When Should You Outsource To BPO Companies
When Should You Outsource To BPO CompaniesWhen Should You Outsource To BPO Companies
When Should You Outsource To BPO Companies
 
Bizkaia 2
Bizkaia 2 Bizkaia 2
Bizkaia 2
 
Brochure serenity drive 2017v1
Brochure serenity drive 2017v1Brochure serenity drive 2017v1
Brochure serenity drive 2017v1
 

Similar to simple 7 Steps to learn Fine grained auditing.

Sangam 2019 - The Latest Features
Sangam 2019 - The Latest FeaturesSangam 2019 - The Latest Features
Sangam 2019 - The Latest FeaturesConnor McDonald
 
APAC Groundbreakers 2019 - Perth/Melbourne
APAC Groundbreakers 2019 - Perth/Melbourne APAC Groundbreakers 2019 - Perth/Melbourne
APAC Groundbreakers 2019 - Perth/Melbourne Connor McDonald
 
001 network toi_basics_v1
001 network toi_basics_v1001 network toi_basics_v1
001 network toi_basics_v1Hisao Tsujimura
 
OpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersOpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersConnor McDonald
 
Redo logfile addition in oracle rac 12c
Redo logfile addition in oracle rac 12cRedo logfile addition in oracle rac 12c
Redo logfile addition in oracle rac 12cDebasish Nayak
 
Connor McDonald 11g for developers
Connor McDonald 11g for developersConnor McDonald 11g for developers
Connor McDonald 11g for developersInSync Conference
 
OOW19 - Flashback, not just for DBAs
OOW19 - Flashback, not just for DBAsOOW19 - Flashback, not just for DBAs
OOW19 - Flashback, not just for DBAsConnor McDonald
 
The select statement
The select statementThe select statement
The select statementpunu_82
 
COBOL CICS EXAMPLE-SC52P52
COBOL CICS EXAMPLE-SC52P52COBOL CICS EXAMPLE-SC52P52
COBOL CICS EXAMPLE-SC52P52Jon Fortman
 
12c for Developers - Feb 2014
12c for Developers - Feb 201412c for Developers - Feb 2014
12c for Developers - Feb 2014Connor McDonald
 
OOW19 - Ten Amazing SQL features
OOW19 - Ten Amazing SQL featuresOOW19 - Ten Amazing SQL features
OOW19 - Ten Amazing SQL featuresConnor McDonald
 
Latin America Tour 2019 - pattern matching
Latin America Tour 2019 - pattern matchingLatin America Tour 2019 - pattern matching
Latin America Tour 2019 - pattern matchingConnor McDonald
 
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀EXEM
 
SQL and PLSQL features for APEX Developers
SQL and PLSQL features for APEX DevelopersSQL and PLSQL features for APEX Developers
SQL and PLSQL features for APEX DevelopersConnor McDonald
 
Pattern Matching with SQL - APEX World Rotterdam 2019
Pattern Matching with SQL - APEX World Rotterdam 2019Pattern Matching with SQL - APEX World Rotterdam 2019
Pattern Matching with SQL - APEX World Rotterdam 2019Connor McDonald
 
حل اسئلة الكتاب السعودى فى شرح قواعد البيانات اوراكل
حل اسئلة الكتاب السعودى فى شرح قواعد البيانات اوراكلحل اسئلة الكتاب السعودى فى شرح قواعد البيانات اوراكل
حل اسئلة الكتاب السعودى فى شرح قواعد البيانات اوراكلMohamed Moustafa
 

Similar to simple 7 Steps to learn Fine grained auditing. (20)

Sangam 2019 - The Latest Features
Sangam 2019 - The Latest FeaturesSangam 2019 - The Latest Features
Sangam 2019 - The Latest Features
 
APAC Groundbreakers 2019 - Perth/Melbourne
APAC Groundbreakers 2019 - Perth/Melbourne APAC Groundbreakers 2019 - Perth/Melbourne
APAC Groundbreakers 2019 - Perth/Melbourne
 
Flashback ITOUG
Flashback ITOUGFlashback ITOUG
Flashback ITOUG
 
001 network toi_basics_v1
001 network toi_basics_v1001 network toi_basics_v1
001 network toi_basics_v1
 
OpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersOpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developers
 
Midtown madness codes
Midtown madness codesMidtown madness codes
Midtown madness codes
 
Redo logfile addition in oracle rac 12c
Redo logfile addition in oracle rac 12cRedo logfile addition in oracle rac 12c
Redo logfile addition in oracle rac 12c
 
Connor McDonald 11g for developers
Connor McDonald 11g for developersConnor McDonald 11g for developers
Connor McDonald 11g for developers
 
OOW19 - Flashback, not just for DBAs
OOW19 - Flashback, not just for DBAsOOW19 - Flashback, not just for DBAs
OOW19 - Flashback, not just for DBAs
 
The select statement
The select statementThe select statement
The select statement
 
Analytic SQL Sep 2013
Analytic SQL Sep 2013Analytic SQL Sep 2013
Analytic SQL Sep 2013
 
COBOL CICS EXAMPLE-SC52P52
COBOL CICS EXAMPLE-SC52P52COBOL CICS EXAMPLE-SC52P52
COBOL CICS EXAMPLE-SC52P52
 
12c for Developers - Feb 2014
12c for Developers - Feb 201412c for Developers - Feb 2014
12c for Developers - Feb 2014
 
Sql2
Sql2Sql2
Sql2
 
OOW19 - Ten Amazing SQL features
OOW19 - Ten Amazing SQL featuresOOW19 - Ten Amazing SQL features
OOW19 - Ten Amazing SQL features
 
Latin America Tour 2019 - pattern matching
Latin America Tour 2019 - pattern matchingLatin America Tour 2019 - pattern matching
Latin America Tour 2019 - pattern matching
 
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
 
SQL and PLSQL features for APEX Developers
SQL and PLSQL features for APEX DevelopersSQL and PLSQL features for APEX Developers
SQL and PLSQL features for APEX Developers
 
Pattern Matching with SQL - APEX World Rotterdam 2019
Pattern Matching with SQL - APEX World Rotterdam 2019Pattern Matching with SQL - APEX World Rotterdam 2019
Pattern Matching with SQL - APEX World Rotterdam 2019
 
حل اسئلة الكتاب السعودى فى شرح قواعد البيانات اوراكل
حل اسئلة الكتاب السعودى فى شرح قواعد البيانات اوراكلحل اسئلة الكتاب السعودى فى شرح قواعد البيانات اوراكل
حل اسئلة الكتاب السعودى فى شرح قواعد البيانات اوراكل
 

Recently uploaded

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 

Recently uploaded (20)

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 

simple 7 Steps to learn Fine grained auditing.

  • 1. Fine GrainedAuditing Step1. Createuserzoe assign10monuser. SQL> create user zoe identified by zoe 2 default tablespace users 3 temporary tablespace temp 4 quota 10m on users 5 account unlock; User created. SQL> grant connect,create table,resource tozoe; Grant succeeded. Step2. Make a table toys, and insertsome rows. SQL> conn zoe/zoe; Connected. SQL> create table toy 2 (toynonumber(2), 3 name varchar(10), 4 cost number(5), 5 manf char(10) ); Table created. SQL> desc toy; Name Null? Type ----------------------------------------- -------- ---------------------------- TOYNO NUMBER(2) NAME VARCHAR2(10) COST NUMBER(5) MANF CHAR(10) SQL> insertintotoy values 2 (01, 'bugati',2500,'italy'); 1 rowcreated. SQL> insertintotoy values 2 (02,'cameross', 2000, 'chevy'); 1 rowcreated. SQL> commit; ---- insertsome more rows. Commitcomplete.
  • 2. SQL> select * from toy; TOYNONAME COST MANF ---------------------------------------- 3 charger 1500 dodge 4 plymounth 1200 plymounth 5 landcruser 2000 toyota 6 audi ax 1400 audi 7 mustang 2200 ford 8 trino 1800 ford 9 challenger 1900 dodge 10 mursilago 2800 lamorghini 11 golorado 2300 lamorghini 12 civic 1200 honda 1 bugati 2500 italy TOYNONAME COST MANF ---------------------------------------- 2 camero ss 2000 chevy 12 rows selected. Step3. AssignFGAprivilegeto zoe. SQL> conn / as sysdba Connected. SQL> grant EXECUTE ONdbms_fgato zoe; Grant succeeded. Step4. Createusersasha, jiyaandassign5m each onuser. SQL> showuser USER is"SYS" SQL> create usersashaidentifiedbysasha 2 defaulttablespace users 3 temporarytablespace temp 4 quota5m onusers 5 account unlock; User created. SQL> create userjiyaidentifiedbyjiya 2 defaulttablespace users 3 temporarytablespace temp 4 quota5m onusers 5 account unlock;
  • 3. User created. SQL> grant connect,resource to sasha; Grant succeeded. SQL> grant connect,resource to jiya; Grant succeeded. Step5. GrantTOY tableto sasha, jiya. SQL> conn zoe/zoe; Connected. SQL> grant select, insert, update on toy to jiya; Grant succeeded. SQL> grant select , insert, update on toy to sasha; Grant succeeded. SQL> conn sasha/sasha Connected. SQL> select* from zoe.toy; ---sashacan accesstoy table fromzoe. TOYNONAME COST MANF ---------- -------------------- ---------- 3 charger 1500 dodge 4 plymounth 1200 plymounth 5 landcruser 2000 toyota 6 audi ax 1400 audi 7 mustang 2200 ford
  • 4. 8 trino 1800 ford 9 challenger 1900 dodge 10 mursilago 2800 lamorghini 11 golorado 2300 lamorghini 12 civic 1200 honda 1 bugati 2500 italy 2 cameross 2000 chevy 12 rows selected. SQL> conn jiya/jiya Connected. SQL> select* from zoe.toy; --- jiyacan alsoaccesstoy table fromzoe TOYNONAME COST MANF ---------- -------------------- ---------- 3 charger 1500 dodge 4 plymounth 1200 plymounth 5 landcruser 2000 toyota 6 audi ax 1400 audi 7 mustang 2200 ford
  • 5. 8 trino 1800 ford 9 challenger 1900 dodge 10 mursilago 2800 lamorghini 11 golorado 2300 lamorghini 12 civic 1200 honda 1 bugati 2500 italy 2 cameross 2000 chevy 12 rows selected. Step6. Enablefinegrainaduitontable TOY byuser zoe. SQL> conn / as sysdba Connected. SQL> select* from dba_fga_audit_trail; no rowsselected --- table dba_fga_audit_trail will containthe auditreportafterexecutingdbms.fga --- NowZoe will executea procedureto assignthe conditionforauditing. SQL> conn zoe/zoe Connected. SQL> execDBMS_FGA.ADD_POLICY( object_schema=>'ZOE', object_name =>'TOY', policy_name => 'expensive_cars',audit_condition=>'cost>=1500', audit_column=> 'name',statement_types=>'select, insert,update,delete',handler_schema=>null,handler_module=>null,enable =>true ); PL/SQL procedure successfullycompleted.
  • 6. --- Zoe put the conditionto auditthe query which return the nameof car which cost>=1500. Every select commandfor that condition, auditwill alsorecord insert, updateand delete commandissue againstthe table TOY. ---Checkingtheaudittable. SQL> conn / as sysdba Connected. SQL> select* from dba_fga_audit_trail; no rowsselected -- as we can see dba_fga_audit_trail table doesnotcontainanyauditrecord -- Nowbelowsql querywill hitthe auditconditions,that will save audit recordinthe table dba_fga_audit_trial, let’shavea look. SQL> conn jiya/jiya Connected. SQL> select* from zoe.toy; --- 1st Query issue by jiya TOYNONAME COST MANF ---------- -------------------- ---------- 3 charger 1500 dodge 4 plymounth 1200 plymounth 5 landcruser 2000 toyota 6 audi ax 1400 audi 7 mustang 2200 ford
  • 7. 8 trino 1800 ford 9 challenger 1900 dodge 10 mursilago 2800 lamorghini 11 golorado 2300 lamorghini 12 civic 1200 honda 1 bugati 2500 italy 2 cameross 2000 chevy 12 rows selected. SQL> insertintozoe.toyvalues(13,'viper',1700,'dodge'); --- 2nd query 1 rowcreated. SQL> commit; --- insertisinthe audit condition. SQL> select* from zoe.toywhere cost>1600; ---3rd query TOYNONAME COST MANF ---------- -------------------- ---------- 5 landcruser 2000 toyota 7 mustang 2200 ford 8 trino 1800 ford 9 challenger 1900 dodge
  • 8. 10 mursilago 2800 lamorghini 11 golorado 2300 lamorghini 1 bugati 2500 italy 2 cameross 2000 chevy 13 viper 1700 dodge 9 rowsselected. SQL> conn sasha/sasha --- 4th query fromsasha Connected. SQL> select* from zoe.toywhere cost>1800; TOYNONAME COST MANF ---------- -------------------- ---------- 5 landcruser 2000 toyota 7 mustang 2200 ford 9 challenger 1900 dodge 10 mursilago 2800 lamorghini 11 golorado 2300 lamorghini 1 bugati 2500 italy 2 cameross 2000 chevy 7 rowsselected.
  • 9. SQL> conn sasha/sasha Connected. SQL> selectname,manf fromzoe.toywhere cost>1700; ---5th query NAME MANF ---------- ---------- landcrusertoyota mustang ford trino ford challengerdodge mursilago lamorghini golorado lamorghini bugati italy cameross chevy 8 rowsselected. SQL> conn jiya/jiya Connected. SQL> selecttoyno,name,manf fromzoe.toywhere cost>2000; ---6th query TOYNONAME MANF ---------- --------------------
  • 10. 7 mustang ford 10 mursilago lamorghini 11 golorado lamorghini 1 bugati italy Step7. Nowlet’scheckwhat do wegot in ouraudittable i.e. DBA_FGA_AUDIR_TRAIL SQL> conn / as sysdba Connected. SQL> select timestamp, db_user, os_user, object_schema,object_name, policy_name,sql_textfrom dba_fga_audit_trailorder by timestamp; TIMESTAMP DB_USER --------------------------------------- OS_USER ----------------------------------------------------------------------------------- ------------------------------------------------------------------- OBJECT_SCHEMA ------------------------------ OBJECT_NAME ----------------------------------------------------------------------------------- --------------------------------------------- POLICY_NAME ------------------------------
  • 11. SQL_TEXT ----------------------------------------------------------------------------------- ------------------------------------------------------------------- 09-APR-15 JIYA oracle ZOE TOY EXPENSIVE_CARS select * from zoe.toy -- 1st query audited 09-APR-15 JIYA oracle ZOE TOY EXPENSIVE_CARS insert into zoe.toy values (13, 'viper',1700,'dodge') --2nd query audited 09-APR-15 JIYA oracle
  • 12. ZOE TOY EXPENSIVE_CARS select * from zoe.toy where cost>1600 --3rd query audited 09-APR-15 SASHA oracle ZOE TOY EXPENSIVE_CARS select * from zoe.toy where cost>1800 --4th query aduited 09-APR-15 SASHA oracle ZOE TOY EXPENSIVE_CARS select name, manf from zoe.toy where cost> 1700 --5th query audited
  • 13. 09-APR-15 JIYA oracle ZOE TOY EXPENSIVE_CARS select toyno, name, manf from zoe.toy where cost>2000 --6th query audited 8 rows selected.