-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding data type to encrypted column in AcraServer encryption configuration #442
Comments
@wdesplas totally makes sense, thank you for your request. Adding data type to the AcraServer's encryption configuration file – that's a feature in our backlog. More about this feature and security design issues behind it.It would be very useful to define data types of encrypted columns. However, there are certain design complexities that didn't allow us to simply add this feature to Acra. Imagine, that data is stored encrypted for certain field, it has binary type. When authenticated application reads encrypted data from a database, AcraServer decrypts it, converts into desired data type, and sends back to the app. All smooth. However, if application is not authenticated, or doesn't have correct keys, AcraServer won't be able to decrypt encrypted data, and won't be able to convert it to desired data type. Depending on security requirements and business logic, "can't decrypt" situation might be considered as error, as security issue or as part of a normal application flow. Right now, Acra's users decide how to handle these situations depending on their security requirements and often put this logic into application code. For example, sending security event to SIEM if data field wasn't successfully decrypted. If your concern is related to wording, will changing this line to "without much altering the application code" help? |
@vixentael : regards, |
I am facing the same issue trying to transparently encrypt 2 columns of a postgres table and these columns are of postgres datatype text and hold simple text values. The result returned for my select queries is the hex encoded string. Please let me know if there is any other config file where I can specify the data type of these columns and also if i can specify the dialect of my postgres db? Also I keep seeing the error "ignoring error of non parsed sql statement" in the acra server logs though there is no one connecting to my acra server. Is it continously polling my encryptor config file and framing a select query against the postgres db with the columns configured in there? |
@wdesplas , @pvleap, recently we have released a new version of Acra with new features like transparent tokenization that supports string/text types in databases. You can find out more details on our documentation site about configuration AcraServer's encryptor config and about tokenization |
just for future reference - fix to this (fully transparent mode without all those type concerns) is coming in 0.92-0.93, with limited scope first (not all types will be supported, but most). I will update this issue when that happens. |
Hey @9gunpi, any updates on the progress of full transparent mode with types support? |
@kumar1202 work in progress. That's not the easiest thing to do considering all the features of SQL protocol. We have progress with PostgreSQL, working on MySQL now. Type awareness is scheduled to the nearest releases. |
Hey @vixentael, is this feature supported in Enterprise edition? As I was reading through the comparisons table, and found that format preserving encryption is supported in EE. |
@kumar1202 format preserving encryption is different from type awareness. Type awareness means that it's possible to "tell" AcraServer the original data types of the columns. During encryption, AcraServer will encrypt fields to binary, the database will store fields as binary. During decryption, AcraServer will decrypt fields and cast them to the original data type, so that the application receives decrypted data fields as expected in most cases. Transparent for app, minimum code changes. Type awareness is a big feature for the upcoming 0.93 release which is scheduled before end of May. It might happen next week, if we are lucky and all edge cases are found, or later in May, if we find more ORMs that behave weird. The feature is ready, we are hunting edge cases and updating playgrounds. This is what this issue is about. Type awareness will be available for both Acra CE and Acra EE. Acra provides different security controls that suit best for different use cases, security guarantees and tech limitations. For some cases, encryption is enough, for others tokenization + encryption, or even masking + tokenization + encryption. Our goal here to give understandable tools with high security guarantees without requiring companies to actually send their sensitive data to a "magic saas". |
Actually, you can see how type awareness will work if you look at these PRs: https://github.com/cossacklabs/acra-engineering-demo/pull/47/files These PRs are updating Acra's engineering examples, and we are waiting for 0.93 release before merging them. As I mentioned, type awareness is working for 90% use cases right now, while we are fighting edge cases and interesting SQL protocol caveats trying to release as stable build as possible. |
hey, @vixentael
|
Let me answer:
|
@Lagovas Thanks for the reply. |
@kpsinghlubana let's step back from the definitions and discuss your use case. what exactly are you trying to do? yes, tokenization allows to leave the format of original data column, put a non-sensitive token there, but place a real encrypted data into separate column/database. |
Tadam! 🍉 Acra 0.93 release brings Type Awareness! This release brings type awareness which improves transparent encryption on AcraServer. Type awareness means that it's possible to tell AcraServer what are the original data types for fields. During decryption, AcraServer will convert decrypted fields to their original data types. No need to change client application code to work with "binary data". It's also possible to choose a default value for each data field if its decryption failed. AcraServer can send a a default value like Usage examples are in the acra engineering demo repository Here is how configuration files looks like: Docs: It might look like a simple feature, but under the hood it required to significantly improve SQL parser and handle edge cases that modern ORMs bring to the table (when they hide SQL from end developers, making their life easier, but our life more complicated). cc @wdesplas @pvleap @kumar1202 Kudos to Acra maintainers: @Lagovas @ZhmakaAS @G1gg1L3s @iamnotacake @shadinua @9gunpi and @vixentael :) |
issues:
In the documentation, this is mentioned :
However, There is not possibility for my not editable application to work with this proxy as :
Expected behaviour :
As a transparent proxy user , I expect to have to define the database field type either in the acra server/connector configuration and in the database (change encrypted field into binary field) but not in the application code.
Regards,
The text was updated successfully, but these errors were encountered: