More DB2 Security




CS185c

Chris Pollett

Apr 22, 2010

Outline

Introduction

Authorization Related Special Registers

Example

SET CURRENT SCHEMA = "ABC"; 
SET CURRENT SQLID = "XYZ"; 
SELECT * FROM T1;

Querying the values of Special Registers

Schema and Ownership of Objects

Access to Data for AUTHID

Administrative Authority

Explicit Privileges

Different DB2 object have different available explicit privileges. We next list some of these by object

Granting Privileges to an AUTHID

A DB2 GRANT statement gives a specific privilege to an authorization ID. Here are some examples of this command:

GRANT SELECT ON TABLE TABLE1 TO MARY;

GRANT BIND ON PACKAGE DBRM1 TO PAYROLL;

GRANT SELECT ON TABLE TABLE1 TO ACCNTG;

GRANT CREATDB, LOAD ON DATABASE DBMANUF 
  TO MANUF WITH GRANT OPTION;

How Privileges Work

Privilege Example

An example of how privilege affect the catalog

Revoking Privileges

Hierarchical Administrative Authorities

A graph of the DB2 Hierarchical Administrative Authorities

Ownership of a Table

Static SQL -- Privileges for Plan and Package

Example -- Static SQL

A static SQL Privilege example

Dynamic SQL -- Privilege Checking

Composite Privileges

Multi-level Security with Row-Level Granularity

Challenges with Security in a Distributed Setting

Trusted Context

Trusted Context Characteristics

Database Role

Trusted Context Authorization ID Switching

Securing an Application Server

Auditing

Secure DBA Activities

An auditable DBA process can be implemented with trusted contexts and roles: