SlideShare a Scribd company logo
DB2 LUW Security
Trading up with the New,
Improved DB2 Auditing Features
Presented by: Rebecca Bond
a.k.a. DB2Locksmith
DB2Locksmith@securedb2.com
Phone: 434-DB2-0070
Breach attempts are up, but DBA participation is
NOT trending up as well. Databases are complex
and the skills to effectively manage them take
years to learn. Database security adds complexity
to the equation, but ignoring database security –
the current approach of many organizations --
doesn't seem to be working out too well.
The database does not have to be at risk, even if
other layers of defense are pierced. But, this
protection comes only when the appropriate
database security steps are well understood and
implemented….by the DBAs.
Did you know you are a security guru?
Old cars – New cars
Old Audit – New Audit
Being Proactive about Being Reactive
DB2 Auditing...approaches, tips and concerns
Think it’s time for a trade-up for your Audit Security?
Do I have a deal for you.
DB2 9.5 introduced some nifty auditing capabilities
.
Let’s discuss Auditing, and these new features and how
they can make auditing setup more flexible so that they
will closely track to your specific needs.
CAUTION
Database Auditing is ONLY one Layer –
It has to be supplemented!
•Audit activity is now highly granular and can be limited
to activity for selected users or tables
•The SYSADM can use the db2audit functionality to
archive both instance and database logs and to extract
from archived logs from either.
•Stored procedures are now available to make the
SECADM's work easier and this work can be delegated
•Prune is Gone !
•The active audit log is archived before data is extracted
which benefits performance.
•The location for Active and Archived audit data can be
changed … no need to use the old default path
•DPF dbs can use local file systems for the audit logs
•SECADM role is greatly enhanced, but work can be
delegated
What Are the Audit-able categories?
•AUDIT – records info regarding changes to audit settings or when the audit
log is accessed
•CHECKING – authorization "checking", attempts to access or change
DB2 objects or functions
•OBJMAINT – creation/drops of data objects
•SECMAINT – Grants/revokes, privileges, DBADM, modifications to
SYSADM_GROUP, SYSCTRL_GROUP, SYSMAINT_GROUP
•SYSADMIN – SYSADM,SYSMAINT,SYSCTRL operations
•VALIDATE – for each connection attempt, generates audit records when
validating users and their associated groups or when retrieving system
security information
•CONTEXT – "context" of the operation. Aids in interpretation of the info in
the audit log file. Likely will capture a HUGE amount of information.
EXECUTE – the new and improved "CONTEXT"
Works for both static and dynamic SQL
Optionally include Data (host variables and/or parameters)
Doesn't capture statement preparation
Doesn't include LOBS, LONG, XML & structured types
The Execute audit record is only produced when
execution completes, so failures are not captured via
EXECUTE.
It’s Splitsville for Auditing
The split between
Instance/Database layers makes the
auditing process much more
granular AND robust and aids with
the concept of Separation of Duties.
2…2…2 Audits in 1 !
• Where else can you get 2..2..2 DB2 Audits in 1 ?
• Instance AND Database Levels with greatly increased
granularity
• No need to waste time chewing on auditing features
you don't need.
• SYSADM uses DB2AUDIT command at the Instance
Level
• SECADM creates audit policies at the database level
• An Active audit log is archived BEFORE data is
extracted from it which helps performance.
The SYSADM vs The SECADM
The SYSADM user can use the db2audit
command to archive instance OR database
level audit data.
SECADM uses the AUDIT_ARCHIVE stored
procedure to archive database level audit
data.
Instance Level Auditing
• This is most like the old "pre 9.5" days
• SYSADM uses DB2AUDIT to configure at instance
level
• Db2audit is Explicitly started and stopped
• Uses "Describe" to determine current
configuration
• Records can be "Flushed"
• Archive (and can also archive logs for an
associated database)
• Extract data from an archived audit log
The SYSADM’s commands:
db2audit configure – what do you want to audit?
db2audit describe – what ARE you auditing?
db2audit archive -- moves the active log to an archive
db2audit flush – flush the audit buffer explicitly
db2audit extract -- from archived logs
db2audit start/stop
Database Level Auditing
Database level auditing is done via policies
that are created by the SECADM.
There is no "start" command.
Auditing begins as soon as the
policy is CREATED AND ASSIGNED.
Database Level – Audit Policies
SECADM Creates Audit Policies
Database Audit Policy Categories. What do they do?
•ALL - Sets all categories to the same status. (However, the
EXECUTE category is WITHOUT DATA.)
•AUDIT - Generates records when audit settings are
changed or when the audit log is accessed.
•CHECKING - Generates records during authorization
checking of attempts to access or manipulate database
objects or functions.
•CONTEXT - Generates records to show the operation
context when a database operation is performed. (A lot of
information, choose wisely)
•EXECUTE - Generates records to show the execution of
SQL (WITHOUT DATA /WITH DATA)
•OBJMAINT - Generates records when data objects are
created or dropped.
•SECMAINT - Generates records when object
privileges, database privileges, or DBADM authority is
granted or revoked.
•SYSADMIN - Generates records when operations
requiring SYSADM, SYSMAINT, or SYSCTRL authority
are performed.
•VALIDATE - Generates records when users are
authenticated or when system security information
related to a user is retrieved.
FYI: If ALL is not specified, the STATUS of any category
that is not explicitly specified is set to NONE.
Policies are assigned to objects by the
SECADM using the AUDIT statement.
Once assigned, the audit policy is active
(but may need to wait on the next UOW if
an old policy was in place).
DB Audit Policies are Assigned by the
SECADM
DATABASE — All auditable events that happen on the DB
are audited according to the audit policy.
TABLE — Can be a table, MQT nickname. CANNOT be a
view (views are audited according to base table policy),
catalog table, declared temp table or a typed table (Only
execute category audit events, with or without data, will be
generated when the table is accessed, even if the policy
indicates that other categories should be audited
Which Policy for Which Purpose?
Which Policy for Which Purpose?
TRUSTED CONTEXT -- Specifies that an audit policy is to
be associated with or removed from contextname (which
must exist)
USER -- Specifies that an audit policy is to be associated
with or removed from the user with authorization ID
<authorization-name>.
GROUP -- Specifies that an audit policy is to be associated
with or removed from the group with authorization ID
<authorization-name>. (Note: If user membership in a
group cannot be determined, the policy will not apply to that
user.)
ROLE -- Specifies that an audit policy is to be associated
with or removed from the role with authorization ID
<authorization-name> (must pre-exist).
Note: SYSADM, SYSMAINT, SYSCTRL, SYSMON,
SQLADM, WLMADM, DBADM or SECADM — All
auditable events that are initiated by a holder of this
authority are captured, even if that authority is not
required for the specific event
Which Policy for Which Purpose?
Putting Auditing on a Diet
Execute, a new database (ONLY) level category, allows audit
of JUST the SQL statement, versus the entire CONTEXT.
Context generates a LOT of audit information.
Since it is database specific
and not instance specific,
it uses audit policies, not the db2audit syntax.
Use the WITH DATA option to capture data values for any
host variables and parameter markers. EXCEPT, Be Aware,
that not all input values are logged.
LOB, LONG, XML, and structured type parameters appear as
a null value.
Some Audit Syntax:
$> db2 "create audit policy audexe categories execute with data status both error
type audit"
Status both means that successful and failing attempts will be audited.
Error type audit means that all errors (incl. audit errors) will be returned to the
application. If error type was normal, errors generated by the audit facility are
ignored and only the SQLCODEs for errors associated with the operation being
performed are returned to the application.)
$> db2 audit table locksmith.sensitive using policy audexe
Now the audit policy is assigned to the table named sensitive in the schema
locksmith. This audit policy is now active.
I think I'd like to know what the SYSADMs are up to, so I'll create an audit policy for
the database:
$> db2 "CREATE AUDIT POLICY ADMPOLICY CATEGORIES SYSADMIN STATUS BOTH,
SECMAINT STATUS BOTH ERROR TYPE AUDIT"
$> db2 "AUDIT DATABASE USING POLICY ADMPOLICY“
At the database level, the SECADM can delegate
running the audit stored procedures and table
functions to another user by appropriately granting
execute authority on the SYSPROC audit procedures.
These are: AUDIT_ARCHIVE stored procedure and
table function, AUDIT_LIST_LOGS table function and
AUDIT_DELIM_EXTRACT stored procedure.
One example (using a Role to do this)..as the database SECADM:
db2 "create role auditwrk"
db2 "grant execute on procedure sysproc.AUDIT_ARCHIVE to
role auditwrk"
db2 "grant execute on function sysproc.AUDIT_ARCHIVE to role
auditwrk"
db2 "grant execute on function sysproc.AUDIT_LIST_LOGS to
role auditwrk"
db2 "grant execute on procedure
sysproc.AUDIT_DELIM_EXTRACT to role auditwrk“
db2 "grant role auditwrk to locksmith"
I hold SECADM. I want to get some info.
First, I'll archive the current log.
Then I'll extract the data to delimited files
so I can load it in to tables and query it.
$> db2 "call sysproc.audit_archive ('',-2)"
$ >db2 "call sysproc.audit_delim_extract
(null, '/SecDB/auddel', NULL, '%20100210%', null)"
Auditing is a Big GUN for Reactive
Monitoring
But a Big Machine Gun that is Never Fired is Worthless
If you aren't extracting Audited Data and if NO ONE is
Reviewing it Regularly, then your Big Machine Gun is
totally RUSTY and WILL NOT FIRE when Needed.
BE PROACTIVE. Set up Audit, USE AUDIT, ReView Audit !
Keep your Big Machine Gun READY !
• The Location for the Active Audit Log is now
configurable
• There are separate logs for instance & DB audit activities
• Audit activity is now highly granular and can be limited
to activity for selected users or tables
• The SYSADM can use the db2audit functionality to
archive both instance and database logs and to extract
from archived logs from either.
• Stored procedures are now available to make the
SECADM's work easier and this work can be delegated
• Prune is Gone !
Port able
Making the Audit Wheels Turn
If multiple instances exist on a server, then
EACH INSTANCE should have separate locations
for ARCHIVEPATH, AUDITARCHIVES.
The goal is to get these audit logs on to speedy disk
locations,
especially for the ACTIVE ones.
Where are you? Where do you want to be?
EXAMPLE SYNTAX for moving ACTIVE audit log locations
## for Single Partition DB
$> db2audit configure datapath </myspeedydisklocation>
## For DPF databases,
I can choose an NFS Shared, or do something like....
$> db2audit configure datapath <'/Lockit/SpeedyAud $N'>
Make sure to keep the space before the $N
(For moving audit ARCHIVE logs for DPF database, I can NOT
use the data partition expression ($N), my only option is a shared disk).
## Note: '/SecDB/auddel' has to exist.
As you can imagine, migrating from an earlier product level
to 9.5 or 9.7 will require some special considerations.
Auditing is one of those special considerations.
If you were using auditing prior to the migration then you will
want to consider how the changes will impact your setup.
Review the documentation for your specific migration
approach.
Have a plan to proceed that includes backing up current
audit settings.
When you migrate an instance from an earlier release to DB2 9.5
The audit configuration file is converted to DB2 Version 9.5
format.
When you migrate a database from an earlier release to DB2
9.5 the instance-level configuration settings for auditing are used
to create an audit policy in the database. If the audit facility is
enabled at the instance level, the audit policy is associated with
the migrated database to enable auditing. Otherwise, the audit
policy is not associated.
After the migration, audit settings should be re-visited, both to
determine if it meets requirements and to take advantage of new,
robust options.
Audit_Buf_SZ
A consideration: audit_buf_sz: a DBM configuration
parameter.
If set to zero auditing records are written synchronously to
disk which means that the event that caused the audit
record has to wait on the write. Possible to lose one audit
record if this is zero. Downside is potential performance
impact.
Larger audit_buf_sz can mitigate performance impacts,
but places a larger number of audit records at risk of not
making it to disk. The "flush" operation can also be
performed to force the writes at any time.
A Personal Journey
Long ago in my youth, I read and heard that setting
audit_buf_sz to zero was reported to cause some
serious performance degradation on audited DB2
systems. I believed the claim. It certainly seemed
plausible.
But, being a security junkie, my job was SECURITY not
PERFORMANCE....boy was that a bad assessment on my
part. If security has to battle performance in an
enterprise, security is going to be at a distinct
disadvantage, right? (Note to self: Buy Boxing Gloves
before the next battle)
But then, I actually had a performance tuning exercise
and I was REQUIRED to set the audit_buf_sz to ZERO
so that, at most, only one audit record was ever at risk
of loss. I was auditing for everything except CONTEXT.
Even without auditing CONTEXT events, I was
concerned (actually terrified) that this would cause a
HUGE problem.
Ok, at first, it appeared my fears may have been valid.
The entire system looked over tasked, overworked and
just plain old unhappy (a technical term). But then, some
tuning changes were made, some code re-written, some
OS parms tuned and before I knew it, I had forgotten
all about the audit_buf_sz being zero....oh....and our
performance tuning exercise was so successful that
management was "shocked" at what we had
accomplished.
The material in this presentation is an overview.
The time to deep dive into DB2's Robust
Auditing Capability would have exceeded the
length of this session. Please be especially
aware when you upgrade from 8.2 or 9.1 to 9.5
or 9.7. Things have changed and you will need to
adapt. But the upgrade benefits are GREAT.
I strongly encourage you to learn much about
auditing.
Some resources:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp
DB2 9.7 Security Guide: http://www-
01.ibm.com/support/docview.wss?rs=71&uid=swg27015148
DB2 Security Redbook (LUW):
http://www.redbooks.ibm.com/abstracts/sg247555.html?Open
DB2 Security Redbook (z/OS):
http://www.redbooks.ibm.com/abstracts/sg247720.html?Open
Rebecca Bond
A.K.A. DB2Locksmith
DB2Locksmith@securedb2.com
PHONE: 434-DB2-0070
Trading up with the New, Improved
DB2 Auditing Features

