DB2 controls access to resources by explicitly or implicitly granting privileges to an ID. GRANT and REVOKE statements explicitly give and remove privileges. Ownership of a resource implicitly grants certain privileges that cannot be revoked. Privileges that are explicitly or implicitly granted to an ID are recorded in the DB2 catalog. Each row in the catalog tables represents one privilege that has been granted to an authorization ID. When you try to perform a function, DB2 checks the catalog tables to determine if you are permitted to perform the action.
For example, suppose you issue the ALTER TABLESPACE request. DB2 uses your authorization ID to check the catalog tables for one of the following:
DB2 checks your authorization ID against the values in the GRANTEE column of the catalog security tables. This ID can be your primary authorization ID or one of your secondary authorization IDs. This secondary ID is associated with your primary ID through the sign‑on or attach connection exit at connection time or by the SET CURRENT SQLID statement. DB2 checks the appropriate catalog table for each ID until one has the required privilege assigned to it. The more secondary IDs that are assigned to the primary ID, the more slowly DB2 processes.
For some privileges, the process to determine which users are granted the privilege is more complicated. For example, with the UPDATE privilege, DB2 must check two tables if UPDATE is restricted to a column level: one for the table privileges and one for the column privileges.
During processing, you can choose what you want to trace. Through options of the audit trace records, you can choose:
DB2 uses SMF type 102 records to record audit trace information. DB2 can record original, primary, and all secondary IDs in its SMF records. The IDs that are reported depend on the product that you buy or write.
Authorization checking for resources when a plan is bound can take place at two different times: at bind time and at execution time. Authorization checking to use a plan takes place when the user executes the plan. Authorization checking to use dynamic SQL takes place at execution time.
CA ACF2 Option for DB2 does not update or reference the DB2 catalog tables. CA ACF2 Option for DB2 stores its rules and DB2 records in the Infostorage database. CA ACF2 Option for DB2 uses these to perform validation on the resource. It ignores all GRANT and REVOKE statements.
At the startup of a DB2 subsystem, CA ACF2 Option for DB2 determines which DB2 OPTS infostorage record is active and stores its mode values. When a user attempts to perform an action on a resource, CA ACF2 Option for DB2 performs its resource validation.
CA ACF2 Option for DB2 checks one or more rule sets for the same privileges for which DB2 checks its catalog tables. CA ACF2 Option for DB2 also considers the mode values specified by the DB2 OPTS record for each resource. CA ACF2 Option for DB2 locates all of the rule sets that apply to the access attempt until it finds one that grants access. These include any rule set that covers the specific resource or ones that grant administrative authorities such as SYSADM or DBADM.
First, CA ACF2 Option for DB2 checks the rule set that applies to the specific resource. An CA ACF2 Option for DB2 rule applies to a specific resource only when the conditions described by the rule match the following conditions of the user’s actual access request.
CA ACF2 Option for DB2 checks the rule set to determine whether the access request matches the following parameters:
When CA ACF2 Option for DB2 finds a match, it uses the $LIDOWNER or $UIDOWNER control statement to determine whether the user owns the resource. If the user owns the resource, CA ACF2 Option for DB2 automatically permits access to the resource, no other checking is performed. If the user does not own the resource, CA ACF2 Option for DB2 continues to search the rule set for a rule entry that matches the user’s environment. The rule entry can contain the following parameters that describe the environment:
If CA ACF2 Option for DB2 finds a matching rule entry, it determines from the access permission whether the request is allowed. If no rule entry matches or the access permission prevents access, CA ACF2 Option for DB2 uses the mode value of the DB2 OPTS record for that resource to determine whether access is allowed. If the mode for the resource is set to LOG or QUIET, access is granted. If the mode is set to ABORT, CA ACF2 Option for DB2 checks the user’s logonid to determine whether it is privileged (that is, has the SECURITY or NON‑CNCL attribute) and whether a scope record is defined for the SECURITY privilege. If one of these attributes is specified and the user is scoped for the resource (when SECURITY is specified), the access is allowed but logged.
If the user is not privileged, CA ACF2 Option for DB2 continues to check other rule sets that might apply such as those that control administrative authorities (for example, SYSADM or DBADM). After each rule set validation, CA ACF2 Option for DB2 checks the corresponding mode value of the OPTS record for the access recommendation. If no rule sets permit access and the OPTS mode value specifies ABORT for each of the resources that DB2 checks, access is ultimately denied.
For example, suppose you issue an ALTER TABLESPACE request. CA ACF2 Option for DB2 locates the rule sets that grant the following by matching the environments:
The following are the steps that CA ACF2 Option for DB2 takes:
If your site uses secondary authorization IDs, CA ACF2 Option for DB2 completes the process described above for each ID that a user is authorized to use. If the user does not issue the SET CURRENT SQLID request, CA ACF2 Option for DB2 starts with the user’s primary ID. If that ID does not have access to the DB2 object, CA ACF2 Option for DB2 uses a secondary ID in this process. If the secondary ID does not give the user access, the remaining secondary IDs are checked until CA ACF2 Option for DB2 finds one that grants access or cannot find an ID.
CA ACF2 Option for DB2 uses a type 230 SMF record, or whatever is defined in the CA ACF2 Field Definition Record (ACFFDR). It reports violations, traces, and loggings recorded against the original, primary, and secondary authorization IDs.
|
Copyright © 2011 CA Technologies.
All rights reserved.
|
|