User PII Cleanup
Last updated
Was this helpful?
Last updated
Was this helpful?
The user deletion requirement in inQuiry has been originated from the below requirement.
PRD:
BE Design Lern -
FE Design Lern -
The user can request for deletion of their account in Sunbird, this means two primary actions to happen.
User's Personal Identifiable Information (PII) needs to be removed
The assets (like questions, questionSets, content etc) that was created by this user needs to be transferred to an identified user.
Learn BB provided user delete api which produces a kafka event on <env>.delete.user topic.
For more details on the delete user api, please
PII data cleanup feature released under inQuiry 7.0.0 release.
inQuiry provided a flink job user-pii-data-updater for user PII data cleanup activity.
The flink job listen to <env>.delete.user kafka topic and process the data accordingly.
The job works for all object type (including Question, QuestionSet, Content, Collection, Assets) which are configured to the job.
The flink job will search for all the objects (configured with flink job) owned by deleted user and update the pii field configured under object schema(e.g: creator) to the pre-configured value (e.g: Deleted User / Anonymous user) with the flink job.
PII field configuration is part of each object schema (config.json) because there could be different pii field for each object.
Sample PII Config is as below:
Ref:
"PII_Fields": { "user": { "createdBy": ["creator"] }, "org": { } }
The job triggers a notification email to the org admin with all identifiers affected for Deleted user.
Release Tags:
InquiryUploadSchema
NA
NA
Deploy/Kubernetes/UploadSchema
InquiryKafkaSetup
NA
NA
Deploy/job/dev/job/KnowledgePlatform/job/InquiryKafkaSetup/
A new kafka topic <env>.delete.user has to be created for user-pii-data-updater flink job
InQuiryFlink Job
Build/job/KnowledgePlatform/job/InquiryFlinkJob
Deploy/job/dev/job/KnowledgePlatform/job/InquiryFlinkJob/
user_pii_updater_kafka_topic_name
Input Kafka Topic Name
{{ env_name }}.delete.user
user_pii_updater_group
Group Name For The Flink Job
{{ env_name }}-user-pii-updater-group
user_pii_target_object_types
Target Object Type and Schema Version should be configured as value . e.g: If you want to process 5 different objects for deleted user, then all 5 object types should be part of this configuration along with corresponding schema versions.
'{ "Question": ["1.0", "1.1"], "QuestionSet": ["1.0", "1.1"] }'
user_pii_replacement_value
The value which need to be inserted for target pii fields.
"Deleted User"
admin_email_notification_enable
This falg is used to enable/disable email notification for admin
true
user_org_service_base_url
Base Url of userorg service for sending notification
"http://{{private_ingressgateway_ip}}/userorg"
email_notification_subject
Subject Line for Email Notification
"User Account Deletion Notification"
email_notification_regards
Value For Regards in Email Notification
"Team"
If you are interested in adopting this feature by making code changes in your forked repository of sunbird, then please checkout below code and configuration changes: Code Changes: For user-pii-data-updater flink job code, please checkout the link below:
If the above topic already exists, you can skip this change.
For Variables used in below configuration, please refer to Variables Section Above.
schema tag: Note: the job should be re-imported using
A New Flink Job user-pii-data-updater is added. Config File Reference For Above Job:
Below changes need to be done for creating kafka topic needed by user-pii-data-updater-job:
Configuration Changes: Add below configuration in file:
Add below configuration in file: