Actions

Mã hóa dữ liệu

From LimeSurvey Manual

Revision as of 08:12, 10 January 2024 by Maren.fritz (talk | contribs) (Created page with "===Thuộc tính câu hỏi=== Thuộc tính câu hỏi "Đã mã hóa" được sử dụng để kích hoạt mã hóa dữ liệu cho các câu trả lời tương ứng. T...")



Giới thiệu

Mã hóa dữ liệu là một tính năng mới được cung cấp trong LimeSurvey 4. Nó được tạo ra để giúp quản trị viên khảo sát đối phó tốt hơn với các quy định bảo vệ dữ liệu mới được áp dụng ở nhiều nơi trên thế giới (ví dụ: GDPR).

Tính năng này cho phép mã hóa dữ liệu cá nhân nằm trong cơ sở dữ liệu người tham gia trung tâm và/hoặc bảng người tham gia khảo sát. Ngoài ra, bạn cũng có thể mã hóa dữ liệu bạn thu thập từ người trả lời nếu thuộc tính câu hỏi mã hóa được bật.

Xin lưu ý rằng dữ liệu của bạn sẽ luôn hiển thị trong giao diện LimeSurvey. Chỉ các mục cơ sở dữ liệu mới được mã hóa - không ai truy cập vào máy chủ nơi bạn lưu trữ LimeSurvey có thể hiển thị dữ liệu tương ứng. Do đó, vui lòng chú ý đến người mà bạn cung cấp quyền toàn cầu và khảo sát.


Template:Cảnh báo

Template:Lưu ý

Khi nào cần mã hóa dữ liệu của bạn?

Không có một câu trả lời đúng cho câu hỏi này. Nó phụ thuộc rất nhiều vào:

  • loại dữ liệu bạn thu thập
  • nơi khảo sát của bạn dựa trên
  • luật pháp quốc gia hoặc liên bang

Trong hầu hết mọi trường hợp, điều quan trọng là phải mã hóa dữ liệu nhận dạng cá nhân (ví dụ: như được khuyến nghị trong Quy định chung về bảo vệ dữ liệu). Do đó, các trường như tên, họ, địa chỉ email, số điện thoại, địa chỉ, v.v. có thể được sử dụng để xác định phản hồi mà một người đã gửi.

Trong các trường hợp khác, dữ liệu cần được mã hóa không nhất thiết chỉ dừng lại ở các ví dụ được cung cấp ở trên. Trong một số trường hợp nhất định (ví dụ: trong nghiên cứu y học), bạn có thể cần mã hóa hầu hết dữ liệu của mình nếu bạn có thể theo dõi lại phản hồi của người đã gửi chúng.

Do đó, vui lòng điều chỉnh cuộc khảo sát và thu thập dữ liệu của bạn cho phù hợp với luật pháp địa phương!

Cài đặt

Có ba vị trí trong LimeSurvey nơi bạn có thể đặt cài đặt mã hóa dữ liệu:


Thuộc tính câu hỏi

Thuộc tính câu hỏi "Đã mã hóa" được sử dụng để kích hoạt mã hóa dữ liệu cho các câu trả lời tương ứng. Thuộc tính này được tắt theo mặc định. Sau khi khảo sát được kích hoạt, bạn không thể thay đổi thuộc tính này.



Participant attributes

Three core attributes (firstname, lastname, and email) are always shown in the survey participants table, the encryption being turned on by default.

Each new participant attribute will have encryption turned off by default.

Encryption can be turned on or off at any moment.



Central participant database attribute management

Three core attributes (firstname, lastname and email) are always shown in the central participant database, the encryption being turned on by default.

Each new participant attribute will have encryption turned off by default.

Encryption can be turned on or off at any moment.


Advanced

Sodium library is used to provide data encryption and decryption functionality for LimeSurvey.

Sodium is a modern, easy-to-use software library for encryption, decryption, signatures, password hashing and more. It is a portable, cross-compilable, installable, packageable fork of NaCl, with a compatible API, and an extended API to improve usability even further. Its goal is to provide all of the core operations needed to build higher-level cryptographic tools.


Sodium is cross-platforms and cross-languages. It runs on a variety of compilers and operating systems, including Windows (with MinGW or Visual Studio, x86 and x86_64), iOS and Android. Javascript and WebAssembly versions are also available and are fully supported. Bindings for all common programming languages are available and well-supported.


Version 7.2.0 and newer of the PHP programming language includes the Sodium extension (referred to as ext/sodium) as a core cryptography library. Version 2 of the PHP extension in PECL is compatible with ext/sodium in PHP 7.2.


LimeSurvey uses the Sodium Compat library to bridge with different PHP versions. This library tentatively supports PHP 5.2.4 - 7.x (latest), but officially it only supports non-EOL'd versions of PHP.


Data encryption/decryption methods used in LimeSurvey are based on public-key signatures. Public and secret keys can be found in /application/config/security.php file. Keys are automatically generated on first usage of encryption feature.


  Warning : Once data encryption is turned on, data in corresponding database columns would become unreadable without decrypting them first. You should always have a backup of your encryption keys in case they get deleted. Also, once encryption keys are set, you should never change them because it would make all existing data unusable.



Partial string search won't be possible for database columns with encrypted data, only exact match search.

Errors

Possible errors when using data encryption:

  • library doesn't exists: PHP Sodium library have to be installed to be able to use data encryption feature. Here is a guide on how to install library: Sodium installation. If you don't want to use data encryption, you have to disable encryption in attribute settings.
  • wrong decryption key: decryption key has changed since data was last saved, so data can't be decrypted. The only way to decrypt data is to retrieve the original key from backup and replace the current decryption key with the original key.

Note: if the wrong decryption key error happens only when LimeSurvey sends an email (e.g. when you concluded a survey), go in Configuration > Global Settings > E-mail settings, and re-insert your STMP password and press Save.[1]

Otherwise, you can still try to compare and eventually recover your decryption keys from a backup (since you do backups... isn't it? Uh?).