15#ifndef PACS_SECURITY_ATNA_SERVICE_AUDITOR_HPP
16#define PACS_SECURITY_ATNA_SERVICE_AUDITOR_HPP
89 const std::
string& dest_ae,
90 const std::
string& study_uid,
91 const std::
string& patient_id,
103 const std::
string& called_ae,
104 const std::
string& query_level,
125 const std::
string& alert_description);
145 [[nodiscard]]
bool is_enabled() const noexcept;
IHE ATNA-compliant audit message generator (RFC 3881 XML format)
Syslog transport for ATNA audit messages (RFC 5424/5425/5426)
High-level facade for emitting ATNA audit events from DICOM services.
size_t events_failed() const noexcept
Get the number of audit event send failures.
void audit_authentication(const std::string &user_id, bool is_login, bool success)
Audit a User Authentication event.
void set_enabled(bool enabled) noexcept
Enable or disable audit event emission.
size_t events_sent() const noexcept
Get the number of audit events successfully sent.
std::atomic< bool > enabled_
Whether audit is enabled.
bool is_enabled() const noexcept
Check if audit event emission is enabled.
std::string audit_source_id_
Audit source identifier (e.g., "PACS_SYSTEM_01")
void audit_query(const std::string &calling_ae, const std::string &called_ae, const std::string &query_level, bool success)
Audit a C-FIND (Query) event.
void send_audit(const atna_audit_message &message)
Send an audit message via syslog transport.
const atna_syslog_transport & transport() const noexcept
Get the underlying transport (for advanced use)
atna_service_auditor(const syslog_transport_config &config, std::string audit_source_id)
Construct an auditor with syslog transport configuration.
std::atomic< size_t > events_failed_
void audit_security_alert(const std::string &user_id, const std::string &alert_description)
Audit a Security Alert event (e.g., access denied)
const std::string & audit_source_id() const noexcept
Get the audit source identifier.
std::atomic< size_t > events_sent_
Statistics.
atna_service_auditor(const atna_service_auditor &)=delete
~atna_service_auditor()=default
atna_service_auditor & operator=(const atna_service_auditor &)=delete
void reset_statistics() noexcept
Reset statistics counters.
atna_syslog_transport transport_
Syslog transport for sending audit messages.
void audit_instance_stored(const std::string &source_ae, const std::string &dest_ae, const std::string &study_uid, const std::string &patient_id, bool success)
Audit a C-STORE (DICOM Instances Transferred) event.
Sends ATNA audit messages via Syslog protocol.
Complete RFC 3881 audit message.
Configuration for the Syslog transport.