
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Assists in the creation of ATNA audit trail messages for IHE profiles.
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 = atna.construct.userLoginAudit(atna.OUTCOME_SUCCESS, 'openhim', 'x.x.x.x', 'testUser', 'testRole', '123');
var syslog = atna.construct.wrapInSyslog(audit);
Or construct your own custom audits like this:
var eventID = new atna.construct.Code(110114, 'UserAuthenticated', 'DCM');
var typeCode = new atna.construct.Code(110122, 'Login', 'DCM');
var eIdent = new atna.construct.EventIdentification(atna.EVENT_ACTION_EXECUTE, new Date(), atna.OUTCOME_SUCCESS, eventID, typeCode);
var sysRoleCode = new atna.construct.Code(110150, 'Application', 'DCM');
var sysParticipant = new atna.construct.ActiveParticipant(sysname, '', true, sysIp, atna.NET_AP_TYPE_IP, [sysRoleCode]);
var userRoleCodeDef = new atna.construct.Code(userRole, userRole, userRoleCode);
var userParticipant = new atna.construct.ActiveParticipant(username, '', true, null, null, [userRoleCodeDef]);
var sourceTypeCode = new atna.construct.Code(atna.AUDIT_SRC_TYPE_UI, '', '');
var sourceIdent = new atna.construct.AuditSourceIdentification(null, sysname, sourceTypeCode);
var audit = new atna.construct.AuditMessage(eIdent, [sysParticipant, userParticipant], null, [sourceIdent]);
var xml = audit.toXML();
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.readFileSync('./path/to/key.pem').toString(),
cert: fs.readFileSync('./path/to/cert.pem').toString(),
ca: fs.readFileSync('./path/to/cert.pem').toString(),
}
}
Sending the Audit
atna.send.sendAuditEvent(msg, connDetail, function (err) {
// handle errors if needed
})
To test the code you will need xmllint
and trang
on your PATH. sudo apt-get install libxml2-utils trang
Then run npm test
FAQs
Assists in the creation of ATNA audit trail messages for IHE profiles.
We found that atna-audit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.