No announcement yet.

Encrypt contents of channels

  • Filter
  • Time
  • Show
Clear All
new posts

  • Encrypt contents of channels

    I am implementing a channel with a database writer. The writer will access the database of my application so it need to provide a database password.
    Mirth stores the channel on it's internal database where the password of my database can be easily retrieved.
    In general a potential hacker will be able to see how a channel works and this is a big security vulnerability.
    Ideally I would like the channels to be encrypted when stored on the database (as data at rest). Is this supported, is there an other workaround?


  • #2
    Encrypt contents of channels

    when a channel is saved it is stored at rest in the mirth's internal database. The channel contents like the receiver, the destinator and the java script code (if any) can be easily read by simply editing the relevant database files located in the appdata directory. So, a hacker can easily read the channel.

    In my case I need a database writer that will save in the medical application's database personal private data. The data will be encrypted and there will be a channel with a java script that will contain an encryption key and db password.

    So if someone steals the server, he could simple open the channel find out the password and encryption key and read the medical database. Is there a method to fill this security hole? Ideally, I would like the channel contents to be encrypted when saved on Mirth's db. Since the mirth admin is password protected they couldn't (easily) read the channels.

    I have been through all the Mirth relevant security options like encrypting message contents etc but haven't found something about this issue.

    Thanks a lot


    • #3
      I was unable to find a configuration setting for this encryption.

      Can this been done at the JDBC driver level?


      Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

      Appliance Version 3.11.4
      Mirth Connect Version 3.8.0
      Java Version 1.6.0_45-b06
      Java (64 bit) Version 1.6.0_45-b06
      Java 7 (64 bit) Version 1.7.0_151-b15
      Java 8 (64 bit) Version 1.8.0_181-b13
      PostgreSQL Version 9.6.8


      • #4
        If they can hack your Mirth Database, wouldn't they also be able to hack the Medical Database too? The purpose of a database is to have all the security needed. If they can get into your Mirth DB, they are going to get into the rest too. What DB are you running for Mirth?


        • #5
          You mean to implement the database part on a java library which should be obfuscated. It is a solution. Disadvantages are the much more effort to implement/maintain and I believe that java code would be easier to reverse engineer as the key on the java code will not be really encrypted.

          I would like to see the channels stored encrypted in a future mirth version though. It should be pretty easy add-on.

          Thanks a lot for you for your suggestion, but are there any other workarounds?
          Last edited by dharrys; 07-14-2017, 12:16 AM.


          • #6
            On my database I have the sensitive fields encrypted using 256 AES keys, if mirth could do something similar it will be excellent.
            Last edited by dharrys; 07-14-2017, 12:16 AM.


            • #7
              I think you should talk to your DBA and IT guys for this question. What cbarlow said is actually right. If you think mirthDB is vulnerable (which I doubt) rest is vulnerable too.
              HL7v2.7 Certified Control Specialist!


              • #8
                Thanks for your answer. Didn't want to go a lot on the insights but if you open the database files with a simple editor (or linux cat) you will be able to simply read the channels content like javascript code without needing any mirth or db password.

                There are solutions like encrypting the complete disk, dividing the key to three parts etc but if the mirth's db was also encrypted it would be a very simple and efficient solution. I would like some expert advice on how db encryption is handled when mirth is involved. This should be very common case for medical solutions.

                Btw after some research the suggestion by kirbykn2 about obfuscating the code in a java lib is not sufficient enough as the key would still be readable.