Sunbird-RC / community

Repo to enable discussions, issue tracking & documentation for the Sunbird-RC projects
MIT License
12 stars 23 forks source link

[FEAT]: Feature PII data encryption #798

Closed holashchand closed 10 months ago

holashchand commented 1 year ago

What is the feature request for?

To preserve privacy of sensitive user data such as mobile, email, and other personally identifiable information (PII). This will be part of Registry Core.

What problem/inconvenience (if any) will this feature solve?

Currently, we mask / hash / encrypt only when data is exposed to /published to an external service (e.g. printing to log, metric service, response to GET API). But it is not masked in the registry database itself.

Describe the feature clearly.

If a strategy is specified, we should apply the relevant strategy and persist to the database. We will need to have a configuration to determine the strategy for fields. This can be held under the config section. If Masking/Hashing is specified as the strategy we cannot get the original data back from the registry. For encrypted data, we can decrypt and send back as part of the response to the Registry endpoints.

holashchand commented 1 year ago

One Edit on Encryption Support details:

  1. We have encryption supported for Private Fields
  2. For this we should enable encryption and add an external encryption service
  3. There are some cases where it doesn't work properly (TODO: check and update which all cases)
  4. It will be apply encryption for all private fields for all schemas

Open questions to be discussed

  1. Do we need encryption supported at schema level?
  2. Do we need to define encryption fields separately than private fields?
  3. Do we want an external service for encryption or in registry itself?
  4. Where and how we want to define encryption type? or even not require in case of external service?

Feel free to answer or add another questions or add any comment related to this

surendrasinghs commented 1 year ago

Update:

This will be available at registry level for now, we can build a quick reference encryption/decryption service to handle this with a support for an external encryption service as well.

ETA for reference encryption service - 21st Sept 2023 Thursday.

holashchand commented 1 year ago

https://github.com/Sunbird-RC/sunbird-rc-core/pull/255

srprasanna commented 10 months ago

This functionality is release as part of 1.0.0