More Related Content

What's hot

Db2
Db2Db2
Db2
yboren
 
DB2 on Mainframe
DB2 on MainframeDB2 on Mainframe
DB2 on Mainframe
Skillwise Group
 
Oracle 12c PDB insights
Oracle 12c PDB insightsOracle 12c PDB insights
Oracle 12c PDB insights
Kirill Loifman
 
DB2 and storage management
DB2 and storage managementDB2 and storage management
DB2 and storage management
Craig Mullins
 
Oracle architecture ppt
Oracle architecture pptOracle architecture ppt
Oracle architecture ppt
Deepak Shetty
 
[오픈소스컨설팅]Day #1 MySQL 엔진소개, 튜닝, 백업 및 복구, 업그레이드방법
[오픈소스컨설팅]Day #1 MySQL 엔진소개, 튜닝, 백업 및 복구, 업그레이드방법[오픈소스컨설팅]Day #1 MySQL 엔진소개, 튜닝, 백업 및 복구, 업그레이드방법
[오픈소스컨설팅]Day #1 MySQL 엔진소개, 튜닝, 백업 및 복구, 업그레이드방법
Ji-Woong Choi
 
CICS basics overview session-1
CICS basics overview session-1CICS basics overview session-1
CICS basics overview session-1
Srinimf-Slides
 
