Real Time Information Director User Documentation

RTID Security and Auditing
Hewlett-Packard Company 11 529618 - 002
You must also modify the DDL to include the partition ID column. You need not write
any custom code or modify any metadata. The partitioning strategy for audit tables is
round-robin: each audit record is assigned the next partition ID in a repeating sequence.
Specifying Audit Requirements for a Document
A document definition specifies whether a document is audited or not and whether to
record the inbound data, the outbound data, or both as audit details.
The following excerpt from a metadata file shows that patient events must be audited
when inserted or queried. In the case of an insertion, the inbound data (the record being
added) must be preserved as an audit detail; in the case of a query, both the inbound data
(the query) and the outbound data (the response) must be preserved as audit details:
public PatientEvents()
throws MetadataInconsistency, SQLException
{
super(documentRecord(), "PATIENTEVENTS", "INSERT
AUDIT_INBOUND", "AUDIT_INBOUND AUDIT_OUTBOUND");
}
Querying Audit Records
Just as you can define a document that queries other tables in the data store, you can
define documents that query audit tables by consumer and date or that retrieve audit
details in XML.
Retrieving Audit Headers
In the following example, the child’s mother requests the audit records for events
pertaining to her son and dated 2004-01-24. The applicable security policy must allow
her, as his guardian, access to his data.
- <AUDITQUERYDATE_R>
-
<HEADER>
<CONSUMER>PAT00002</CONSUMER>
<CONSUMERTYPECODE>CRN</CONSUMERTYPECODE>
<AGENT>PAT00001</AGENT>
<AGENTTYPECODE>CRN</AGENTTYPECODE>
<DATE>2004-04-02</DATE>
<ROLE>Guardian</ROLE>
</HEADER>
-
<KEYS>
<EXTERNALIDENTIFIER>PAT00002</EXTERNALIDENTIFIER>
<IDENTIFIERTYPECODE>CRN</IDENTIFIERTYPECODE>
<EVENTDATE>2004-01-24</EVENTDATE>
</KEYS>