Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Neo4J

  • Cassandra (In case of hierarchy)

  • Elastic Search

  • Redis (For Live Objects)

  • Cloud (ECAR Bundle)

Changes in inQuiry

...

  • No API changes required

  • A flink job has to be created to consume these 2 events.

  • In case of User Deletion,

    • The user name needs to be cleared out with a static default name (Deleted User). Refer

    • The User Name could be stored in the below attributes as per sunbird inQuiry schema,

      • creator

      • author

      • publisher

      • owner

    • The User Id (UUID) is stored in the below fields, this will be left as is.

      • createdBy

      • lastPublishedBy

      • lastUpdatedBy

      • lastSubmittedBy

...

  • A flink job will will be written to consume both message (user deletion and ownership transfer)

  • This flink job will only deal with two object type Question & QuestionSets.

  • Assets (appIcon, images/audio/video used as options/solutions) used under Question/QuestionSets will not be processed by this flink job.

    • Those assets should be processed by Knowlg Flink job as inQuiry uses only artifactUrl metadata of those assets. So no dependency from inQuiry functionality.

User deletion:

  • A Search will be triggered with user-id received in the message to collect the Question/QuestionSet identifiers.

    • search will be in the neo4j database.

  • On collected Identifiers, the flink job will start updating metadata (listed above) which will have User Name to “Deleted User“

    • For Question/QuestionSets With Live Status, A re-publish event will be triggered post primary database updates with no pkgVersion upgrade.

      • check the legal action

    • For any other status, only primary databases (graph + cassandra) will get updated

    • ES will get updated automatically when we update it in neo4j.

Ownership Transfer:

...

  • The job will have below configurations

    • Code Block
      # In this config, key will be search field and values will be target fields
      user_pii_search_and_target_keys={
      	"createdBy": ["creator", "originData.creator.name"],
      	"lastPublishedBy": ["publisher"]
      }
      
      # The value will be applied to target fields speicified in above config
      user_pii_replacement_value="Deleted User"
      
    • These configurations allows adopter to configure the job based on their schema

    • The job will process each key mentioned in the user_pii_search_and_target_keys and updated target fields.

    • If target field is a nested field, then it should be configured with DOT (.) separator.

    • If User has multiple roles e.g: CONTENT_CREATOR & CONTENT_REVIEWER then corresponding metadata’s (key used to search objects when user acted as creator and reviewer) should be configured as separate keys in user_pii_search_and_target_keys.

    • The configuration will have default values configured as per sunbird inQuiry schema. Adopter can override based on their requirement.

    • The job will only handle target fields with string data type.

  • A Search will be triggered with user-id received in the message to collect the Question/QuestionSet identifiers.

    • search will be in the neo4j database.

    • objects will be fetched from database in batches. a configuration will be given to decide number of objects in single batch (e.g: 50 objects in 1 batch).

  • On collected Identifiers, the flink job will start updating target metadata (listed above) which will have from-user-id with to-user-id

  • For Question/QuestionSets With Live Status, A re-publish event will be triggered post primary database updates with no pkgVersion upgrade.

  • For any other status

    User Name to the value configured in user_pii_replacement_value

    • for all status other than Retired , only primary databases (graph + cassandra) will get updated.

    • offline bundles will not be updated and continue to have the user PII information.

    • For object having Live status, redis cache will be cleared.

    • ES will get updated automatically when we the job update it in neo4j.

Discussion items

  • Retired questions and questionsSets can be left un-modified?

  • Bundles (ecar) also has these attributes. Needs update / republish

  • Old Version Bundles may also have these attributes. What should happen to them?

  • Should we update the Author Name? As there is no UUID for author.

    • If needs to be updated, we need user name (first name, last name) in the message from Lern for us to cross check if it is the same user name.

    • Creator can be different from author and sometimes the author name is added automatically as creator nameauthor metadata will be handled in the code, if creator metadata value is same as author, then author field will be also updated to the value configured in user_pii_replacement_value

Ownership Transfer:

Will be updated in Phase-2

Discussion items