Db2 recovery IDUG EMEA 2013
Db2 recovery IDUG EMEA 2013Db2 recovery IDUG EMEA 2013
Db2 recovery IDUG EMEA 2013
Dale McInnis
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools short
Tanel Poder
 
Resource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in MainframesResource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in Mainframes
Aayush Singh
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19c
Maria Colgan
 
IBM DB2
IBM DB2IBM DB2
Presentation db2 connections to db2 for z os
Presentation   db2 connections to db2 for z osPresentation   db2 connections to db2 for z os
Presentation db2 connections to db2 for z os
xKinAnx
 
Reading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the GoalReading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the Goal
Franck Pachot
 
DB2 Basic Commands - UDB
DB2 Basic Commands - UDBDB2 Basic Commands - UDB
DB2 Basic Commands - UDB
Srinimf-Slides
 
SQL
SQLSQL
Oracle DBA
Oracle DBAOracle DBA
Oracle DBA
shivankuniversity
 
Sql and Sql commands
Sql and Sql commandsSql and Sql commands
Sql and Sql commands
Knowledge Center Computer
 

What's hot (20)

Db2
Db2Db2
Db2
 
MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
 
DB2UDB_the_Basics
DB2UDB_the_BasicsDB2UDB_the_Basics
DB2UDB_the_Basics
 
DB2 on Mainframe
DB2 on MainframeDB2 on Mainframe
DB2 on Mainframe
 
Oracle 12c PDB insights
Oracle 12c PDB insightsOracle 12c PDB insights
Oracle 12c PDB insights
 
DB2 and storage management
DB2 and storage managementDB2 and storage management
DB2 and storage management
 
Oracle architecture ppt
Oracle architecture pptOracle architecture ppt
Oracle architecture ppt
 
[오픈소스컨설팅]Day #1 MySQL 엔진소개, 튜닝, 백업 및 복구, 업그레이드방법
[오픈소스컨설팅]Day #1 MySQL 엔진소개, 튜닝, 백업 및 복구, 업그레이드방법[오픈소스컨설팅]Day #1 MySQL 엔진소개, 튜닝, 백업 및 복구, 업그레이드방법
[오픈소스컨설팅]Day #1 MySQL 엔진소개, 튜닝, 백업 및 복구, 업그레이드방법
 
CICS basics overview session-1
CICS basics overview session-1CICS basics overview session-1
CICS basics overview session-1
 
Db2 recovery IDUG EMEA 2013
Db2 recovery IDUG EMEA 2013Db2 recovery IDUG EMEA 2013
Db2 recovery IDUG EMEA 2013
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools short
 
Resource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in MainframesResource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in Mainframes
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19c
 
IBM DB2
IBM DB2IBM DB2
IBM DB2
 
Presentation db2 connections to db2 for z os
Presentation   db2 connections to db2 for z osPresentation   db2 connections to db2 for z os
Presentation db2 connections to db2 for z os
 
Reading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the GoalReading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the Goal
 
DB2 Basic Commands - UDB
DB2 Basic Commands - UDBDB2 Basic Commands - UDB
DB2 Basic Commands - UDB
 
SQL
SQLSQL
SQL
 
Oracle DBA
Oracle DBAOracle DBA
Oracle DBA
 
Sql and Sql commands
Sql and Sql commandsSql and Sql commands
Sql and Sql commands
 

Similar to DB2 LUW Auditing

Solving the DB2 LUW Administration Dilemma
Solving the DB2 LUW Administration DilemmaSolving the DB2 LUW Administration Dilemma
Solving the DB2 LUW Administration Dilemma
Randy Goering
 
Solving the DB2 LUW Administration Dilemma
Solving the DB2 LUW Administration DilemmaSolving the DB2 LUW Administration Dilemma
Solving the DB2 LUW Administration Dilemma
Randy Goering
 
OER UNIT 5 Audit
OER UNIT  5 AuditOER UNIT  5 Audit
OER UNIT 5 Audit
Girija Muscut
 
DB2 10 Security Enhancements
DB2 10 Security EnhancementsDB2 10 Security Enhancements
DB2 10 Security Enhancements
Laura Hood
 
2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation
Biju Thomas
 
Privilege Analysis with the Oracle Database
Privilege Analysis with the Oracle DatabasePrivilege Analysis with the Oracle Database
Privilege Analysis with the Oracle Database
Markus Flechtner
 
