Step 3. Create a Rule to Rewrite SQL Request Statements
Step 3. Create a Rule to Rewrite SQL Request Statements
Create a rule that identifies specific strings of text in an SQL request statement and then rewrites the SQL request to append an audit tag.
In the
Rule Editor
window, right-click the security rule set and select
Append rule
.
The
Append Rule
window appears.
Enter a name for the rule, such as Match and Rewrite.
To configure the matcher, select
Text
from the menu next to Matching Method.
The text matcher identifies a specific string of text within an SQL request sent to the Data Vault.
In the text box, enter a statement in a regular expression that identifies the archived database columns that you want to trigger the audit functionality when the columns are included in an SQL request statement issued to the Data Vault.
For example, if you want Data Vault to audit all SQL request statements that query the columns named EmpID, FIRSTNAME, LASTNAME, and SSN, enter the following statement:
In the Alternate Statement text box, enter an SQL statement that includes the column names that you want to trigger the audit functionality. The statement must begin with "\(1)
audit using
" and end with "
from resultset
". The "%" sign followed by a number designates column position.
To configure the processing action, select
Stop if applied
from the menu.
Select the check box next to "Log When Rule Is Applied."