Hi Rick,
I noticed that you're now encrypting merchdb.dat, which contains the database passwords. We have about 20 custom modules that all fetch the database password from this file, so our store would break if we upgraded. Obviously, we've done this in a wrong way, but what is the right way?
1.) Can we decrypt the password ourselves from merchdb.dat? How is it encrypted in the first place, and with which key?
2.) Can we read the password from a global variable?
Secondly, I've contacted your support a few times to no avail regarding getting unencrypted payment data passed to a fulfillment module. Our fulfillment process *depends* on having access to order data, because it is mined heavily for real-time fraud scoring and AVS data, and it is the singular reason we've only had 2 chargebacks ever in 5 years and several million dollars in transactions. So this system clearly works.
But when Store Encryption is used, the payment data sent to the fulfillment module is also encrypted. We would break PCI if we hardcoded the decryption key, and we're also currently breaking PCI by running our store unencrypted, but flushing the payment data from the Miva database immediately after we've used it -- so it's being physically written to disk and deleted 0.01 seconds later.
Since the fulfillment module is a secure environment, I can't figure out why you're sending un-decryptable payment data to the fulfillment module -- and I would love to simply have misunderstood something simple.
But nevertheless, we need to come up with a solution that is PCI compliant. Assuming that you're intent on sending encrypted data to the fulfillment module, my next question is this:
Would it be possible for me to change the database schema for the Miva database to make pay_secdat a VARCHAR(1)? That way, the unencrypted payment data would be sent to MySQL, but it would be truncated beyond recognition. That would bring us closer to some sort of PCI compliance, but a malicious employee could reverse this simply by changing the field back to a Mediumtext, so I don't really know if it would pass a PCI code review -- but at least it would prevent the encrypted payment data from being written to disc, and merely held in memory for a short time while sent to MySQL. And even so, MySQL might actually cache the query to disc, which would write the unencrypted payment data in a cache file. So this might not be a very good solution, except to get some temporary security.
But what are you doing sending encrypted payment data to the fulfillment module in the first place? This is a safe environment, and our module is being called by *your* engine. If your environment is safe, then our module executes inside your safe environment, so it's bizarre that you would send encrypted payment data to the module, data that can only be unlocked by breaking PCI.
Our fulfillment module easily passes an independent PCI code review, but the issue that keeps coming up is that the only way to get OUR data in the first place is to configure the Miva store to not be encrypted, which thus creates an unescapable PCI problem no matter what we do.
Again, I would LOVE to just be an idiot and have misunderstood this and it's like "oh, you just have to get the payment data from this field instead". But it's really a problem. This single thing is stopping us from being PCI compliant. It's obviously not an option to stop fraud scoring, or manually babysit the data through every single stage of some new manual offline fraud scoring system we'd then have to program. That would be a giant, and extremely lame step down, and completely unnecessary, since everything is happening inside an environment that is supposedly secure. It's not right for the Miva engine to mistrust a friggin' fulfillment module so much that it treats it as enemy code.
I hope you'll tell me that I've misunderstood this whole thing.
Best,
Per
I noticed that you're now encrypting merchdb.dat, which contains the database passwords. We have about 20 custom modules that all fetch the database password from this file, so our store would break if we upgraded. Obviously, we've done this in a wrong way, but what is the right way?
1.) Can we decrypt the password ourselves from merchdb.dat? How is it encrypted in the first place, and with which key?
2.) Can we read the password from a global variable?
Secondly, I've contacted your support a few times to no avail regarding getting unencrypted payment data passed to a fulfillment module. Our fulfillment process *depends* on having access to order data, because it is mined heavily for real-time fraud scoring and AVS data, and it is the singular reason we've only had 2 chargebacks ever in 5 years and several million dollars in transactions. So this system clearly works.
But when Store Encryption is used, the payment data sent to the fulfillment module is also encrypted. We would break PCI if we hardcoded the decryption key, and we're also currently breaking PCI by running our store unencrypted, but flushing the payment data from the Miva database immediately after we've used it -- so it's being physically written to disk and deleted 0.01 seconds later.
Since the fulfillment module is a secure environment, I can't figure out why you're sending un-decryptable payment data to the fulfillment module -- and I would love to simply have misunderstood something simple.
But nevertheless, we need to come up with a solution that is PCI compliant. Assuming that you're intent on sending encrypted data to the fulfillment module, my next question is this:
Would it be possible for me to change the database schema for the Miva database to make pay_secdat a VARCHAR(1)? That way, the unencrypted payment data would be sent to MySQL, but it would be truncated beyond recognition. That would bring us closer to some sort of PCI compliance, but a malicious employee could reverse this simply by changing the field back to a Mediumtext, so I don't really know if it would pass a PCI code review -- but at least it would prevent the encrypted payment data from being written to disc, and merely held in memory for a short time while sent to MySQL. And even so, MySQL might actually cache the query to disc, which would write the unencrypted payment data in a cache file. So this might not be a very good solution, except to get some temporary security.
But what are you doing sending encrypted payment data to the fulfillment module in the first place? This is a safe environment, and our module is being called by *your* engine. If your environment is safe, then our module executes inside your safe environment, so it's bizarre that you would send encrypted payment data to the module, data that can only be unlocked by breaking PCI.
Our fulfillment module easily passes an independent PCI code review, but the issue that keeps coming up is that the only way to get OUR data in the first place is to configure the Miva store to not be encrypted, which thus creates an unescapable PCI problem no matter what we do.
Again, I would LOVE to just be an idiot and have misunderstood this and it's like "oh, you just have to get the payment data from this field instead". But it's really a problem. This single thing is stopping us from being PCI compliant. It's obviously not an option to stop fraud scoring, or manually babysit the data through every single stage of some new manual offline fraud scoring system we'd then have to program. That would be a giant, and extremely lame step down, and completely unnecessary, since everything is happening inside an environment that is supposedly secure. It's not right for the Miva engine to mistrust a friggin' fulfillment module so much that it treats it as enemy code.
I hope you'll tell me that I've misunderstood this whole thing.
Best,
Per
Comment