Implementing Auditing in SQL Server
Implementing Auditing in SQL ServerImplementing Auditing in SQL Server
Implementing Auditing in SQL Server
David Dye
 
Vault_KT.pptx
Vault_KT.pptxVault_KT.pptx
Vault_KT.pptx
SDPL Technologies
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data Redaction
Alex Zaballa
 
OTech magazine article - Principle of Least Privilege
OTech magazine article - Principle of Least PrivilegeOTech magazine article - Principle of Least Privilege
OTech magazine article - Principle of Least Privilege
Biju Thomas
 
Data Redaction - OTN TOUR LA 2015
Data Redaction - OTN TOUR LA 2015 Data Redaction - OTN TOUR LA 2015
Data Redaction - OTN TOUR LA 2015
Alex Zaballa
 
SQL Server 2016: Just a Few of Our DBA's Favorite Things
SQL Server 2016: Just a Few of Our DBA's Favorite ThingsSQL Server 2016: Just a Few of Our DBA's Favorite Things
SQL Server 2016: Just a Few of Our DBA's Favorite Things
Hostway|HOSTING
 
24 HOP edición Español -Diferentes técnicas de administración de logins y usu...
24 HOP edición Español -Diferentes técnicas de administración de logins y usu...24 HOP edición Español -Diferentes técnicas de administración de logins y usu...
24 HOP edición Español -Diferentes técnicas de administración de logins y usu...SpanishPASSVC
 
Vpd
VpdVpd
Oracle audit and reporting in one hour or less
Oracle audit and reporting in one hour or lessOracle audit and reporting in one hour or less
Oracle audit and reporting in one hour or less
Leon Rzhemovskiy
 
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_DatabaseNoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_DatabaseParesh Patel
 
Enterprise-class security with PostgreSQL - 1
Enterprise-class security with PostgreSQL - 1Enterprise-class security with PostgreSQL - 1
Enterprise-class security with PostgreSQL - 1
Ashnikbiz
 
Database audit policies copy
Database audit policies   copyDatabase audit policies   copy
Database audit policies copy
Oracle Apps DBA
 

Similar to DB2 LUW Auditing (20)

Solving the DB2 LUW Administration Dilemma
Solving the DB2 LUW Administration DilemmaSolving the DB2 LUW Administration Dilemma
Solving the DB2 LUW Administration Dilemma
 
Solving the DB2 LUW Administration Dilemma
Solving the DB2 LUW Administration DilemmaSolving the DB2 LUW Administration Dilemma
Solving the DB2 LUW Administration Dilemma
 
2) security
2) security2) security
2) security
 
OER UNIT 5 Audit
OER UNIT  5 AuditOER UNIT  5 Audit
OER UNIT 5 Audit
 
DB2 10 Security Enhancements
DB2 10 Security EnhancementsDB2 10 Security Enhancements
DB2 10 Security Enhancements
 
2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation
 
Privilege Analysis with the Oracle Database
Privilege Analysis with the Oracle DatabasePrivilege Analysis with the Oracle Database
Privilege Analysis with the Oracle Database
 
Less11 Security
Less11 SecurityLess11 Security
Less11 Security
 
Implementing Auditing in SQL Server
Implementing Auditing in SQL ServerImplementing Auditing in SQL Server
Implementing Auditing in SQL Server
 
Vault_KT.pptx
Vault_KT.pptxVault_KT.pptx
Vault_KT.pptx
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data Redaction
 
OTech magazine article - Principle of Least Privilege
OTech magazine article - Principle of Least PrivilegeOTech magazine article - Principle of Least Privilege
OTech magazine article - Principle of Least Privilege
 
Data Redaction - OTN TOUR LA 2015
Data Redaction - OTN TOUR LA 2015 Data Redaction - OTN TOUR LA 2015
Data Redaction - OTN TOUR LA 2015
 
SQL Server 2016: Just a Few of Our DBA's Favorite Things
SQL Server 2016: Just a Few of Our DBA's Favorite ThingsSQL Server 2016: Just a Few of Our DBA's Favorite Things
SQL Server 2016: Just a Few of Our DBA's Favorite Things
 
24 HOP edición Español -Diferentes técnicas de administración de logins y usu...
24 HOP edición Español -Diferentes técnicas de administración de logins y usu...24 HOP edición Español -Diferentes técnicas de administración de logins y usu...
24 HOP edición Español -Diferentes técnicas de administración de logins y usu...
 
Vpd
VpdVpd
Vpd
 
Oracle audit and reporting in one hour or less
Oracle audit and reporting in one hour or lessOracle audit and reporting in one hour or less
Oracle audit and reporting in one hour or less
 
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_DatabaseNoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
 
Enterprise-class security with PostgreSQL - 1
Enterprise-class security with PostgreSQL - 1Enterprise-class security with PostgreSQL - 1
Enterprise-class security with PostgreSQL - 1
 
Database audit policies copy
Database audit policies   copyDatabase audit policies   copy
Database audit policies copy
 

Recently uploaded

GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 

Recently uploaded (20)

GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 

