Delete User Functionality
Last updated
Last updated
The user deletion requirement in Lern has originated from the below requirement.
PRD: [PRD] Delete Account functionality
BE Design Lern - [Design] Delete Account Functionality
FE Design Lern - [Design] [Front-end]Delete User Functionality
The user can request for deletion of their account in Sunbird, this means two primary actions to happen.
The user's Personal Identifiable Information (PII) needs to be removed
The assets created by this user (such as questions, question sets, content, etc.) need to be transferred to an identified user.
OnboardAPIs
NA
NA
Deploy/Kubernetes/OnboardAPIs
To onboard the delete user API
Cassandra Migration
Build/Core/Cassandra
Deploy/Kubernetes/Cassandra
Select the sunbird in cassandra_keyspace_to_migrate while deploying
script_repo_branch_or_tag: release-7.0.0_RC3
UserOrg Service
Build/Core/UserOrg
Deploy/Kubernetes/UserOrg
Kafka Setup
NA
NA
Deploy/Lern/KafkaSetup
DataPipeline
Build/Lern/LernFlinkJobs
Deploy/Lern/LernFlinkJobs
Define the core_vault_sunbird_keycloak_user_federation_provider_id in Lern inventory secret. Add user-deletion-cleanup and ml-user-delete into job list and deploy it.
Data Product
Build/Lern/LernDataProducts
Deploy/Lern/LernDataProducts
https://github.com/Sunbird-Lern/data-pipeline/tree/release-7.0.0/user-org-jobs/user-deletion-cleanup
For making the delete user functionality work through the flink job, the adapter needs to trigger the kafka event, For more details about that refer the below link,
For more details on the user deletion cleanup flink job, please visit
This flink job was introduced as part of the 7.0.0 release, if any adopter wants to use this feature before the release have to configure and use this flink job.
Added below partition related settings and replication_factor related settings in ansible/roles/setup-lern-kafka/defaults/main.yml file of data pipeline repository.
Added below user delete flinkjob related configuration in kubernetes/helm_charts/datapipeline_jobs/values.j2 file of data pipeline repository.
Added below user delete flinkjob related configuration in kubernetes/ansible/roles/flink-jobs-deploy/defaults/main.yml of data pipeline repository
This report was introduced as part of the 8.0.0 release, if any adopter wants to use this feature before the release have to use the above flink job
Added below ownership transfer delete user assets report related configuration in ansible/roles/lern-data-products-deploy/templates/lern-model-config.j2 of data products repository.
Added below ownership transfer delete user assets report related configuration in ansible/roles/lern-data-products-deploy/templates/lern-run-job.j2 of data products repository
Added below ownership transfer delete user assets report related configuration in lern-data-products/src/main/resources/application.conf of data products repository.
To learn more about Delete user Assets report visit here Jenkins Job Details For the deployment of the above flink job:
To trigger the job: Deploy/Lern/LernAnalyticsReplayJobs
job_id: Set to delete-users-assets-report-job.
specific_user_id / user_id_filter: Set to an empty string "". if you want to get the report for all deleted users you can provide multiple user IDs separated by commas within double quotes, like "a, b"
refresh_user_data / channel filter: Set to an empty string "". If you want to get the report for all channels or you can provide multiple channel IDs separated by commas within double quotes, like "a, b" then trigger
This API was introduced as part of the 7.0.0 release and can be used directly from this release. Before to this release adopters have to use either the flink job or extend this logic
Delete user API
Added the below configuration in the user org service application.conf file of user org service
Added the below property in external resource.properties related to user delete kafka topic in user org service
Added the below configuration in ansible/roles/kong-api/defaults/main.yml for owuser delete API in sunbird devops repository.
Added the user delete topic to the userorgservice.env file in Sunbird DevOps repository.