|
PACS System 0.1.0
PACS DICOM system library
|
ITI-43 Document Consumer actor. More...
#include <document_consumer.h>

Classes | |
| class | impl |
Public Member Functions | |
| document_consumer (http_options opts, signing_material signing) | |
| Construct an ITI-43 Document Consumer bound to a repository endpoint and a signing credential. | |
| document_consumer (document_consumer &&) noexcept | |
| document_consumer & | operator= (document_consumer &&) noexcept |
| document_consumer (const document_consumer &)=delete | |
| document_consumer & | operator= (const document_consumer &)=delete |
| ~document_consumer () | |
| kcenon::common::Result< document_response > | retrieve (const std::string &document_unique_id, const std::string &repository_unique_id) |
| Retrieve one document by its (documentUniqueId, repositoryUniqueId) pair. | |
| void | set_audit_sink (std::shared_ptr< kcenon::pacs::security::xds_audit_sink > sink) |
| Install an ATNA audit sink. | |
Private Attributes | |
| std::unique_ptr< impl > | impl_ |
ITI-43 Document Consumer actor.
Binds one repository endpoint and one signing credential. To query different repositories or sign with different certificates, instantiate multiple document_consumer objects.
The signing_material is reused from the Document Source type so a single deployment can share its WS-Security credential between the push (ITI-41) and pull (ITI-43) actors without re-declaring the struct.
Thread-safety: retrieve() is NOT reentrant per instance - callers must serialize retrieve calls per instance, or create one instance per worker thread. The underlying libcurl handle is owned by the impl and may not be shared between threads.
Definition at line 68 of file document_consumer.h.
| kcenon::pacs::ihe::xds::document_consumer::document_consumer | ( | http_options | opts, |
| signing_material | signing ) |
Construct an ITI-43 Document Consumer bound to a repository endpoint and a signing credential.
The endpoint in opts must be the Retrieve Document Set-b service URL on the Document Repository. The default http_options.soap_action ("urn:ihe:iti:2007:RegisterDocumentSet-b") is ITI-41-specific and is overwritten internally by the ITI-43 action URI before the POST. Callers need not clear it themselves.
Signing material is copied into the instance; the caller may then zeroize the original buffer. The constructor never throws - any material validation failure is deferred to retrieve() and surfaces as a typed error_code.
Definition at line 155 of file document_consumer.cpp.
|
defaultnoexcept |
|
delete |
|
default |
|
delete |
|
defaultnoexcept |
| kcenon::common::Result< document_response > kcenon::pacs::ihe::xds::document_consumer::retrieve | ( | const std::string & | document_unique_id, |
| const std::string & | repository_unique_id ) |
Retrieve one document by its (documentUniqueId, repositoryUniqueId) pair.
Sequence: validate identifiers -> build xdsb:RetrieveDocumentSetRequest SOAP envelope -> WS-Security sign Timestamp+Body -> POST plain SOAP (no outbound MTOM parts) over HTTPS -> receive multipart/related MTOM response -> parse root envelope and attachment parts -> verify_envelope_integrity on the response -> locate the DocumentResponse matching the requested uid and resolve its xop:Include to the attachment bytes.
TRUST CAVEAT: the response signature check is integrity-only - it binds the payload to the cert embedded in the response's BST, but does NOT validate that cert against a trust anchor. An on-path attacker who can serve any valid X.509 cert will pass this check. Full trust-chain validation is deferred to the Gazelle conformance integration (#1131). Callers relying on retrieve() for authenticity must not treat a successful Result as signer-authenticated.
All failure modes surface as typed error_code values; the function never throws across the API boundary. A Registry-reported Failure status or an absent DocumentResponse maps to consumer_response_document_not_found.
Definition at line 165 of file document_consumer.cpp.
References retrieve().
Referenced by retrieve().


| void kcenon::pacs::ihe::xds::document_consumer::set_audit_sink | ( | std::shared_ptr< kcenon::pacs::security::xds_audit_sink > | sink | ) |
Install an ATNA audit sink.
When set, retrieve() emits exactly one audit event per invocation
Definition at line 171 of file document_consumer.cpp.
References impl_, and kcenon::pacs::ihe::xds::document_consumer::impl::set_audit_sink().

|
private |
Definition at line 139 of file document_consumer.h.
Referenced by set_audit_sink().