DB2 LUW Auditing

  • 1. DB2 LUW Security Trading up with the New, Improved DB2 Auditing Features Presented by: Rebecca Bond a.k.a. DB2Locksmith DB2Locksmith@securedb2.com Phone: 434-DB2-0070
  • 2.
  • 3. Breach attempts are up, but DBA participation is NOT trending up as well. Databases are complex and the skills to effectively manage them take years to learn. Database security adds complexity to the equation, but ignoring database security – the current approach of many organizations -- doesn't seem to be working out too well. The database does not have to be at risk, even if other layers of defense are pierced. But, this protection comes only when the appropriate database security steps are well understood and implemented….by the DBAs. Did you know you are a security guru?
  • 4. Old cars – New cars Old Audit – New Audit Being Proactive about Being Reactive DB2 Auditing...approaches, tips and concerns
  • 5. Think it’s time for a trade-up for your Audit Security? Do I have a deal for you. DB2 9.5 introduced some nifty auditing capabilities . Let’s discuss Auditing, and these new features and how they can make auditing setup more flexible so that they will closely track to your specific needs.
  • 6. CAUTION Database Auditing is ONLY one Layer – It has to be supplemented!
  • 7. •Audit activity is now highly granular and can be limited to activity for selected users or tables •The SYSADM can use the db2audit functionality to archive both instance and database logs and to extract from archived logs from either. •Stored procedures are now available to make the SECADM's work easier and this work can be delegated •Prune is Gone !
  • 8. •The active audit log is archived before data is extracted which benefits performance. •The location for Active and Archived audit data can be changed … no need to use the old default path •DPF dbs can use local file systems for the audit logs •SECADM role is greatly enhanced, but work can be delegated
  • 9. What Are the Audit-able categories? •AUDIT – records info regarding changes to audit settings or when the audit log is accessed •CHECKING – authorization "checking", attempts to access or change DB2 objects or functions •OBJMAINT – creation/drops of data objects •SECMAINT – Grants/revokes, privileges, DBADM, modifications to SYSADM_GROUP, SYSCTRL_GROUP, SYSMAINT_GROUP •SYSADMIN – SYSADM,SYSMAINT,SYSCTRL operations •VALIDATE – for each connection attempt, generates audit records when validating users and their associated groups or when retrieving system security information •CONTEXT – "context" of the operation. Aids in interpretation of the info in the audit log file. Likely will capture a HUGE amount of information.
  • 10. EXECUTE – the new and improved "CONTEXT" Works for both static and dynamic SQL Optionally include Data (host variables and/or parameters) Doesn't capture statement preparation Doesn't include LOBS, LONG, XML & structured types The Execute audit record is only produced when execution completes, so failures are not captured via EXECUTE.
  • 11. It’s Splitsville for Auditing The split between Instance/Database layers makes the auditing process much more granular AND robust and aids with the concept of Separation of Duties.
  • 12. 2…2…2 Audits in 1 ! • Where else can you get 2..2..2 DB2 Audits in 1 ? • Instance AND Database Levels with greatly increased granularity • No need to waste time chewing on auditing features you don't need. • SYSADM uses DB2AUDIT command at the Instance Level • SECADM creates audit policies at the database level • An Active audit log is archived BEFORE data is extracted from it which helps performance.
  • 13. The SYSADM vs The SECADM The SYSADM user can use the db2audit command to archive instance OR database level audit data. SECADM uses the AUDIT_ARCHIVE stored procedure to archive database level audit data.
  • 14. Instance Level Auditing • This is most like the old "pre 9.5" days • SYSADM uses DB2AUDIT to configure at instance level • Db2audit is Explicitly started and stopped • Uses "Describe" to determine current configuration • Records can be "Flushed" • Archive (and can also archive logs for an associated database) • Extract data from an archived audit log
  • 15. The SYSADM’s commands: db2audit configure – what do you want to audit? db2audit describe – what ARE you auditing? db2audit archive -- moves the active log to an archive db2audit flush – flush the audit buffer explicitly db2audit extract -- from archived logs db2audit start/stop
  • 16. Database Level Auditing Database level auditing is done via policies that are created by the SECADM. There is no "start" command. Auditing begins as soon as the policy is CREATED AND ASSIGNED.
  • 17. Database Level – Audit Policies SECADM Creates Audit Policies
  • 18. Database Audit Policy Categories. What do they do? •ALL - Sets all categories to the same status. (However, the EXECUTE category is WITHOUT DATA.) •AUDIT - Generates records when audit settings are changed or when the audit log is accessed. •CHECKING - Generates records during authorization checking of attempts to access or manipulate database objects or functions. •CONTEXT - Generates records to show the operation context when a database operation is performed. (A lot of information, choose wisely) •EXECUTE - Generates records to show the execution of SQL (WITHOUT DATA /WITH DATA)
  • 19. •OBJMAINT - Generates records when data objects are created or dropped. •SECMAINT - Generates records when object privileges, database privileges, or DBADM authority is granted or revoked. •SYSADMIN - Generates records when operations requiring SYSADM, SYSMAINT, or SYSCTRL authority are performed. •VALIDATE - Generates records when users are authenticated or when system security information related to a user is retrieved. FYI: If ALL is not specified, the STATUS of any category that is not explicitly specified is set to NONE.
  • 20. Policies are assigned to objects by the SECADM using the AUDIT statement. Once assigned, the audit policy is active (but may need to wait on the next UOW if an old policy was in place).
  • 21. DB Audit Policies are Assigned by the SECADM
  • 22. DATABASE — All auditable events that happen on the DB are audited according to the audit policy. TABLE — Can be a table, MQT nickname. CANNOT be a view (views are audited according to base table policy), catalog table, declared temp table or a typed table (Only execute category audit events, with or without data, will be generated when the table is accessed, even if the policy indicates that other categories should be audited Which Policy for Which Purpose?
  • 23. Which Policy for Which Purpose? TRUSTED CONTEXT -- Specifies that an audit policy is to be associated with or removed from contextname (which must exist) USER -- Specifies that an audit policy is to be associated with or removed from the user with authorization ID <authorization-name>. GROUP -- Specifies that an audit policy is to be associated with or removed from the group with authorization ID <authorization-name>. (Note: If user membership in a group cannot be determined, the policy will not apply to that user.)
  • 24. ROLE -- Specifies that an audit policy is to be associated with or removed from the role with authorization ID <authorization-name> (must pre-exist). Note: SYSADM, SYSMAINT, SYSCTRL, SYSMON, SQLADM, WLMADM, DBADM or SECADM — All auditable events that are initiated by a holder of this authority are captured, even if that authority is not required for the specific event Which Policy for Which Purpose?
  • 25. Putting Auditing on a Diet Execute, a new database (ONLY) level category, allows audit of JUST the SQL statement, versus the entire CONTEXT. Context generates a LOT of audit information. Since it is database specific and not instance specific, it uses audit policies, not the db2audit syntax. Use the WITH DATA option to capture data values for any host variables and parameter markers. EXCEPT, Be Aware, that not all input values are logged. LOB, LONG, XML, and structured type parameters appear as a null value.
  • 26. Some Audit Syntax: $> db2 "create audit policy audexe categories execute with data status both error type audit" Status both means that successful and failing attempts will be audited. Error type audit means that all errors (incl. audit errors) will be returned to the application. If error type was normal, errors generated by the audit facility are ignored and only the SQLCODEs for errors associated with the operation being performed are returned to the application.) $> db2 audit table locksmith.sensitive using policy audexe Now the audit policy is assigned to the table named sensitive in the schema locksmith. This audit policy is now active. I think I'd like to know what the SYSADMs are up to, so I'll create an audit policy for the database: $> db2 "CREATE AUDIT POLICY ADMPOLICY CATEGORIES SYSADMIN STATUS BOTH, SECMAINT STATUS BOTH ERROR TYPE AUDIT" $> db2 "AUDIT DATABASE USING POLICY ADMPOLICY“
  • 27. At the database level, the SECADM can delegate running the audit stored procedures and table functions to another user by appropriately granting execute authority on the SYSPROC audit procedures. These are: AUDIT_ARCHIVE stored procedure and table function, AUDIT_LIST_LOGS table function and AUDIT_DELIM_EXTRACT stored procedure.
  • 28. One example (using a Role to do this)..as the database SECADM: db2 "create role auditwrk" db2 "grant execute on procedure sysproc.AUDIT_ARCHIVE to role auditwrk" db2 "grant execute on function sysproc.AUDIT_ARCHIVE to role auditwrk" db2 "grant execute on function sysproc.AUDIT_LIST_LOGS to role auditwrk" db2 "grant execute on procedure sysproc.AUDIT_DELIM_EXTRACT to role auditwrk“ db2 "grant role auditwrk to locksmith"
  • 29. I hold SECADM. I want to get some info. First, I'll archive the current log. Then I'll extract the data to delimited files so I can load it in to tables and query it. $> db2 "call sysproc.audit_archive ('',-2)" $ >db2 "call sysproc.audit_delim_extract (null, '/SecDB/auddel', NULL, '%20100210%', null)"
  • 30. Auditing is a Big GUN for Reactive Monitoring But a Big Machine Gun that is Never Fired is Worthless If you aren't extracting Audited Data and if NO ONE is Reviewing it Regularly, then your Big Machine Gun is totally RUSTY and WILL NOT FIRE when Needed. BE PROACTIVE. Set up Audit, USE AUDIT, ReView Audit ! Keep your Big Machine Gun READY !
  • 31. • The Location for the Active Audit Log is now configurable • There are separate logs for instance & DB audit activities • Audit activity is now highly granular and can be limited to activity for selected users or tables • The SYSADM can use the db2audit functionality to archive both instance and database logs and to extract from archived logs from either. • Stored procedures are now available to make the SECADM's work easier and this work can be delegated • Prune is Gone ! Port able
  • 32. Making the Audit Wheels Turn If multiple instances exist on a server, then EACH INSTANCE should have separate locations for ARCHIVEPATH, AUDITARCHIVES. The goal is to get these audit logs on to speedy disk locations, especially for the ACTIVE ones.
  • 33. Where are you? Where do you want to be? EXAMPLE SYNTAX for moving ACTIVE audit log locations ## for Single Partition DB $> db2audit configure datapath </myspeedydisklocation> ## For DPF databases, I can choose an NFS Shared, or do something like.... $> db2audit configure datapath <'/Lockit/SpeedyAud $N'> Make sure to keep the space before the $N (For moving audit ARCHIVE logs for DPF database, I can NOT use the data partition expression ($N), my only option is a shared disk). ## Note: '/SecDB/auddel' has to exist.
  • 34. As you can imagine, migrating from an earlier product level to 9.5 or 9.7 will require some special considerations. Auditing is one of those special considerations. If you were using auditing prior to the migration then you will want to consider how the changes will impact your setup. Review the documentation for your specific migration approach. Have a plan to proceed that includes backing up current audit settings.
  • 35. When you migrate an instance from an earlier release to DB2 9.5 The audit configuration file is converted to DB2 Version 9.5 format. When you migrate a database from an earlier release to DB2 9.5 the instance-level configuration settings for auditing are used to create an audit policy in the database. If the audit facility is enabled at the instance level, the audit policy is associated with the migrated database to enable auditing. Otherwise, the audit policy is not associated. After the migration, audit settings should be re-visited, both to determine if it meets requirements and to take advantage of new, robust options.
  • 36. Audit_Buf_SZ A consideration: audit_buf_sz: a DBM configuration parameter. If set to zero auditing records are written synchronously to disk which means that the event that caused the audit record has to wait on the write. Possible to lose one audit record if this is zero. Downside is potential performance impact. Larger audit_buf_sz can mitigate performance impacts, but places a larger number of audit records at risk of not making it to disk. The "flush" operation can also be performed to force the writes at any time.
  • 37. A Personal Journey Long ago in my youth, I read and heard that setting audit_buf_sz to zero was reported to cause some serious performance degradation on audited DB2 systems. I believed the claim. It certainly seemed plausible. But, being a security junkie, my job was SECURITY not PERFORMANCE....boy was that a bad assessment on my part. If security has to battle performance in an enterprise, security is going to be at a distinct disadvantage, right? (Note to self: Buy Boxing Gloves before the next battle)
  • 38. But then, I actually had a performance tuning exercise and I was REQUIRED to set the audit_buf_sz to ZERO so that, at most, only one audit record was ever at risk of loss. I was auditing for everything except CONTEXT. Even without auditing CONTEXT events, I was concerned (actually terrified) that this would cause a HUGE problem. Ok, at first, it appeared my fears may have been valid. The entire system looked over tasked, overworked and just plain old unhappy (a technical term). But then, some tuning changes were made, some code re-written, some OS parms tuned and before I knew it, I had forgotten all about the audit_buf_sz being zero....oh....and our performance tuning exercise was so successful that management was "shocked" at what we had accomplished.
  • 39. The material in this presentation is an overview. The time to deep dive into DB2's Robust Auditing Capability would have exceeded the length of this session. Please be especially aware when you upgrade from 8.2 or 9.1 to 9.5 or 9.7. Things have changed and you will need to adapt. But the upgrade benefits are GREAT. I strongly encourage you to learn much about auditing.
  • 40. Some resources: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp DB2 9.7 Security Guide: http://www- 01.ibm.com/support/docview.wss?rs=71&uid=swg27015148 DB2 Security Redbook (LUW): http://www.redbooks.ibm.com/abstracts/sg247555.html?Open DB2 Security Redbook (z/OS): http://www.redbooks.ibm.com/abstracts/sg247720.html?Open
  • 41. Rebecca Bond A.K.A. DB2Locksmith DB2Locksmith@securedb2.com PHONE: 434-DB2-0070 Trading up with the New, Improved DB2 Auditing Features

Editor's Notes

  1. O P T I O N S: STATUS? BOTH - Successful and failing events will be audited; FAILURE - Only failing events will be audited. SUCCESS - Only successful events will be audited; NONE - No events in this category will be audited. ERROR TYPE? NORMAL -Any errors generated by the audit are ignored. The SQLCODEs for errors associated with the operation being performed are returned to the application. AUDIT - All errors, including errors occurring within the audit facility itself, are returned to the application. ### SYSCAT.AUDITUSE, SYSCAT.AUDITPOLICIES , can be queried for info on audit policies.
  2. Mitigating Migration
  3. I firmly believe that as security professionals, we have an obligation to share information. I welcome any learning opportunity that fosters a more robust security architecture. Please feel free to send me emails with comments, thoughts, disagreements, articles or lessons learned. The more we know…the better prepared we can be, as a security community, to protect and defend. My contact information is: Rebecca Bond, DB2Locksmith@securedb2.com, PH: 434-DB2-0070