org.openhealthexchange.openpixpdq.ihe.audit
Class IheAuditTrail

java.lang.Object
  extended by org.openhealthexchange.openpixpdq.ihe.audit.IheAuditTrail
All Implemented Interfaces:
com.misyshealthcare.connect.base.audit.IAuditTrail

public class IheAuditTrail
extends java.lang.Object
implements com.misyshealthcare.connect.base.audit.IAuditTrail

The base implementation of an audit message class. Each IHE Actor requires its own implementation of this base class. This base class, can be used independently, but that is not the standard method, and will not be ATNA compliant.

Implementations of the audit log class for specific IHE actors must be instantiated when the actor starts, and stop must be called when the actor ends, and that instation must not be used again. If the same actor restarts, a new instance must be made. Calling stop will cause that specific instance of the audit trail to cease functioning.

The following ATNA required messages are currently implemented by the given classes.

Actor-start-stop
All actors implement this via the base class. It is generally unnecessary to re implement it for the different actors. Dicom Supp 95 "Application Activity"
Node-authentication-failure
Only for secure node TLS failure, not for user login failure. Secure Node Actor. Dicom Sup 95 "Security Alert"
Patient-record-event
Patient record created modified or accessed. Document Consumer and Document Source. Dicom Sup 95 "Patient Record"
Import
Generally used whenever a document is sent somewhere. Document Source. Dicom Sup 95 "Data Import"
Export
Patient record created recieved from somewhere. Document Consumer. Dicom Sup 95 "Data Export"
Procedure-record-event
Procedure record created accessed modified or deleted. Document Consumer and Document Source. Dicom Sup 95 "Procedure Record"
Security-administration
Change of security roles, user accounts, authentication ability, and other configuration changes. In addition, user authentication, failure, and signoff. Secure Node. Dicom Sup 95 "Security Alert"

Version:
1.0 - Oct 27, 2005
Author:
Josh Flachsbart
See Also:
AuditObjectFactory

Field Summary
(package private) static org.apache.log4j.Logger LOG
           
 
Constructor Summary
IheAuditTrail(java.lang.String actorName, java.lang.Iterable<com.misyshealthcare.connect.net.IConnectionDescription> repositories)
          Handles creation of a logging instance for a given actor.
 
