Tuesday, June 18, 2019

ACME is not appropriate for Heathcare use

There is a new standard from IETF -  ACME -- https://datatracker.ietf.org/doc/rfc8555/

Abstract

   Public Key Infrastructure using X.509 (PKIX) certificates are used
   for a number of purposes, the most significant of which is the
   authentication of domain names.  Thus, certification authorities
   (CAs) in the Web PKI are trusted to verify that an applicant for a
   certificate legitimately represents the domain name(s) in the
   certificate.  As of this writing, this verification is done through a
   collection of ad hoc mechanisms.  This document describes a protocol
   that a CA and an applicant can use to automate the process of
   verification and certificate issuance.  The protocol also provides
   facilities for other certificate management functions, such as
   certificate revocation.
The ACME protocol is the standardized variant of "Lets Encrypt" certificate issuance. This is NOT appropriate for healthcare use, as this model of certificate management is primarily intended to make the process of server identity proofing as fast as possible. The intended result is that more web servers would support TLS encryption, with the restriction that there is no authentication of the identity proofing. 

This is very counter to the use of certificates and TLS in healthcare as recommended by IHE-ATNA profile. The ATNA profile specifically focuses on mutual-authentication using TLS to a locally known trusted authority. In this profile we explicitly explain that this model should NOT use the certificate store that is managed by web-browsers. This ACME model weakens even the web-browser certificate management.

I would recommend against any use of ACME for ATNA based secure node or secure application; and would recommend against use of ACME managed certificate for ANY healthcare traffic, even simple HTTP based traffic.

Thursday, June 13, 2019

XDS sha-1 is still okay

I get the following question about every other month. Here is the version I just responded to:

In this project I encountered a requirement to use SHA-256. Apparently this was in reaction to the SHA-1 collision vulnerability (https://shattered.io/) from late 2017. IHE XDS requires the hash to be SHA-1. Have you heard of any requests to change that?

There is no requirement in IHE that a Document Consumer must check the size+hash against the document they have received. This would be a policy choice. This is a policy choice that IHE does enable. That is to say that IHE includes a requirement to set the size/hash value to enable this downstream check.  The main reason to not mandate it is that there are few cases where the normal transport, especially TLS, doesn't already confirm integrity. If we added mandatory check of the hash/size, then we would need to express what must then be done if a failure is detected.

Intended failure detection

The hash element is intended to be used with the size element to detect storage, encoding, or transport errors. Where a Document Consumer receives the metadata (DocumentEntry) from a Query from the Registry; and the Document Consumer receives the document via Retrieve transaction from the Document Repository; the check of size+hash is a mechanism available to the Document Consumer to assure that the document they got is very likely the document described by the DocumentEntry.

In the most distributed configuration of XDS there is one Registry managed centrally, and many Repository servers maintained at each of the custodians of the documents. The kind of errors this can detect are errors such as bit loss while in storage, encoding loss due to errors in encoding algorithms, or transport failures due to multiple hops or intermediary.

Note in the diagram above, that the Green line is the pathway the DocumentEntry follows, where as the Orange line is the pathway the Document follows. The loops represent persistence for hours or decades.

The other transport options in the Document Sharing (XD*) family are less distributed, but the metadata is always separated from the Document itself.

The failures of sha-1 are all specifically failures to detect attack by a malicious and well-funded attacker. The failures of sha-1 are not the kind of failures that would randomly happen due to technical failures.  It is important that one recognize that XDS mechanism is both a sha-1 hash and a size. So an attacker must get a sha-1 collision without changing the size of the document. A determined attacker will just replace the hash/size elements in the Registry, for which this kind of successful attack would not matter if the hash was sha-1 or sha-256.

I emphasize that the size+hash is a mechanism that leverages the fact that the metadata (DocumentEntry) traverses a different pathway than the Document. They both are managed in different systems. So the intention of the size+hash is to detect technical (accidental) failures in these various systems and interconnections.

High Security

The metadata size+hash is not a high-security mechanism. If one is concerned about malicious acts of deception, then one must use Document Digital Signatures.

Document Digital Signatures would use SHA-256 (or better), and also have timestamp, purpose of the signature, and are counter signed by a verifiable identity backed by a certificate chained to a certificate authority that manages trust and revocation status. Without the signature across the hash, and a timestamp, one does not know that the digital signature is valid. 

So if an organization is really serious about digital signatures, then they should be mandating Document Digital Signature. Further, they must then make a clear policy on what Document Consumers must do, Such as when is it mandatory to check the signature, what is to be done if there is no signature, what is to be done if certificate revocation checking can't be done, what requirements of timestamp are necessary.

Once all this analysis of overhead involved in Digital Signatures discussion happens, they realize that this overhead is likely too expensive for the benefit. Backing back from that, they realize that sha-1 plus size checks are sufficient most of the time.

There is an alternative mechanism built into Document Digital Signature Profile that many people may not be aware of. This mechanism has been promoted by the Italian domain. The mechanism is to upon Provide and Register, they sign the SubmissionSet as a Document Digital Signature, and thus at any time downstream a Document Consumer can confirm that the documents they are using are those in the original SubmissionSet as published by the original Document Source. This Document Digital Signature is a end-to-end, but is not a declaration of the author.

Good for Intended use

I would never advocate for use of SHA-1 within a Digital Signature today... but the XDS mechanism is not a Digital Signature, it is an integrity protection. There is a high security mechanism in Document Digital Signatures or SubmissionSet signature.


Tuesday, June 11, 2019

Patient Engagement - Access Log

The HIPAA Accounting of Disclosures is obsolete and dangerous.

Patients are expected to become more engaged with their healthcare and do this using applications. Applications are sometimes software that runs on the Patient's phone, but sometimes software running at a third party cloud. Patients should not be expected to have done a software code review of these applications, and a legal review of the applications Privacy Policy. This would be ideal, but is simply not realistic.

I am using the word "applications" mostly generically, but clearly "FHIR Applications" are a proper subset of applications. As FHIR matures, this subset may become the only set of applications. This would be a good thing.

The Patient's choice of applications should be rather open ended, today. This eventually will become more constrained, but during this wild-wild-west time for healthcare applications we simply don't know enough about the potential good or bad that these applications might cause. I am sure there will be a set of these applications that are out-right-dangerous. I encourage us being open at this point because any rules we might put in place might inappropriately restrict good applications. With a few years into the future we will have a much better idea of how a community evaluation can help keep patients safe. 

But just because I think we should be open with allowing the applications, does not mean I trust them...

One small step that I would like to promote is that the healthcare provider that holds data on a patient MUST record all accesses to that data, and provide the patient visibility into that audit log. This is specifically recording of the API access requests made, and if they were successful or rejected. It is important to record the rejections and the successful transactions. It is also very important to record what was requested and what security token identity was used.

For the most part this audit log would be just the FHIR API "REST" activities.

REST operation logged on server (example)rest RESTful Operation[code] defined for operation CRUDAgent for logged in user, if available.
Search operation logged on server (example)rest RESTful Operation[code] defined for operationE ExecuteAgent for logged in user, if available, and one object with a query element.

This Access Log should include ALL access, not just those types of access that qualify as "Accounting of Disclosures". The Accounting of Disclosures has too many exceptions, and thus the report given to the patient is not valuable. It would especially not valuable for the Applications space.

This Access Log would include clinician accesses of the data, researcher accesses of the data, etc. But would also include logs of accesses that applications are claiming are on-behalf of the patient themselves.

The Access Log as I am speaking about it here is just the log that is maintained by a Healthcare data custodian, about the API accesses to the data on that patient in the control of that custodian. Where a Patient has many data holders, the patient would need to get a comprehensive audit log by gathering the audit logs from each of the custodians that they have data at.

Log analysis is not something that I expect that a Patient would know how to do, but once we have agreement that each Custodian would maintain a FHIR AuditEvent log of API access; then we can mandate that the custodian also provide a FHIR AuditEvent API access to that audit log. Once we have an API to the AuditEvent log of API calls; then someone can write Application that gathers the audit logs together and does analysis. This analysis would do typical audit log analysis looking for patterns, getting approval of a well understood pattern. Once well understood patterns are identified, then the application would alert the Patient when an unusual pattern is seen.

The IHE ATNA profile has been updated with full support for FHIR AuditEvent; so this is a really good specification to support this model.


Wednesday, June 5, 2019

IHE Audit Log Specifications

For those that struggle with the way that IHE documents the specific requirements of audit logging per type of security event or per ITI transaction; there is an easier tool. The IHE Gazelle "Security Suite" Tool has each audit log message broken down and explained.

My hope is that soon this tool is the way that IHE documents the transaction patterns, so that the supplements and technical-framework documents no longer have the ugly tables.

Here is what shows for the IHE ITI-2 User Authenticate Login message: 

The Gazelle tool is also used for Testing...

Here is the generic Security relevant events. These are expected of any application/service that participates in these security relevant events. DICOM -- PS3.15 - A.5.3


ITI-TF-2a 3.2.6 IHE - ITI-2 User Authentication Login
ITI-TF-2a 3.2.6 IHE - ITI-2 User Authentication Logout
ITI-TF-2a 3.10.5.1.2 IHE - ITI-10 Patient Identifier Cross-reference Consumer audit message
ITI-TF-2a 3.10.5.1.1 IHE - ITI-10 Patient Identifier Cross-reference Manager audit message
ITI-TF-2a 3.18.5.1.1 IHE - ITI-18 Document Consumer audit message
ITI-TF-2a 3.18.5.1.2 IHE - ITI-18 Document Registry audit message
ITI-TF-2a 3.21.5.1.1 IHE - ITI-21 Patient Demographics Consumer audit message
ITI-TF-2a 3.21.5.1.2 IHE - ITI-21 Patient Demographics Source audit message
ITI-TF-2a 3.22.5.1.1 IHE - ITI-22 Patient Demographics Consumer audit message
ITI-TF-2a 3.22.5.1.2 IHE - ITI-22 Patient Demographics Source audit message
ITI-TF-2b 3.32.5.1.1 IHE - ITI-32 Portable Media Creator Audit Message
ITI-TF-2b 3.32.5.1.2 IHE - ITI-32 Portable Media Importer Audit Message
ITI-TF-2b 3.38.4.1.4 IHE - ITI-38 Initiating Gateway audit message
ITI-TF-2b 3.38.4.1.4 IHE - ITI-38 Responding Gateway audit message
ITI-TF-2b 3.39.4.1.4 IHE - ITI-39 Initiating Gateway audit message
ITI-TF-2b 3.39.4.1.4 IHE - ITI-39 Responding Gateway audit message
ITI-TF-2b 3.41.5.1.2 IHE - ITI-41 Document Repository or Document Recipient audit message
ITI-TF-2b 3.41.5.1.1 IHE - ITI-41 Document Source audit message
ITI-TF-2b 3.42.7.1.2 IHE - ITI-42 Document Registry audit message
ITI-TF-2b 3.42.7.1.1 IHE - ITI-42 Document Repository or Integrated Document Source/Repository audit message