ATNA Audit Trail library
Assists in the creation of ATNA audit trail messages for IHE profiles.
Install with:
$ npm install --save atna-audit
Use the simple convenience function as follows:
var audit = atnaconstruct;var syslog = atnaconstruct;
Or construct your own custom audits like this:
var eventID = 110114 'UserAuthenticated' 'DCM';var typeCode = 110122 'Login' 'DCM';var eIdent = atnaEVENT_ACTION_EXECUTE atnaOUTCOME_SUCCESS eventID typeCode;var sysRoleCode = 110150 'Application' 'DCM';var sysParticipant = sysname '' true sysIp atnaNET_AP_TYPE_IP sysRoleCode;var userRoleCodeDef = userRole userRole userRoleCode;var userParticipant = username '' true null null userRoleCodeDef;var sourceTypeCode = atnaAUDIT_SRC_TYPE_UI '' '';var sourceIdent = null sysname sourceTypeCode;var audit = eIdent sysParticipant userParticipant null sourceIdent;var xml = audit;
Sending an Audit to an ATNA supported server
Connection Details
var connDetails = interface: 'udp|tls|tcp' // specify the interface to use when sending the audit host: 'localhost' // specify the host port: 5050 // specify the port options: // when interface type is 'tls', you need to supply the certificate details key: fs cert: fs ca: fs
Sending the Audit
atnasend
Testing
To test the code you will need xmllint
and trang
on your PATH. sudo apt-get install libxml2-utils trang
Then run npm test