Method Summary
protected  void applicationActivity(com.misyshealthcare.connect.base.audit.AuditCodeMappings.AuditTypeCodes message)
          DICOM Supp 95 message A.1.3.1 (p.
protected  void dataExport(com.misyshealthcare.connect.base.audit.ActiveParticipant doctor, com.misyshealthcare.connect.base.audit.ActiveParticipant media, ParticipantObject patient)
          DICOM Supp 95 message A.1.3.4 (p.
protected  void dataImport(com.misyshealthcare.connect.base.audit.ActiveParticipant doctor, com.misyshealthcare.connect.base.audit.ActiveParticipant media, ParticipantObject patient)
          DICOM Supp 95 message A.1.3.4 (p.
 com.misyshealthcare.connect.base.audit.ActiveParticipant getMedia(com.misyshealthcare.connect.base.audit.AuditCodeMappings.ActiveParticipantIds role, java.lang.String mediaDescription)
           
 com.misyshealthcare.connect.base.audit.ActiveParticipant getUser()
           
 void logPdqQuery(com.misyshealthcare.connect.base.audit.ActiveParticipant source, java.util.Collection<ParticipantObject> patients, ParticipantObject query)
          Audit Logging of PDQ Query Messages.
 void logPixFeed(com.misyshealthcare.connect.base.audit.ActiveParticipant source, ParticipantObject patient, com.misyshealthcare.connect.base.audit.AuditCodeMappings.EventActionCode eventActionCode)
          Audit Logging of PIX Feed Messages.
 void logPixQuery(com.misyshealthcare.connect.base.audit.ActiveParticipant source, ParticipantObject patient, ParticipantObject query)
          Audit Logging of PIX Query Messages.
 void logPixUpdateNotification(com.misyshealthcare.connect.base.audit.ActiveParticipant destination, ParticipantObject patient)
          Audit Logging of PIX Update Notification Messages.
static void main(java.lang.String[] args)
           
 void nodeAuthenticationFailure(com.misyshealthcare.connect.base.audit.AuditCodeMappings.SuccessCode success, com.misyshealthcare.connect.net.IConnectionDescription otherServer)
          Call when the node fails to authenticate itself with another node.
 void recordExported(ParticipantObject patient, java.lang.String mediaDesc)
          Call when a record is exported to external media.
 void recordImported(ParticipantObject patient, java.lang.String mediaDesc)
          Call when a record is imported from external media.
protected  void securityAlert(com.misyshealthcare.connect.base.audit.AuditCodeMappings.SuccessCode success, com.misyshealthcare.connect.base.audit.ActiveParticipant otherServer)
          DICOM Supp95 message A1.3.14 (p.
 void start()
          Sends actor start log message.
 void stop()
          Sends actor stop log message.
protected  void userAuthentication(com.misyshealthcare.connect.base.audit.ActiveParticipant user, com.misyshealthcare.connect.base.audit.AuditCodeMappings.AuditTypeCodes type, com.misyshealthcare.connect.base.audit.AuditCodeMappings.SuccessCode success)
          DICOM Supp95 message A1.3.15 (p.
 void userLogin(com.misyshealthcare.connect.base.audit.AuditCodeMappings.SuccessCode success, com.misyshealthcare.connect.base.audit.ActiveParticipant user)
          Call when a user authenticates himself.
 void userLogout(com.misyshealthcare.connect.base.audit.AuditCodeMappings.SuccessCode success, com.misyshealthcare.connect.base.audit.ActiveParticipant user)
          Call when a user logs out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

static org.apache.log4j.Logger LOG
Constructor Detail

IheAuditTrail

public IheAuditTrail(java.lang.String actorName,
                     java.lang.Iterable<com.misyshealthcare.connect.net.IConnectionDescription> repositories)
Handles creation of a logging instance for a given actor. Must be called by implementing sub-classes with the appropriate actor name. Can be used directlly, but will not produce ATNA compliant messages.

Parameters:
actorName - Name of the ATNA actor that this will generate an audit trail for.
Method Detail

getUser

public com.misyshealthcare.connect.base.audit.ActiveParticipant getUser()

getMedia

public com.misyshealthcare.connect.base.audit.ActiveParticipant getMedia(com.misyshealthcare.connect.base.audit.AuditCodeMappings.ActiveParticipantIds role,
                                                                         java.lang.String mediaDescription)

applicationActivity

protected void applicationActivity(com.misyshealthcare.connect.base.audit.AuditCodeMappings.AuditTypeCodes message)
                            throws javax.xml.bind.JAXBException
DICOM Supp 95 message A.1.3.1 (p. 15): Application Activity

Requires an event id with the parameters below and a single participant which is the application and a single audit source. The participant and audit source are provided by the format and log function.

Note that we could add the application launcher to this message.

Parameters:
message - The type of application activity that it is. Generally start or stop.
Throws:
javax.xml.bind.JAXBException

dataExport

protected void dataExport(com.misyshealthcare.connect.base.audit.ActiveParticipant doctor,
                          com.misyshealthcare.connect.base.audit.ActiveParticipant media,
                          ParticipantObject patient)
                   throws javax.xml.bind.JAXBException
DICOM Supp 95 message A.1.3.4 (p. 19): Data Export

This should be used when data leaves control of the system. (E.g. xdm/xdr)

Requires an event id with the parameters below. Also requires the doctor as an active participant, if known, and a description of the documents accessed as a participant object. This is the patient id and additional information about the document affected if available. The patient info is required.

In addition, a single participant which is the application and a single audit source. The participant and audit source are provided by the format and log function.

Parameters:
doctor - Information about the doctor. null if not available.
patient - needs to change. This is the information about the patient.
action - What they did with the patient record.
Throws:
javax.xml.bind.JAXBException

dataImport

protected void dataImport(com.misyshealthcare.connect.base.audit.ActiveParticipant doctor,
                          com.misyshealthcare.connect.base.audit.ActiveParticipant media,
                          ParticipantObject patient)
                   throws javax.xml.bind.JAXBException
DICOM Supp 95 message A.1.3.4 (p. 19): Data Import

This should be used when data was not in control of the system. (E.g. xdm/xdr)

Requires an event id with the parameters below. Also requires the doctor as an active participant, if known, and a description of the documents accessed as a participant object. This is the patient id and additional information about the document affected if available. The patient info is required.

In addition, a single participant which is the application and a single audit source. The participant and audit source are provided by the format and log function.

Parameters:
doctor - Information about the doctor. null if not available.
patient - needs to change. This is the information about the patient.
action - What they did with the patient record.
Throws:
javax.xml.bind.JAXBException

securityAlert

protected void securityAlert(com.misyshealthcare.connect.base.audit.AuditCodeMappings.SuccessCode success,
                             com.misyshealthcare.connect.base.audit.ActiveParticipant otherServer)
                      throws javax.xml.bind.JAXBException
DICOM Supp95 message A1.3.14 (p. 34): Security Alert

This requires a single event id, the comprimised server if known, the reporting server (given by format and log) the identity of the reporting user (assumed to be machine only and therefore unknown) and the offending participants, if known. We are generally the offending so we just leave ourselves out since we are already in there, however this is a spot for improvement in the future.

In addition there appears to be a Participant object, but it is poorly defined and thus is not included here. This should be changed in the future.

Parameters:
success - Major error means that security has been comprimised. Success means an informative alert only. Others mean mitigation was possible.
otherServer - The comprimised server, if known.
Throws:
javax.xml.bind.JAXBException

userAuthentication

protected void userAuthentication(com.misyshealthcare.connect.base.audit.ActiveParticipant user,
                                  com.misyshealthcare.connect.base.audit.AuditCodeMappings.AuditTypeCodes type,
                                  com.misyshealthcare.connect.base.audit.AuditCodeMappings.SuccessCode success)
                           throws javax.xml.bind.JAXBException
DICOM Supp95 message A1.3.15 (p. 36): User Authentication

This message records users logging into the system, as opposed to security alerts which are for node's authenticating themselves. The single event id is a login or logout, and whether it succeeded. The user attempting to authenticate is a required active participant. The enterprise wide authentication node (e.g. kerberos) is optional, but the actual authentication node is mandatory though included by format and log.

Parameters:
user - User authenticating. Must not be null.
isLogin - True if user is logging in false if logging out.
success - Whether the loging was successful.
Throws:
javax.xml.bind.JAXBException

start

public void start()
Sends actor start log message. Must be called when actor is started.

Specified by:
start in interface com.misyshealthcare.connect.base.audit.IAuditTrail

stop

public void stop()
Sends actor stop log message. Must be called when actor is finished.

Specified by:
stop in interface com.misyshealthcare.connect.base.audit.IAuditTrail

nodeAuthenticationFailure

public void nodeAuthenticationFailure(com.misyshealthcare.connect.base.audit.AuditCodeMappings.SuccessCode success,
                                      com.misyshealthcare.connect.net.IConnectionDescription otherServer)
Call when the node fails to authenticate itself with another node. Generally you don't log successes since there can be many of those. Described in DICOM Supp95 A 1.3.14 as Security Alert. Described in ITI TF-2 p. 172 as Node-authentication-failure.

Specified by:
nodeAuthenticationFailure in interface com.misyshealthcare.connect.base.audit.IAuditTrail

userLogin

public void userLogin(com.misyshealthcare.connect.base.audit.AuditCodeMappings.SuccessCode success,
                      com.misyshealthcare.connect.base.audit.ActiveParticipant user)
Call when a user authenticates himself. Described in DICOM Supp95 A 1.3.15 as User Authentication. Described in ITI TF-2 p. 172 as Node-authentication-failure.

Specified by:
userLogin in interface com.misyshealthcare.connect.base.audit.IAuditTrail

userLogout

public void userLogout(com.misyshealthcare.connect.base.audit.AuditCodeMappings.SuccessCode success,
                       com.misyshealthcare.connect.base.audit.ActiveParticipant user)
Call when a user logs out. Described in DICOM Supp95 A 1.3.15 as User Authentication. Described in ITI TF-2 p. 172 as Node-authentication-failure.

Specified by:
userLogout in interface com.misyshealthcare.connect.base.audit.IAuditTrail

recordImported

public void recordImported(ParticipantObject patient,
                           java.lang.String mediaDesc)
Call when a record is imported from external media. Described in DICOM Supp95 A 1.3.5 as Data Import.

Parameters:
patient - The patient or document participant object.
mediaDesc - A string describing the media, e.g. the source e-mail address, or "USB Media", etc...

recordExported

public void recordExported(ParticipantObject patient,
                           java.lang.String mediaDesc)
Call when a record is exported to external media. Described in DICOM Supp95 A 1.3.4 as Data Export.

Parameters:
patient - The patient or document participant object.
mediaDesc - A string describing the media, e.g. the destination e-mail address, or "USB Media", etc...

logPixFeed

public void logPixFeed(com.misyshealthcare.connect.base.audit.ActiveParticipant source,
                       ParticipantObject patient,
                       com.misyshealthcare.connect.base.audit.AuditCodeMappings.EventActionCode eventActionCode)
Audit Logging of PIX Feed Messages. Call this method when processing PIX Create, PIX Update and PIX Update Notification messages.

Parameters:
source - the source information of the application that sends the message
patient - the patient related to the PIX Feed message
eventActionCode - the AuditCodeMappings.EventActionCode

logPixQuery

public void logPixQuery(com.misyshealthcare.connect.base.audit.ActiveParticipant source,
                        ParticipantObject patient,
                        ParticipantObject query)
Audit Logging of PIX Query Messages. Call this method when processing PIX Query messages.

Parameters:
source - the source information of the application that sends the message
patient - the patient related to the PIX Query message
query - the PIX Query information

logPdqQuery

public void logPdqQuery(com.misyshealthcare.connect.base.audit.ActiveParticipant source,
                        java.util.Collection<ParticipantObject> patients,
                        ParticipantObject query)
Audit Logging of PDQ Query Messages. Call this method when processing PDQ Query messages.

Parameters:
source - the source information of the application that sends the message
patients - the patients related to the PDQ Query message
query - the PDQ Query information

logPixUpdateNotification

public void logPixUpdateNotification(com.misyshealthcare.connect.base.audit.ActiveParticipant destination,
                                     ParticipantObject patient)
Audit Logging of PIX Update Notification Messages. Call this method when processing PIX Update Notification.

Parameters:
destination - the destination information of the application that receives the message
patients - the patients related to this PIX Update Notification message

main

public static void main(java.lang.String[] args)