Versions Compared

Key

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

Promotion Steps:

  • Data migration steps (migration script and config in attachment):-

    • Provide DB details in following environment variables

      • DB_PASSWORD

      • DB_HOST

      • DB_PORT

      • DB_USERNAME

      • DB_NAME'

    • Backup old tables

      • create table eg_user_backup_plaintext as (select * from eg_user);

      • create table eg_user_address_backup_plaintext as (select * from eg_user_address);

    • Delete foreign key referenced on ‘eg_user’ from ‘eg_userrole_v1’ temporarily until the data is transformed

      • ALTER TABLE eg_userrole_v1 DROP CONSTRAINT fk_user_role_v1;

    • Deploy user service build with encryption to run flyway migration (egov-user:11-user_changes_MT-800f319)

    • Clean tables of all plain text data

      • delete from eg_user_address;

      • delete from eg_user;

    • run migration

      • Script python package dependencies

        • import psycopg2

        • import sys

        • import json

        • import requests

        • import configparser

        • import logging

        • import os

      • Commands to run for migration

        • python3 user_migration.py config_user_useencryptionencryption.txt

        • python3 user_migration.py config_addssaddress_encryption.txt

    • Restore earlier deleted foreign key constraint

      • ALTER TABLE eg_userrole_v1 ADD CONSTRAINT fk_user_role_v1 FOREIGN KEY (user_id, user_tenantid) REFERENCES eg_user(id, tenantid) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION;

  • Service Builds:-

    • User service:-  egov-user:11-user_changes_MT-800f319

      • Set environment variable “DECRYPTION_ABAC_ENABLED” to false

    • User service copy for chatbot:- egov-user-chatbot:4-user_changes_MT-621fe60

Note: Promote only if whatsapp chatbot is already running in the system, it uses another copy of user service named “egov-user-chatbot“. Not needed if whatsapp- chatbot is not in the system.

  • Report service:- report:22-report-encryption-changes-e92c8ae

  • Encryption

    enc-service:- egov-enc-service:4-master-f47bff2

...