Aug 6, 2023 11:21:38 PM
Qlik Sense allows for Data Encryption for Qlik Sense Apps (QVF) and Data (QVD) Files.
This feature was originally introduced in September 2019 as a feature flag and fully implemented in the Management Console in November 2019.
This article includes instructions for both.
Qlik Sense Engine can encrypt data by using a data encryption key (DEK), which is generated from a certificate based key encryption key (KEK). The DEK is unique to each encrypted file and is stored along side the encrypted data (inside the QVF and QVD files) in an encrypted format using RSA. The industry standard AES-256 GCM is used as the data encryption algorithm. Decryption requires access to the same certificate as used during encryption, which mean that the KEK certifcate thumbprint in certificate store must match the thumbprint used for the DEK generation.
Data encryption can be enabled in the Service Cluster configuration of the Qlik Sense Management Console. See the Online Help at Qlik Sense Enterprise on Windows > Administer Qlik Sense Enterprise on Windows > Managing a Qlik Sense Enterprise on Windows site > QMC resources overview > Service cluster > Data encryption
This is a simple example of how to explore data encryption in Qlik Sense Enterprise on Windows.
ASCII: Load if(RecNo()>=65 and RecNo()<=90,RecNo()-64) as Num, Chr(RecNo()) as AsciiAlpha, RecNo() as AsciiNum autogenerate 255 Where (RecNo()>=32 and RecNo()<=126) or RecNo()>=160 ;
STORE ASCII INTO [lib://MyData (domain_administrator)/ascii.qvd] (QVD);
New-SelfSignedCertificate -Subject "QlikSenseDataEncrytion" ` -KeyAlgorithm RSA ` -KeyLength 4096 ` -Provider "Microsoft Software Key Storage Provider" ` -KeyExportPolicy ExportableEncrypted ` -CertStoreLocation "cert:\CurrentUser\My"
New-SelfSignedCertificate -DnsName "QlikSenseDataEncrytion" ` -CertStoreLocation "cert:\CurrentUser\My"
Files remain encrypted after disabling encryption until next following app reload or QVD generation.
Compare the unencrypted and encrypted files to validate successful encryption
Qlik Sense app (.qvf) file is a binary file, which makes it harder to visually confirm the encryption effect.
Encrypted app files have multiple references to ciphertext, which in turn refers to secrets used for the encryption.
App file without encryption has no such references. The cypher text portion of QVF represents the data encryption key (DEK) used to encrypt the app data and bookmarks.
Encrypted data (.qvd) files has "Encryption Info" defined, which includes the data encryption (DEK) references.
Data part is also significantly different, even though both version have exactly the same static data content.
Data encryption feature was soft-launched in September 2019 release. This means that the feature and functionality were included in the release, but are not enabled and exposed by default in the product.
{ "contentHash": "10159d595f5fa3bd250e90f30b1b7bf3", "originalClassName": "FeatureToggle", "flag": "DATA_ENCRYPTION", "enabled": true }
Qlik Sense on Windows: Data Encryption Key Rotation
Using Server Certificates for Data Encryption
Hi @ToniKautto ,
thank you very much for this article.
Let's imagine, that in my environement, i have 2 Qlik Sense servers. If i enable Data Encryption on both of them, using the same certificate, a QVD file generated by one of the Qlik Sense Servers could be read by the other one ?
Thanks a lot
Johann
@jchoucq correct, encrypted QVDs can only be decrypted with the same certificate that was used when encrypting the data.
In the example provided, it appears you are using the Current User \ Personal cert store; in a production environment, I would think the cert store utilized to be the Current Machine\Personal (especially if the user doesn't exist on each machine...); correct?
Hello @rbpeterson2
Certificates should be stored in current users as per Encryption Certificates.
Quote: Encryption keys are best managed through certificates. The certificates must be stored in a certificate store for the user running the Engine service, see User accounts.
All the best,
Sonja
Is it possible to encrypt the CSV file which is created using store command ?