",10005,Registration,reg-preview-template-part,ara,TRUE,superadmin,now()
+1255,Modèle d'aperçu d'inscription,Preview generated after registration,txt,velocity,"
",10005,Registration,reg-preview-template-part,fra,TRUE,superadmin,now()
diff --git a/data-dml/mosip_master/dml/master-template_file_format.csv b/data-dml/mosip_master/dml/master-template_file_format.csv
new file mode 100644
index 00000000000..4670894f2dd
--- /dev/null
+++ b/data-dml/mosip_master/dml/master-template_file_format.csv
@@ -0,0 +1,13 @@
+code,descr,lang_code,is_active,cr_by,cr_dtimes
+txt,Text File,eng,TRUE,superadmin,now()
+xml,XML File,eng,TRUE,superadmin,now()
+json,Json File,eng,TRUE,superadmin,now()
+txt,ملف نصي,ara,TRUE,superadmin,now()
+xml,ملف XML,ara,TRUE,superadmin,now()
+json,ملف Json,ara,TRUE,superadmin,now()
+txt,Fichier texte,fra,TRUE,superadmin,now()
+xml,Fichier XML,fra,TRUE,superadmin,now()
+json,Fichier Json,fra,TRUE,superadmin,now()
+html,html file,eng,TRUE,superadmin,now()
+html,ملف html,ara,TRUE,superadmin,now()
+html,Fichier html,fra,TRUE,superadmin,now()
diff --git a/data-dml/mosip_master/dml/master-template_type.csv b/data-dml/mosip_master/dml/master-template_type.csv
new file mode 100644
index 00000000000..3f36e948972
--- /dev/null
+++ b/data-dml/mosip_master/dml/master-template_type.csv
@@ -0,0 +1,397 @@
+code,descr,lang_code,is_active,cr_by,cr_dtimes
+auth-email-content,Template for authorization content,eng,TRUE,superadmin,now()
+auth-email-subject,Template for authorization subject,eng,TRUE,superadmin,now()
+auth-sms,Template for authorization SMS,eng,TRUE,superadmin,now()
+ida-auth-otp-email-content-template,Template for Email Content,eng,TRUE,superadmin,now()
+ida-auth-otp-email-subject-template,Template for Email Subject,eng,TRUE,superadmin,now()
+ida-auth-otp-sms-template,Template for OTP in SMS ,eng,TRUE,superadmin,now()
+auth-email-content,قالب لمحتوى التخويل,ara,TRUE,superadmin,now()
+auth-email-subject,قالب لموضوع التخويل,ara,TRUE,superadmin,now()
+auth-sms,قالب لرسالة التفويض,ara,TRUE,superadmin,now()
+ida-auth-otp-email-content-template,قالب لمحتوى البريد الإلكتروني,ara,TRUE,superadmin,now()
+ida-auth-otp-email-subject-template,قالب لموضوع البريد الإلكتروني,ara,TRUE,superadmin,now()
+ida-auth-otp-sms-template,قالب كلمة المرور لمرة واحدة في الرسالة,ara,TRUE,superadmin,now()
+auth-email-content,Modèle de contenu dautorisation,fra,TRUE,superadmin,now()
+auth-email-subject,Modèle pour sujet dautorisation,fra,TRUE,superadmin,now()
+auth-sms,Modèle de SMS dautorisation,fra,TRUE,superadmin,now()
+ida-auth-otp-email-content-template,Modèle de contenu de courrier électronique,fra,TRUE,superadmin,now()
+ida-auth-otp-email-subject-template,Modèle pour sujet demail,fra,TRUE,superadmin,now()
+ida-auth-otp-sms-template,Modèle pour OTP dans SMS,fra,TRUE,superadmin,now()
+RPR_DUP_UIN_EMAIL,Template for duplicate UIN Email,eng,TRUE,superadmin,now()
+RPR_DUP_UIN_SMS,Template for duplicate UIN SMS,eng,TRUE,superadmin,now()
+RPR_TEC_ISSUE_EMAIL,Template for Technical Issue Email,eng,TRUE,superadmin,now()
+RPR_TEC_ISSUE_SMS,Template for Technical Issue SMS,eng,TRUE,superadmin,now()
+RPR_UIN_GEN_EMAIL,Template for UIN generation Email,eng,TRUE,superadmin,now()
+RPR_UIN_GEN_SMS,Template for UIN generation SMS,eng,TRUE,superadmin,now()
+RPR_UIN_UPD_EMAIL,Template for update details Email,eng,TRUE,superadmin,now()
+RPR_UIN_UPD_SMS,Template for update Details SMS,eng,TRUE,superadmin,now()
+RPR_DUP_UIN_EMAIL,قالب لبريد إلكتروني مكرر الهوية,ara,TRUE,superadmin,now()
+RPR_DUP_UIN_SMS,قالب لرسالة الهوية المكررة,ara,TRUE,superadmin,now()
+RPR_TEC_ISSUE_EMAIL,نموذج للبريد الإلكتروني لمشكلة فنية,ara,TRUE,superadmin,now()
+RPR_TEC_ISSUE_SMS,قالب لرسالة المشكلة الفنية,ara,TRUE,superadmin,now()
+RPR_UIN_GEN_EMAIL,قالب لتوليد الهوية البريد الإلكتروني,ara,TRUE,superadmin,now()
+RPR_UIN_GEN_SMS,قالب لرسالة توليد الهوية,ara,TRUE,superadmin,now()
+RPR_UIN_UPD_EMAIL,قالب للحصول على تفاصيل التحديث,ara,TRUE,superadmin,now()
+RPR_UIN_UPD_SMS,قالب لتحديث تفاصيل الرسالة,ara,TRUE,superadmin,now()
+RPR_DUP_UIN_EMAIL,Modèle de courrier didentité en double,fra,TRUE,superadmin,now()
+RPR_DUP_UIN_SMS,Modèle de message didentité en double,fra,TRUE,superadmin,now()
+RPR_TEC_ISSUE_EMAIL,Modèle pour courrier électronique de problème technique,fra,TRUE,superadmin,now()
+RPR_TEC_ISSUE_SMS,Modèle de message de problème technique,fra,TRUE,superadmin,now()
+RPR_UIN_GEN_EMAIL,Modèle de courrier électronique de génération didentité,fra,TRUE,superadmin,now()
+RPR_UIN_GEN_SMS,Modèle de message de génération didentité,fra,TRUE,superadmin,now()
+RPR_UIN_UPD_EMAIL,Modèle pour les détails de la mise à jour Email,fra,TRUE,superadmin,now()
+RPR_UIN_UPD_SMS,Modèle pour la mise à jour Détails Message,fra,TRUE,superadmin,now()
+NewReg-email-content-template,Template for new registration Email Content,eng,TRUE,superadmin,now()
+NewReg-email-subject-template,Template for new registration Email Subject,eng,TRUE,superadmin,now()
+NewReg-sms-template,Template for new registration SMS,eng,TRUE,superadmin,now()
+OTP-email-content-template,Template for OTP generation Email Content,eng,TRUE,superadmin,now()
+OTP-email-subject-template,Template for OTP generation Email Subject,eng,TRUE,superadmin,now()
+OTP-sms-template,Template for OTP SMS,eng,TRUE,superadmin,now()
+Update-email-content-template,Template for update registration Email Content,eng,TRUE,superadmin,now()
+Update-email-subject-template,Template for update registration Email Subject,eng,TRUE,superadmin,now()
+Update-sms-template,Template for update registration SMS,eng,TRUE,superadmin,now()
+NewReg-email-content-template,قالب للتسجيل الجديد محتوى البريد الإلكتروني,ara,TRUE,superadmin,now()
+NewReg-email-subject-template,قالب للتسجيل الجديد البريد الإلكتروني الموضوع,ara,TRUE,superadmin,now()
+NewReg-sms-template,قالب لرسالة التسجيل الجديدة,ara,TRUE,superadmin,now()
+OTP-email-content-template,قالب لتوليد OTP محتوى البريد الإلكتروني,ara,TRUE,superadmin,now()
+OTP-email-subject-template,قالب لتوليد OTP البريد الإلكتروني الموضوع,ara,TRUE,superadmin,now()
+OTP-sms-template,قالب لرسالة OTP,ara,TRUE,superadmin,now()
+Update-email-content-template,قالب لتحديث تسجيل محتوى البريد الإلكتروني,ara,TRUE,superadmin,now()
+Update-email-subject-template,قالب لتسجيل التحديث البريد الإلكتروني الموضوع,ara,TRUE,superadmin,now()
+Update-sms-template,قالب لرسالة تسجيل التحديث,ara,TRUE,superadmin,now()
+NewReg-email-content-template,Modèle pour nouvelle inscription Email Content,fra,TRUE,superadmin,now()
+NewReg-email-subject-template,Modèle pour nouvelle inscription Objet de le-mail,fra,TRUE,superadmin,now()
+NewReg-sms-template,Modèle de nouvelle inscription SMS,fra,TRUE,superadmin,now()
+OTP-email-content-template,Modèle de contenu de courrier électronique de génération dOTP,fra,TRUE,superadmin,now()
+OTP-email-subject-template,Modèle pour le sujet de-mail de génération dOTP,fra,TRUE,superadmin,now()
+OTP-sms-template,Modèle pour SMS OTP,fra,TRUE,superadmin,now()
+Update-email-content-template,Modèle pour lenregistrement de la mise à jour,fra,TRUE,superadmin,now()
+Update-email-subject-template,Modèle denregistrement de mise à jour Objet de le-mail,fra,TRUE,superadmin,now()
+Update-sms-template,Modèle pour SMS denregistrement de mise à jour,fra,TRUE,superadmin,now()
+Email-Acknowledgement,Template for Email Acknowledgement,eng,TRUE,superadmin,now()
+Onscreen-Acknowledgement,Template for Onscreen Acknowledgment,eng,TRUE,superadmin,now()
+otp-email-content-template,Template for OTP Email Content,eng,TRUE,superadmin,now()
+otp-email-subject-template,Template for OTP Email Subject,eng,TRUE,superadmin,now()
+otp-sms-template,Template for OTP SMS,eng,TRUE,superadmin,now()
+SMS-Acknowledgement,Template for SMS Acknowledgement,eng,TRUE,superadmin,now()
+Email-Acknowledgement,قالب لتأكيد البريد الإلكتروني,ara,TRUE,superadmin,now()
+Onscreen-Acknowledgement,قالب للشاشة شكر وتقدير,ara,TRUE,superadmin,now()
+otp-email-content-template,قالب لمحتوى البريد الإلكتروني OTP,ara,TRUE,superadmin,now()
+otp-email-subject-template,قالب لموضوع البريد الإلكتروني OTP,ara,TRUE,superadmin,now()
+otp-sms-template,قالب ل OTP SMS,ara,TRUE,superadmin,now()
+SMS-Acknowledgement,قالب للإشعار SMS,ara,TRUE,superadmin,now()
+Email-Acknowledgement,Template for email confirmation,fra,TRUE,superadmin,now()
+Onscreen-Acknowledgement,On-screen recognition template,fra,TRUE,superadmin,now()
+otp-email-content-template,OTP Email Content Template,fra,TRUE,superadmin,now()
+otp-email-subject-template,Template for OTP email subject,fra,TRUE,superadmin,now()
+otp-sms-template,Template for OTP SMS,fra,TRUE,superadmin,now()
+SMS-Acknowledgement,Template for SMS Acknowledgment,fra,TRUE,superadmin,now()
+Acknowledgement-email-subject,Template for email subject of Acknowledgement,eng,TRUE,superadmin,now()
+Acknowledgement-email-subject,قالب للتسليم البريد الكتروني الموضوع,ara,TRUE,superadmin,now()
+Acknowledgement-email-subject,Modèle pour le sujet d'email d'accusé de réception,fra,TRUE,superadmin,now()
+RPR_UIN_CARD_TEMPLATE,UIN card template,eng,TRUE,superadmin,now()
+RPR_UIN_CARD_TEMPLATE,قالب بطاقة UIN,ara,TRUE,superadmin,now()
+RPR_UIN_CARD_TEMPLATE,Modèle de carte UIN,fra,TRUE,superadmin,now()
+RPR_UIN_DEAC_SMS,Template for UIN Deactivation SMS,eng,TRUE,superadmin,now()
+RPR_UIN_DEAC_SMS,قالب لتعطيل UIN SMS,ara,TRUE,superadmin,now()
+RPR_UIN_DEAC_SMS,Modèle pour SMS de désactivation UIN,fra,TRUE,superadmin,now()
+RPR_UIN_DEAC_EMAIL,Template for UIN Deactivation Email,eng,TRUE,superadmin,now()
+RPR_UIN_DEAC_EMAIL,قالب لإلغاء تنشيط البريد,ara,TRUE,superadmin,now()
+RPR_UIN_DEAC_EMAIL,Modèle pour Email de désactivation UIN,fra,TRUE,superadmin,now()
+RPR_UIN_REAC_SMS,Template for UIN Reactivate SMS,eng,TRUE,superadmin,now()
+RPR_UIN_REAC_SMS,قالب لـ UIN تنشيط SMS,ara,TRUE,superadmin,now()
+RPR_UIN_REAC_SMS,Modèle pour UIN Réactiver SMS,fra,TRUE,superadmin,now()
+RPR_UIN_REAC_EMAIL,Template for UIN Reactivate Email,eng,TRUE,superadmin,now()
+RPR_UIN_REAC_EMAIL,قالب لـ UIN تنشيط البريد,ara,TRUE,superadmin,now()
+RPR_UIN_REAC_EMAIL,Modèle pour UIN Réactiver Email,fra,TRUE,superadmin,now()
+reg-sms-notification,Registration Acknowledgement Template,eng,TRUE,superadmin,now()
+reg-sms-notification,نموذج شكر التسجيل,ara,TRUE,superadmin,now()
+reg-sms-notification,accusé de réception,fra,TRUE,superadmin,now()
+reg-email-notification,Registration Acknowledgement Template,eng,TRUE,superadmin,now()
+reg-email-notification,نموذج شكر التسجيل,ara,TRUE,superadmin,now()
+reg-email-notification,accusé de réception,fra,TRUE,superadmin,now()
+consent,Consent,eng,TRUE,superadmin,now()
+consent,موافقة,ara,TRUE,superadmin,now()
+consent,Consentement,fra,TRUE,superadmin,now()
+auth-otp-email-subject-template,Auth OTP Email Subject Template,eng,TRUE,superadmin,now()
+auth-otp-email-subject-template,مصادقة OTP قالب موضوع,ara,TRUE,superadmin,now()
+auth-otp-email-subject-template,Modèle dobjet de-mail Auth OTP,fra,TRUE,superadmin,now()
+auth-otp-email-content-template,Auth OTP Email Content Template,eng,TRUE,superadmin,now()
+auth-otp-email-content-template,مصادقة OTP قالب محتوى,ara,TRUE,superadmin,now()
+auth-otp-email-content-template,Auth OTP Email ContentTemplate,fra,TRUE,superadmin,now()
+auth-otp-sms-template,Auth OTP SMS Template,eng,TRUE,superadmin,now()
+auth-otp-sms-template,مصادقة قالب رسالة OTP,ara,TRUE,superadmin,now()
+auth-otp-sms-template,Modèle SMS OTP Auth,fra,TRUE,superadmin,now()
+lostUIN-email-notification,فقدت قالب الاعتراف UIN,ara,TRUE,superadmin,now()
+lostUIN-email-notification,Lost UIN Acknowledgement Template,eng,TRUE,superadmin,now()
+lostUIN-email-notification,Modèle de reconnaissance UIN perdu,fra,TRUE,superadmin,now()
+lostUIN-sms-notification,فقدت قالب الاعتراف UIN,ara,TRUE,superadmin,now()
+lostUIN-sms-notification,Lost UIN Acknowledgement Template,eng,TRUE,superadmin,now()
+lostUIN-sms-notification,Modèle de reconnaissance UIN perdu,fra,TRUE,superadmin,now()
+updateUIN-email-notification,تحديث قالب شكر UIN,ara,TRUE,superadmin,now()
+updateUIN-email-notification,Updtae UIN Acknowledgement Template,eng,TRUE,superadmin,now()
+updateUIN-email-notification,Mise à jour du modèle d'accusé de réception UIN,fra,TRUE,superadmin,now()
+updateUIN-sms-notification,تحديث قالب شكر UIN,ara,TRUE,superadmin,now()
+updateUIN-sms-notification,Updtae UIN Acknowledgement Template,eng,TRUE,superadmin,now()
+updateUIN-sms-notification,Mise à jour du modèle d'accusé de réception UIN,fra,TRUE,superadmin,now()
+cancel-appointment,Template for Cancel Appointment,eng,TRUE,superadmin,now()
+cancel-appointment,قالب لإلغاء الموعد,ara,TRUE,superadmin,now()
+cancel-appointment,Modèle pour annuler un rendez-vous,fra,TRUE,superadmin,now()
+RPR_LOST_UIN_SMS,Lost UIN Notification SMS,eng,TRUE,superadmin,now()
+RPR_LOST_UIN_SMS,فقدت رسالة إعلام UIN,ara,TRUE,superadmin,now()
+RPR_LOST_UIN_SMS,SMS de notification UIN perdu,fra,TRUE,superadmin,now()
+RPR_LOST_UIN_EMAIL,Lost UIN Notification Email,eng,TRUE,superadmin,now()
+RPR_LOST_UIN_EMAIL,فقدت البريد الإلكتروني الإخطار UIN,ara,TRUE,superadmin,now()
+RPR_LOST_UIN_EMAIL,Email de notification UIN perdu,fra,TRUE,superadmin,now()
+RPR_MASKED_UIN_CARD_TEMPLATE,Masked UIN card template,eng,TRUE,superadmin,now()
+RPR_MASKED_UIN_CARD_TEMPLATE,قالب بطاقة UIN Masked,ara,TRUE,superadmin,now()
+RPR_MASKED_UIN_CARD_TEMPLATE,Modèle de carte Masked UIN,fra,TRUE,superadmin,now()
+RS_AUTH_HIST_SUCCESS_EMAIL,Authentication History Request Success Email,eng,TRUE,superadmin,now()
+RS_AUTH_HIST_SUCCESS_EMAIL,تاريخ طلب المصادقة,ara,TRUE,superadmin,now()
+RS_AUTH_HIST_SUCCESS_EMAIL,E-mail de réussite de la demande d'historique d'authentification,fra,TRUE,superadmin,now()
+RS_AUTH_HIST_SUCCESS_SMS,Authentication History Request Success SMS,eng,TRUE,superadmin,now()
+RS_AUTH_HIST_SUCCESS_SMS,تاريخ المصادقة طلب النجاح SMS,ara,TRUE,superadmin,now()
+RS_AUTH_HIST_SUCCESS_SMS,Historique de l'authentification des services résidents SMS de transcation,fra,TRUE,superadmin,now()
+RS_AUTH_HIST_SUCCESS_EMAIL_SUB,Authentication History Request Success EMAIL Subject,eng,TRUE,superadmin,now()
+RS_AUTH_HIST_SUCCESS_EMAIL_SUB,طلب سجل المصادقة النجاح عنوان البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_AUTH_HIST_SUCCESS_EMAIL_SUB,Succès EMAIL de la demande d'historique d'authentification,fra,TRUE,superadmin,now()
+RS_DOW_UIN_SUCCESS_EMAIL,Successful Download of e-UIN Email,eng,TRUE,superadmin,now()
+RS_DOW_UIN_SUCCESS_EMAIL,تنزيل ناجح للبريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_DOW_UIN_SUCCESS_EMAIL,Téléchargement réussi du courriel e-UIN,fra,TRUE,superadmin,now()
+RS_DOW_UIN_SUCCESS_EMAIL_SUB,Successful Download of e-UIN Email Subject,eng,TRUE,superadmin,now()
+RS_DOW_UIN_SUCCESS_EMAIL_SUB,تنزيل ناجح لموضوع البريد الإلكتروني UIN,ara,TRUE,superadmin,now()
+RS_DOW_UIN_SUCCESS_EMAIL_SUB,Téléchargement réussi de l'objet de l'e-UIN,fra,TRUE,superadmin,now()
+RS_DOW_UIN_SUCCESS_SMS,Successful Download of e-UIN SMS,eng,TRUE,superadmin,now()
+RS_DOW_UIN_SUCCESS_SMS,تنزيل ناجح لرسائل e-UIN SMS,ara,TRUE,superadmin,now()
+RS_DOW_UIN_SUCCESS_SMS,Téléchargement réussi de l'e-UIN SMS,fra,TRUE,superadmin,now()
+RS_LOCK_AUTH_SUCCESS_EMAIL,Successful Locking of Auth Types Email,eng,TRUE,superadmin,now()
+RS_LOCK_AUTH_SUCCESS_EMAIL,قفل ناجح لأنواع مصادقة البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_LOCK_AUTH_SUCCESS_EMAIL,Verrouillage réussi des e-mails des types d'authentification,fra,TRUE,superadmin,now()
+RS_LOCK_AUTH_SUCCESS_EMAIL_SUB,Successful Locking of Auth Types Email Subject,eng,TRUE,superadmin,now()
+RS_LOCK_AUTH_SUCCESS_EMAIL_SUB,قفل ناجح لأنواع مصادقة البريد الإلكتروني الموضوع,ara,TRUE,superadmin,now()
+RS_LOCK_AUTH_SUCCESS_EMAIL_SUB,Succès du verrouillage des types d'authentification,fra,TRUE,superadmin,now()
+RS_LOCK_AUTH_SUCCESS_SMS,Successful Locking of Auth Types SMS,eng,TRUE,superadmin,now()
+RS_LOCK_AUTH_SUCCESS_SMS,قفل ناجح لأنواع مصادقة الرسائل القصيرة,ara,TRUE,superadmin,now()
+RS_LOCK_AUTH_SUCCESS_SMS,Verrouillage réussi des types d'authentification SMS,fra,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_SUCCESS_EMAIL,Successful Unlocking of Auth Types Email,eng,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_SUCCESS_EMAIL,فتح ناجح لأنواع مصادقة البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_SUCCESS_EMAIL,Déverrouillage réussi des types d'authentification,fra,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_SUCCESS_EMAIL_SUB,Successful Unlocking of Auth Types Email Subject,eng,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_SUCCESS_EMAIL_SUB,فتح ناجح لأنواع مصادقة البريد الإلكتروني الموضوع,ara,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_SUCCESS_EMAIL_SUB,Déverrouillage réussi des types d'authentification Objet de l'e-mail,fra,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_SUCCESS_SMS,Successful Unlocking of Auth Types SMS,eng,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_SUCCESS_SMS,فتح ناجح لأنواع مصادقة الرسائل القصيرة,ara,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_SUCCESS_SMS,Déverrouillage réussi des types d'authentification SMS,fra,TRUE,superadmin,now()
+RS_VIN_GEN_SUCCESS_EMAIL,VID Generation Success Email,eng,TRUE,superadmin,now()
+RS_VIN_GEN_SUCCESS_EMAIL,VID جيل النجاح البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_VIN_GEN_SUCCESS_EMAIL,E-mail de réussite de la génération VID,fra,TRUE,superadmin,now()
+RS_VIN_GEN_SUCCESS_EMAIL_SUB,VID Generation Success Email Subject,eng,TRUE,superadmin,now()
+RS_VIN_GEN_SUCCESS_EMAIL_SUB,VID جيل النجاح البريد الإلكتروني الموضوع,ara,TRUE,superadmin,now()
+RS_VIN_GEN_SUCCESS_EMAIL_SUB,Sujet de l'e-mail de réussite de la génération VID,fra,TRUE,superadmin,now()
+RS_VIN_GEN_SUCCESS_SMS,VID Generation Success SMS,eng,TRUE,superadmin,now()
+RS_VIN_GEN_SUCCESS_SMS,VID جيل النجاح SMS,ara,TRUE,superadmin,now()
+RS_VIN_GEN_SUCCESS_SMS,SMS de réussite de génération VID,fra,TRUE,superadmin,now()
+RS_VIN_REV_SUCCESS_EMAIL,VID Revocation Success Email,eng,TRUE,superadmin,now()
+RS_VIN_REV_SUCCESS_EMAIL,VID إبطال نجاح البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_VIN_REV_SUCCESS_EMAIL,E-mail de réussite de la révocation de VID,fra,TRUE,superadmin,now()
+RS_VIN_REV_SUCCESS_EMAIL_SUB,VID Revocation Success Email Subject,eng,TRUE,superadmin,now()
+RS_VIN_REV_SUCCESS_EMAIL_SUB,VID إبطال نجاح البريد الإلكتروني الموضوع,ara,TRUE,superadmin,now()
+RS_VIN_REV_SUCCESS_EMAIL_SUB,Sujet de l'e-mail de réussite de la révocation de VID,fra,TRUE,superadmin,now()
+RS_VIN_REV_SUCCESS_SMS,VID Revocation Success SMS,eng,TRUE,superadmin,now()
+RS_VIN_REV_SUCCESS_SMS,VID إبطال نجاح الرسائل القصيرة,ara,TRUE,superadmin,now()
+RS_VIN_REV_SUCCESS_SMS,SMS de succès de révocation VID,fra,TRUE,superadmin,now()
+RS_UIN_RPR_SUCCESS_EMAIL,Reprint Request Success Email,eng,TRUE,superadmin,now()
+RS_UIN_RPR_SUCCESS_EMAIL,طبع طلب النجاح البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_UIN_RPR_SUCCESS_EMAIL,Réimpression de l'e-mail de réussite de la demande,fra,TRUE,superadmin,now()
+RS_UIN_RPR_SUCCESS_EMAIL_SUB,Reprint Request Success Email Subject,eng,TRUE,superadmin,now()
+RS_UIN_RPR_SUCCESS_EMAIL_SUB,طبع طلب النجاح البريد الإلكتروني الموضوع,ara,TRUE,superadmin,now()
+RS_UIN_RPR_SUCCESS_EMAIL_SUB,Sujet de l'e-mail de demande de réimpression réussie,fra,TRUE,superadmin,now()
+RS_UIN_RPR_SUCCESS_SMS,Reprint Request Success SMS,eng,TRUE,superadmin,now()
+RS_UIN_RPR_SUCCESS_SMS,إعادة طبع طلب النجاح SMS,ara,TRUE,superadmin,now()
+RS_UIN_RPR_SUCCESS_SMS,Réimpression SMS de réussite de la demande,fra,TRUE,superadmin,now()
+RS_AUTH_HIST_FAILURE_EMAIL,Authentication History Request Failure Email,eng,TRUE,superadmin,now()
+RS_AUTH_HIST_FAILURE_EMAIL,فشل طلب سجل المصادقة,ara,TRUE,superadmin,now()
+RS_AUTH_HIST_FAILURE_EMAIL,E-mail d'échec de la demande d'historique d'authentification,fra,TRUE,superadmin,now()
+RS_AUTH_HIST_FAILURE_EMAIL_SUB,Authentication History Request Failure Email Subject,eng,TRUE,superadmin,now()
+RS_AUTH_HIST_FAILURE_EMAIL_SUB,فشل طلب سجل المصادقة,ara,TRUE,superadmin,now()
+RS_AUTH_HIST_FAILURE_EMAIL_SUB,Objet de l'e-mail d'échec de la demande d'historique d'authentification,fra,TRUE,superadmin,now()
+RS_AUTH_HIST_FAILURE_SMS,Authentication History Request Failure SMS,eng,TRUE,superadmin,now()
+RS_AUTH_HIST_FAILURE_SMS,فشل طلب سجل المصادقة,ara,TRUE,superadmin,now()
+RS_AUTH_HIST_FAILURE_SMS,SMS d'échec de la demande d'historique d'authentification,fra,TRUE,superadmin,now()
+RS_DOW_UIN_FAILURE_EMAIL,Download e-UIN Failure Email,eng,TRUE,superadmin,now()
+RS_DOW_UIN_FAILURE_EMAIL,تنزيل فشل البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_DOW_UIN_FAILURE_EMAIL,Télécharger l'e-mail d'échec e-UIN,fra,TRUE,superadmin,now()
+RS_DOW_UIN_FAILURE_EMAIL_SUB,Download e-UIN Failure Email Subject,eng,TRUE,superadmin,now()
+RS_DOW_UIN_FAILURE_EMAIL_SUB,قم بتنزيل موضوع فشل البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_DOW_UIN_FAILURE_EMAIL_SUB,Télécharger le sujet de l'e-mail d'échec e-UIN,fra,TRUE,superadmin,now()
+RS_DOW_UIN_FAILURE_SMS,Download e-UIN Failure SMS,eng,TRUE,superadmin,now()
+RS_DOW_UIN_FAILURE_SMS,قم بتنزيل SMS Failure SMS,ara,TRUE,superadmin,now()
+RS_DOW_UIN_FAILURE_SMS,Télécharger le SMS d'échec e-UIN,fra,TRUE,superadmin,now()
+RS_LOCK_AUTH_FAILURE_EMAIL,Failure in Locking of Auth Types Email,eng,TRUE,superadmin,now()
+RS_LOCK_AUTH_FAILURE_EMAIL,فشل في قفل البريد الإلكتروني لأنواع المصادقة,ara,TRUE,superadmin,now()
+RS_LOCK_AUTH_FAILURE_EMAIL,Échec du verrouillage des e-mails des types d'authentification,fra,TRUE,superadmin,now()
+RS_LOCK_AUTH_FAILURE_EMAIL_SUB,Failure in Locking of Auth Types Email Subject,eng,TRUE,superadmin,now()
+RS_LOCK_AUTH_FAILURE_EMAIL_SUB,فشل في قفل أنواع مصادقة البريد الإلكتروني الموضوع,ara,TRUE,superadmin,now()
+RS_LOCK_AUTH_FAILURE_EMAIL_SUB,Échec du verrouillage des types d'authentification Objet de l'e-mail,fra,TRUE,superadmin,now()
+RS_LOCK_AUTH_FAILURE_SMS,Failure in Locking of Auth Types SMS,eng,TRUE,superadmin,now()
+RS_LOCK_AUTH_FAILURE_SMS,فشل في قفل أنواع مصادقة الرسائل القصيرة,ara,TRUE,superadmin,now()
+RS_LOCK_AUTH_FAILURE_SMS,Échec du verrouillage des types d'authentification SMS,fra,TRUE,superadmin,now()
+RS_UIN_RPR_FAILURE_EMAIL,Reprint Request Failure Email,eng,TRUE,superadmin,now()
+RS_UIN_RPR_FAILURE_EMAIL,إعادة طبع فشل طلب البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_UIN_RPR_FAILURE_EMAIL,E-mail d'échec de la demande de réimpression,fra,TRUE,superadmin,now()
+RS_UIN_RPR_FAILURE_EMAIL_SUB,Reprint Request Failure Email Subject,eng,TRUE,superadmin,now()
+RS_UIN_RPR_FAILURE_EMAIL_SUB,إعادة طبع فشل طلب البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_UIN_RPR_FAILURE_EMAIL_SUB,Échec de la demande de réimpression Objet de l'e-mail,fra,TRUE,superadmin,now()
+RS_UIN_RPR_FAILURE_SMS,Reprint Request Failure SMS,eng,TRUE,superadmin,now()
+RS_UIN_RPR_FAILURE_SMS,إعادة طلب فشل الرسائل القصيرة,ara,TRUE,superadmin,now()
+RS_UIN_RPR_FAILURE_SMS,SMS d'échec de la demande de réimpression,fra,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_FAILURE_EMAIL,Failure in Unlocking of Auth Types Email,eng,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_FAILURE_EMAIL,فشل في فتح البريد الإلكتروني لأنواع مصادقة,ara,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_FAILURE_EMAIL,Échec du déverrouillage de la messagerie électronique des types d'authentification,fra,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_FAILURE_EMAIL_SUB,Failure in Unlocking of Auth Types Email Subject,eng,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_FAILURE_EMAIL_SUB,فشل في فتح أنواع مصادقة البريد الإلكتروني الموضوع,ara,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_FAILURE_EMAIL_SUB,Échec du déverrouillage du sujet de l'e-mail des types d'authentification,fra,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_FAILURE_SMS,Failure in Unlocking of Auth Types SMS,eng,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_FAILURE_SMS,فشل في فتح أنواع مصادقة الرسائل القصيرة,ara,TRUE,superadmin,now()
+RS_UNLOCK_AUTH_FAILURE_SMS,Échec de déverrouillage des types d'authentification SMS,fra,TRUE,superadmin,now()
+RS_VIN_GEN_FAILURE_EMAIL,VID Generation Failure Email,eng,TRUE,superadmin,now()
+RS_VIN_GEN_FAILURE_EMAIL,VID الجيل فشل البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_VIN_GEN_FAILURE_EMAIL,E-mail d'échec de génération de VID,fra,TRUE,superadmin,now()
+RS_VIN_GEN_FAILURE_EMAIL_SUB,VID Generation Failure Email Subject,eng,TRUE,superadmin,now()
+RS_VIN_GEN_FAILURE_EMAIL_SUB,VID الجيل فشل البريد الإلكتروني الموضوع,ara,TRUE,superadmin,now()
+RS_VIN_GEN_FAILURE_EMAIL_SUB,Objet de l'e-mail d'échec de génération de VID,fra,TRUE,superadmin,now()
+RS_VIN_GEN_FAILURE_SMS,VID Generation Failure SMS,eng,TRUE,superadmin,now()
+RS_VIN_GEN_FAILURE_SMS,فشل إنشاء VID SMS,ara,TRUE,superadmin,now()
+RS_VIN_GEN_FAILURE_SMS,SMS d'échec de génération de VID,fra,TRUE,superadmin,now()
+RS_VIN_REV_FAILURE_EMAIL,VID Revocation Failure Email,eng,TRUE,superadmin,now()
+RS_VIN_REV_FAILURE_EMAIL,VID إبطال فشل البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_VIN_REV_FAILURE_EMAIL,E-mail d'échec de révocation de VID,fra,TRUE,superadmin,now()
+RS_VIN_REV_FAILURE_EMAIL_SUB,VID Revocation Failure Email Subject,eng,TRUE,superadmin,now()
+RS_VIN_REV_FAILURE_EMAIL_SUB,فيد إلغاء فشل البريد الإلكتروني الموضوع,ara,TRUE,superadmin,now()
+RS_VIN_REV_FAILURE_EMAIL_SUB,Objet de l'e-mail d'échec de la révocation du VID,fra,TRUE,superadmin,now()
+RS_VIN_REV_FAILURE_SMS,VID Revocation Failure SMS,eng,TRUE,superadmin,now()
+RS_VIN_REV_FAILURE_SMS,فشل إلغاء VID SMS,ara,TRUE,superadmin,now()
+RS_VIN_REV_FAILURE_SMS,SMS d'échec de révocation de VID,fra,TRUE,superadmin,now()
+RS_UIN_UPDATE_SUCCESS_EMAIL,UIN Update Request Placed Successfully Email,eng,TRUE,superadmin,now()
+RS_UIN_UPDATE_SUCCESS_EMAIL,تم تحديث طلب تحديث UIN بنجاح,ara,TRUE,superadmin,now()
+RS_UIN_UPDATE_SUCCESS_EMAIL,E-mail de demande de mise à jour UIN placé avec succès,fra,TRUE,superadmin,now()
+RS_UIN_UPDATE_SUCCESS_EMAIL_SUB,UIN Update Request Placed Successfully Email Subject,eng,TRUE,superadmin,now()
+RS_UIN_UPDATE_SUCCESS_EMAIL_SUB,تم وضع طلب تحديث UIN بنجاح بالبريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_UIN_UPDATE_SUCCESS_EMAIL_SUB,Sujet de la demande de mise à jour UIN placé avec succès,fra,TRUE,superadmin,now()
+RS_UIN_UPDATE_SUCCESS_SMS,UIN Update Request Placed Successfully SMS,eng,TRUE,superadmin,now()
+RS_UIN_UPDATE_SUCCESS_SMS,تم تحديث طلب تحديث UIN بنجاح,ara,TRUE,superadmin,now()
+RS_UIN_UPDATE_SUCCESS_SMS,Demande de mise à jour UIN placée avec succès SMS,fra,TRUE,superadmin,now()
+RS_UIN_UPDATE_FAILURE_EMAIL,UIN Update Request Failed Email,eng,TRUE,superadmin,now()
+RS_UIN_UPDATE_FAILURE_EMAIL,فشل طلب تحديث UIN,ara,TRUE,superadmin,now()
+RS_UIN_UPDATE_FAILURE_EMAIL,E-mail d'échec de la demande de mise à jour UIN,fra,TRUE,superadmin,now()
+RS_UIN_UPDATE_FAILURE_EMAIL_SUB,UIN Update Request Failed Email Subject,eng,TRUE,superadmin,now()
+RS_UIN_UPDATE_FAILURE_EMAIL_SUB,فشل طلب تحديث UIN موضوع البريد الإلكتروني,ara,TRUE,superadmin,now()
+RS_UIN_UPDATE_FAILURE_EMAIL_SUB,Échec de la demande de mise à jour de l'UIN,fra,TRUE,superadmin,now()
+RS_UIN_UPDATE_FAILURE_SMS,UIN Update Request Failed SMS,eng,TRUE,superadmin,now()
+RS_UIN_UPDATE_FAILURE_SMS,فشل طلب تحديث UIN SMS,ara,TRUE,superadmin,now()
+RS_UIN_UPDATE_FAILURE_SMS,Echec de la demande de mise à jour UIN SMS,fra,TRUE,superadmin,now()
+RPR_RPV_SUC_EMAIL,Registration Packet Validation Success Email,eng,TRUE,superadmin,now()
+RPR_RPV_SUC_EMAIL,Registration Packet Validation Success Email,ara,TRUE,superadmin,now()
+RPR_RPV_SUC_EMAIL,Registration Packet Validation Success Email,fra,TRUE,superadmin,now()
+RPR_RPV_SUC_SMS,Registration Packet Validation Success SMS,eng,TRUE,superadmin,now()
+RPR_RPV_SUC_SMS,Registration Packet Validation Success SMS,ara,TRUE,superadmin,now()
+RPR_RPV_SUC_SMS,Registration Packet Validation Success SMS,fra,TRUE,superadmin,now()
+RPR_UPV_SUC_EMAIL,Update Packet Validation Success Email,eng,TRUE,superadmin,now()
+RPR_UPV_SUC_EMAIL,Update Packet Validation Success Email,ara,TRUE,superadmin,now()
+RPR_UPV_SUC_EMAIL,Update Packet Validation Success Email,fra,TRUE,superadmin,now()
+RPR_UPV_SUC_SMS,Update Packet Validation Success SMS,eng,TRUE,superadmin,now()
+RPR_UPV_SUC_SMS,Update Packet Validation Success SMS,ara,TRUE,superadmin,now()
+RPR_UPV_SUC_SMS,Update Packet Validation Success SMS,fra,TRUE,superadmin,now()
+RPR_LPV_SUC_EMAIL,Lost Packet Validation Success Email,eng,TRUE,superadmin,now()
+RPR_LPV_SUC_EMAIL,Lost Packet Validation Success Email,ara,TRUE,superadmin,now()
+RPR_LPV_SUC_EMAIL,Lost Packet Validation Success Email,fra,TRUE,superadmin,now()
+RPR_LPV_SUC_SMS,Lost Packet Validation Success SMS,eng,TRUE,superadmin,now()
+RPR_LPV_SUC_SMS,Lost Packet Validation Success SMS,ara,TRUE,superadmin,now()
+RPR_LPV_SUC_SMS,Lost Packet Validation Success SMS,fra,TRUE,superadmin,now()
+RPR_RUPV_SUC_EMAIL,Resident Update Packet Validation Success Email,eng,TRUE,superadmin,now()
+RPR_RUPV_SUC_EMAIL,Resident Update Packet Validation Success Email,ara,TRUE,superadmin,now()
+RPR_RUPV_SUC_EMAIL,Resident Update Packet Validation Success Email,fra,TRUE,superadmin,now()
+RPR_RUPV_SUC_SMS,Resident Update Packet Validation Success SMS,eng,TRUE,superadmin,now()
+RPR_RUPV_SUC_SMS,Resident Update Packet Validation Success SMS,ara,TRUE,superadmin,now()
+RPR_RUPV_SUC_SMS,Resident Update Packet Validation Success SMS,fra,TRUE,superadmin,now()
+RPR_PPV_SUC_EMAIL,Re-print Packet Validation Success Email,eng,TRUE,superadmin,now()
+RPR_PPV_SUC_EMAIL,Re-print Packet Validation Success Email,ara,TRUE,superadmin,now()
+RPR_PPV_SUC_EMAIL,Re-print Packet Validation Success Email,fra,TRUE,superadmin,now()
+RPR_PPV_SUC_SMS,Re-print Packet Validation Success SMS,eng,TRUE,superadmin,now()
+RPR_PPV_SUC_SMS,Re-print Packet Validation Success SMS,ara,TRUE,superadmin,now()
+RPR_PPV_SUC_SMS,Re-print Packet Validation Success SMS,fra,TRUE,superadmin,now()
+RPR_APV_SUC_EMAIL,Activate Packet Validation Success Email,eng,TRUE,superadmin,now()
+RPR_APV_SUC_EMAIL,Activate Packet Validation Success Email,ara,TRUE,superadmin,now()
+RPR_APV_SUC_EMAIL,Activate Packet Validation Success Email,fra,TRUE,superadmin,now()
+RPR_APV_SUC_SMS,Activate Packet Validation Success SMS,eng,TRUE,superadmin,now()
+RPR_APV_SUC_SMS,Activate Packet Validation Success SMS,ara,TRUE,superadmin,now()
+RPR_APV_SUC_SMS,Activate Packet Validation Success SMS,fra,TRUE,superadmin,now()
+RPR_DPV_SUC_EMAIL,De-activate Packet Validation Success Email,eng,TRUE,superadmin,now()
+RPR_DPV_SUC_EMAIL,De-activate Packet Validation Success Email,ara,TRUE,superadmin,now()
+RPR_DPV_SUC_EMAIL,De-activate Packet Validation Success Email,fra,TRUE,superadmin,now()
+RPR_DPV_SUC_SMS,De-activate Packet Validation Success SMS,eng,TRUE,superadmin,now()
+RPR_DPV_SUC_SMS,De-activate Packet Validation Success SMS,ara,TRUE,superadmin,now()
+RPR_DPV_SUC_SMS,De-activate Packet Validation Success SMS,fra,TRUE,superadmin,now()
+RPR_RPV_SUC_EMAIL_SUB,Registration Packet Validation Success Email Sub,eng,TRUE,superadmin,now()
+RPR_RPV_SUC_EMAIL_SUB,Registration Packet Validation Success Email Sub,ara,TRUE,superadmin,now()
+RPR_RPV_SUC_EMAIL_SUB,Registration Packet Validation Success Email Sub,fra,TRUE,superadmin,now()
+RPR_UPV_SUC_EMAIL_SUB,Update Packet Validation Success Email Sub,eng,TRUE,superadmin,now()
+RPR_UPV_SUC_EMAIL_SUB,Update Packet Validation Success Email Sub,ara,TRUE,superadmin,now()
+RPR_UPV_SUC_EMAIL_SUB,Update Packet Validation Success Email Sub,fra,TRUE,superadmin,now()
+RPR_LPV_SUC_EMAIL_SUB,Lost Packet Validation Success Email Sub,eng,TRUE,superadmin,now()
+RPR_LPV_SUC_EMAIL_SUB,Lost Packet Validation Success Email Sub,ara,TRUE,superadmin,now()
+RPR_LPV_SUC_EMAIL_SUB,Lost Packet Validation Success Email Sub,fra,TRUE,superadmin,now()
+RPR_PPV_SUC_EMAIL_SUB,Re-print Packet Validation Success Email Sub,eng,TRUE,superadmin,now()
+RPR_PPV_SUC_EMAIL_SUB,Re-print Packet Validation Success Email Sub,ara,TRUE,superadmin,now()
+RPR_PPV_SUC_EMAIL_SUB,Re-print Packet Validation Success Email Sub,fra,TRUE,superadmin,now()
+RPR_RUPV_SUC_EMAIL_SUB,Resident Update Packet Validation Success Email Sub,eng,TRUE,superadmin,now()
+RPR_RUPV_SUC_EMAIL_SUB,Resident Update Packet Validation Success Email Sub,ara,TRUE,superadmin,now()
+RPR_RUPV_SUC_EMAIL_SUB,Resident Update Packet Validation Success Email Sub,fra,TRUE,superadmin,now()
+RPR_APV_SUC_EMAIL_SUB,Activate Packet Validation Success Email Sub,eng,TRUE,superadmin,now()
+RPR_APV_SUC_EMAIL_SUB,Activate Packet Validation Success Email Sub,ara,TRUE,superadmin,now()
+RPR_APV_SUC_EMAIL_SUB,Activate Packet Validation Success Email Sub,fra,TRUE,superadmin,now()
+RPR_DPV_SUC_EMAIL_SUB,De-activate Packet Validation Success Email Sub,eng,TRUE,superadmin,now()
+RPR_DPV_SUC_EMAIL_SUB,De-activate Packet Validation Success Email Sub,ara,TRUE,superadmin,now()
+RPR_DPV_SUC_EMAIL_SUB,De-activate Packet Validation Success Email Sub,fra,TRUE,superadmin,now()
+RS_CRE_REQ_SUCCESS_SMS,Credential Issuance Success SMS,eng,TRUE,superadmin,now()
+RS_CRE_REQ_SUCCESS_SMS,Credential Issuance Success SMS,ara,TRUE,superadmin,now()
+RS_CRE_REQ_SUCCESS_SMS,Credential Issuance Success SMS,fra,TRUE,superadmin,now()
+RS_CRE_REQ_SUCCESS_EMAIL,Credential Issuance Success EMAIL,eng,TRUE,superadmin,now()
+RS_CRE_REQ_SUCCESS_EMAIL,Credential Issuance Success EMAIL,ara,TRUE,superadmin,now()
+RS_CRE_REQ_SUCCESS_EMAIL,Credential Issuance Success EMAIL,fra,TRUE,superadmin,now()
+RS_CRE_REQ_SUCCESS_EMAIL_SUB,Credential Issuance Success EMAIL Subject,eng,TRUE,superadmin,now()
+RS_CRE_REQ_SUCCESS_EMAIL_SUB,Credential Issuance Success EMAIL Subject,ara,TRUE,superadmin,now()
+RS_CRE_REQ_SUCCESS_EMAIL_SUB,Credential Issuance Success EMAIL Subject,fra,TRUE,superadmin,now()
+RS_CRE_STATUS_SMS,Credential Issuance Status Check SMS,eng,TRUE,superadmin,now()
+RS_CRE_STATUS_SMS,Credential Issuance Status Check SMS,ara,TRUE,superadmin,now()
+RS_CRE_STATUS_SMS,Credential Issuance Status Check SMS,fra,TRUE,superadmin,now()
+RS_CRE_STATUS_EMAIL,Credential Issuance Status Check EMAIL,eng,TRUE,superadmin,now()
+RS_CRE_STATUS_EMAIL,Credential Issuance Status Check EMAIL,ara,TRUE,superadmin,now()
+RS_CRE_STATUS_EMAIL,Credential Issuance Status Check EMAIL,fra,TRUE,superadmin,now()
+RS_CRE_STATUS_EMAIL_SUB,Credential Issuance Status Check EMAIL Subject,eng,TRUE,superadmin,now()
+RS_CRE_STATUS_EMAIL_SUB,Credential Issuance Status Check EMAIL Subject,ara,TRUE,superadmin,now()
+RS_CRE_STATUS_EMAIL_SUB,Credential Issuance Status Check EMAIL Subject,fra,TRUE,superadmin,now()
+RS_CRE_CANCEL_SUCCESS_SMS,Credential Request Cancel Success SMS,eng,TRUE,superadmin,now()
+RS_CRE_CANCEL_SUCCESS_SMS,Credential Request Cancel Success SMS,ara,TRUE,superadmin,now()
+RS_CRE_CANCEL_SUCCESS_SMS,Credential Request Cancel Success SMS,fra,TRUE,superadmin,now()
+RS_CRE_CANCEL_SUCCESS_EMAIL,Credential Request Cancel Success EMAIL,eng,TRUE,superadmin,now()
+RS_CRE_CANCEL_SUCCESS_EMAIL,Credential Request Cancel Success EMAIL,ara,TRUE,superadmin,now()
+RS_CRE_CANCEL_SUCCESS_EMAIL,Credential Request Cancel Success EMAIL,fra,TRUE,superadmin,now()
+RS_CRE_CANCEL_SUCCESS_EMAIL_SUB,Credential Request Cancel Success EMAIL Subject,eng,TRUE,superadmin,now()
+RS_CRE_CANCEL_SUCCESS_EMAIL_SUB,Credential Request Cancel Success EMAIL Subject,ara,TRUE,superadmin,now()
+RS_CRE_CANCEL_SUCCESS_EMAIL_SUB,Credential Request Cancel Success EMAIL Subject,fra,TRUE,superadmin,now()
+RS_CRE_REQ_FAILURE_SMS,Credential Issuance Failure SMS,eng,TRUE,superadmin,now()
+RS_CRE_REQ_FAILURE_SMS,Credential Issuance Failure SMS,ara,TRUE,superadmin,now()
+RS_CRE_REQ_FAILURE_SMS,Credential Issuance Failure SMS,fra,TRUE,superadmin,now()
+RS_CRE_REQ_FAILURE_EMAIL,Credential Issuance Failure EMAIL,eng,TRUE,superadmin,now()
+RS_CRE_REQ_FAILURE_EMAIL,Credential Issuance Failure EMAIL,ara,TRUE,superadmin,now()
+RS_CRE_REQ_FAILURE_EMAIL,Credential Issuance Failure EMAIL,fra,TRUE,superadmin,now()
+RS_CRE_REQ_FAILURE_EMAIL_SUB,Credential Issuance Failure EMAIL Subject,eng,TRUE,superadmin,now()
+RS_CRE_REQ_FAILURE_EMAIL_SUB,Credential Issuance Failure EMAIL Subject,ara,TRUE,superadmin,now()
+RS_CRE_REQ_FAILURE_EMAIL_SUB,Credential Issuance Failure EMAIL Subject,fra,TRUE,superadmin,now()
+reg-ack-template-part,Registration Acknowledgement Template,eng,TRUE,superadmin,now()
+reg-ack-template-part,نموذج إقرار التسجيل,ara,TRUE,superadmin,now()
+reg-ack-template-part,Modèle d'accusé de réception d'inscription,fra,TRUE,superadmin,now()
+reg-preview-template-part,Registration Preview Template,eng,TRUE,superadmin,now()
+reg-preview-template-part,نموذج معاينة التسجيل,ara,TRUE,superadmin,now()
+reg-preview-template-part,Modèle d'aperçu d'inscription,fra,TRUE,superadmin,now()
diff --git a/data-dml/mosip_master/dml/master-title.csv b/data-dml/mosip_master/dml/master-title.csv
new file mode 100644
index 00000000000..29343ebf572
--- /dev/null
+++ b/data-dml/mosip_master/dml/master-title.csv
@@ -0,0 +1,10 @@
+code,name,descr,lang_code,is_active,cr_by,cr_dtimes
+MIR,Mr,Male Title,eng,TRUE,superadmin,now()
+MRS,Mrs,Female Title,eng,TRUE,superadmin,now()
+MIS,Miss,Unmarried Female Title,eng,TRUE,superadmin,now()
+MIR,أستاذ,العنوان الذكور,ara,TRUE,superadmin,now()
+MRS,ست,عنوان أنثى,ara,TRUE,superadmin,now()
+MIS,آنسة,العنوان الإناث غير المتزوجات,ara,TRUE,superadmin,now()
+MIR,Monsieur,Titre masculin,fra,TRUE,superadmin,now()
+MRS,Madame,Titre féminin,fra,TRUE,superadmin,now()
+MIS,Mademoiselle,Titre de femme célibataire,fra,TRUE,superadmin,now()
diff --git a/data-dml/mosip_master/dml/master-user_detail.csv b/data-dml/mosip_master/dml/master-user_detail.csv
new file mode 100644
index 00000000000..a27c45b19da
--- /dev/null
+++ b/data-dml/mosip_master/dml/master-user_detail.csv
@@ -0,0 +1,132 @@
+id,uin,name,email,mobile,status_code,regcntr_id,lang_code,last_login_method,is_active,cr_by,cr_dtimes
+110001,5402120055,Megha Tanga,hortense.dauenhauer@xyz.com,975366148,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110002,7314004469,Mahesh Kumar G,leonia.bermeo@xyz.com,795281431,ACT,10003,eng,PWD,TRUE,superadmin,now()
+110003,7896109326,Raghav,bong.bragan@xyz.com,739704695,ACT,10003,eng,PWD,TRUE,superadmin,now()
+110004,2870381373,Yaswanth,homer.molinar@xyz.com,725028706,ACT,10004,eng,PWD,TRUE,superadmin,now()
+110005,7234451333,Mahesh Kumar Panda,antony.hughes@xyz.com,804319687,ACT,10005,eng,PWD,TRUE,superadmin,now()
+110006,3563474484,Anusha,sunkadaeanusha@gmail.com,9449170382,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110007,5804057178,MOSIP User 1,leia.white@xyz.com,899884346,ACT,10007,eng,PWD,TRUE,superadmin,now()
+110008,1823955503,Idella Houge,idella.houge@xyz.com,946624002,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110009,6028049229,Shay Vitagliano,shay.vitagliano@xyz.com,716591396,ACT,10009,eng,PWD,TRUE,superadmin,now()
+110010,2685259089,Balaji,mazie.negley@xyz.com,718961429,ACT,10010,eng,PWD,TRUE,superadmin,now()
+110011,3834346151,Magda Godoy,magda.godoy@xyz.com,938380935,ACT,10011,eng,PWD,TRUE,superadmin,now()
+110012,3493338361,Himaja,anya.adorno@xyz.com,911713143,ACT,10011,eng,PWD,TRUE,superadmin,now()
+110013,5145284955,Saravanan,darby.self@xyz.com,859668671,ACT,10012,eng,PWD,TRUE,superadmin,now()
+110014,4285838622,Balamurugan,crissy.flor@xyz.com,971384902,ACT,10012,eng,PWD,TRUE,superadmin,now()
+110015,3740463764,Bettina Goering,bettina.goering@xyz.com,876997632,ACT,10013,eng,PWD,TRUE,superadmin,now()
+110016,6431857131,Dinesh,hilary.dunklin@xyz.com,853451517,ACT,10013,eng,PWD,TRUE,superadmin,now()
+110017,2638207977,Kris Rahm,kris.rahm@xyz.com,723337142,ACT,10014,eng,PWD,TRUE,superadmin,now()
+110018,6893364288,Leona,ferne.hang@xyz.com,733802681,ACT,10014,eng,PWD,TRUE,superadmin,now()
+110019,5251539502,Arjun,leilani.heavener@xyz.com,942983448,ACT,10015,eng,PWD,TRUE,superadmin,now()
+110020,7724013062,MOSIP User 2,irwin.norwood@xyz.com,936463358,ACT,10015,eng,PWD,TRUE,superadmin,now()
+110021,7316931025,Magdalena Weber,magdalena.weber@xyz.com,932122450,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110022,9137847236,Tabish Khan,adrienne.hoffman@xyz.com,848488000,ACT,10003,eng,PWD,TRUE,superadmin,now()
+110023,8428758532,Adrienne Mcgee,adrienne.mcgee@xyz.com,894773246,ACT,10004,eng,PWD,TRUE,superadmin,now()
+110024,9804209494,Sreekar,amare.coleman@xyz.com,956554588,ACT,10003,eng,PWD,TRUE,superadmin,now()
+110025,7105248214,Dawson Ibarra,dawson.ibarra@xyz.com,765455583,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110026,9316557128,Lingam,elvis.mcmillan@xyz.com,884282274,ACT,10007,eng,PWD,TRUE,superadmin,now()
+110027,8103486949,Omsai,steve.george@xyz.com,971073663,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110028,9601932866,Colton Elliott,colton.elliott@xyz.com,809908673,ACT,10009,eng,PWD,TRUE,superadmin,now()
+110029,9317596765,Gaurav,carolyn.rodriguez@xyz.com,818876429,ACT,10010,eng,PWD,TRUE,superadmin,now()
+110030,9317596768,Jane Smith,jane.smith@xyz.com,818876432,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110031,9317596767,John Doe,john.doe@xyz.com,818876431,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110032,9317596770,Sravan Kalla,ewan.marsh@xyz.com,818876433,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110033,9317596771,Nikola Tesla,nikola.tesla@xyz.com,818876434,ACT,10005,eng,PWD,TRUE,superadmin,now()
+110034,9317596772,Graham Bell,graham.bell@xyz.com,818876435,ACT,10005,eng,PWD,TRUE,superadmin,now()
+110035,9317596773,Albert Miles,albert.miles@xyz.com,818876436,ACT,10005,eng,PWD,TRUE,superadmin,now()
+110036,9317596774,Krishnan,krish@mosip.io,818876437,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110037,9317596775,Sayeri Mishra,elvis.ibarra@xyz.com,818876438,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110038,9317596776,Rounak Nayak,rounak.nayak@mindtree.com,8763740607,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110039,9317596777,Girish Yarru,Girish@xyz.com,818876440,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110040,9317596778,Shekhar Suman,Shekhar@xyz.com,818876441,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110041,9317596779,Nagalakshmi Nithyanandan,Nagalakshmi@xyz.com,818876442,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110042,9317596780,Sowmya Ujjappa Banakar,Sowmya@xyz.com,818876443,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110043,9317596781,Horteppa Pujari,Horteppa@xyz.com,818876444,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110044,9317596782,Rishabh Keshari,Rishabh@xyz.com,818876445,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110045,9317596783,Jyoti Prakash Nayak,Jyoti@xyz.com,818876446,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110046,9317596784,Mukul Puspam,Mukul@xyz.com,818876447,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110047,9317596785,Pranav Kumar,Pranav@xyz.com,818876448,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110048,9317596786,Sanjay Shivaji Zende,Sanjay@xyz.com,818876449,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110049,9317596787,Monobikash Das,Monobikash@xyz.com,818876450,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110050,9317596788,Riju Pragyna Jain,Riju@xyz.com,818876451,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110051,9317596789,Ayush Keer,Ayush@xyz.com,818876452,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110052,9317596790,Karthik Ramanan,Karthik@xyz.com,818876453,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110053,9317596791,Anand,Anand@xyz.com,818876454,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110054,9317596792,Technoforte User,technoforte@xyz.com,818876455,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110055,9317596793,Ranjitha Siddegowda,Ranjitha@xyz.com,818876456,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110056,9317596794,Alok Ranjan,Alok@xyz.com,818876457,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110057,9317596795,Sudheer Murthy,Sudheer@xyz.com,818876458,ACT,10006,eng,PWD,TRUE,superadmin,now()
+110058,9317596796,Taleev,Taleev@xyz.com,818876459,ACT,10007,eng,PWD,TRUE,superadmin,now()
+110059,9317596797,Brahma,Brahma@xyz.com,818876460,ACT,10007,eng,PWD,TRUE,superadmin,now()
+110060,9317596798,Rishabh Keshari,Rishabh@xyz.com,818876461,ACT,10007,eng,PWD,TRUE,superadmin,now()
+110061,9317596799,Kiranraj,Kiranraj@xyz.com,818876462,ACT,10007,eng,PWD,TRUE,superadmin,now()
+110062,9317596800,Phillipines User 1,puser1@xyz.com,818876463,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110063,9317596801,Phillipines User 2,puser2@xyz.com,818876464,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110064,9317596802,Phillipines User 3,puser3@xyz.com,818876465,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110065,9317596803,Krishnan,krishnan@xyz.com,818876466,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110066,9317596804,Gururaj 1,Gururaj1@xyz.com,818876467,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110067,9317596805,Gururaj 2,Gururaj2@xyz.com,818876468,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110068,9317596806,Technoforte User 2,technoforte2@xyz.com,818876469,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110069,9317596807,Yadimala,Yadimala@xyz.com,818876470,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110070,9317596808,Dummy User,Dummy@xyz.com,818876471,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110071,9317596809,Dummy User,Dummy@xyz.com,818876472,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110072,9317596810,Dummy User,Dummy@xyz.com,818876473,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110073,9317596811,Dummy User,Dummy@xyz.com,818876474,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110074,9317596812,Dummy User,Dummy@xyz.com,818876475,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110075,9317596813,Dummy User,Dummy@xyz.com,818876476,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110076,9317596814,Dummy User,Dummy@xyz.com,818876477,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110077,9317596815,Dummy User,Dummy@xyz.com,818876478,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110078,9317596816,Dummy User,Dummy@xyz.com,818876479,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110079,9317596817,Dummy User,Dummy@xyz.com,818876480,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110080,9317596818,Dummy User,Dummy@xyz.com,818876481,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110081,9317596819,Dummy User,Dummy@xyz.com,818876482,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110082,9317596820,Dummy User,Dummy@xyz.com,818876483,ACT,33333,eng,PWD,TRUE,superadmin,now()
+110083,9317596821,Dummy User,Dummy@xyz.com,818876484,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110084,9317596822,Dummy User,Dummy@xyz.com,818876485,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110085,9317596823,Dummy User,Dummy@xyz.com,818876486,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110086,9317596824,Dummy User,Dummy@xyz.com,818876487,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110087,9317596825,Dummy User,Dummy@xyz.com,818876488,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110088,9317596826,Dummy User,Dummy@xyz.com,818876489,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110089,9317596827,Dummy User,Dummy@xyz.com,818876490,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110090,9317596828,Dummy User,Dummy@xyz.com,818876491,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110091,9317596829,Dummy User,Dummy@xyz.com,818876492,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110092,9317596830,Dummy User,Dummy@xyz.com,818876493,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110093,9317596831,Dummy User,Dummy@xyz.com,818876494,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110094,9317596832,Dummy User,Dummy@xyz.com,818876495,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110095,9317596833,Dummy User,Dummy@xyz.com,818876496,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110096,9317596834,Dummy User,Dummy@xyz.com,818876497,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110097,9317596835,Dummy User,Dummy@xyz.com,818876498,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110098,9317596836,Dummy User,Dummy@xyz.com,818876499,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110099,9317596837,Dummy User,Dummy@xyz.com,818876500,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110100,9317596838,Dummy User,Dummy@xyz.com,818876501,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110101,9317596839,Dummy User,Dummy@xyz.com,818876502,ACT,10008,eng,PWD,TRUE,superadmin,now()
+110102,9317596840,Dummy User,Dummy@xyz.com,818876503,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110103,9317596841,Dummy User,Dummy@xyz.com,818876504,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110104,9317596842,Dummy User,Dummy@xyz.com,818876505,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110105,9317596843,Dummy User,Dummy@xyz.com,818876506,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110106,9317596844,Dummy User,Dummy@xyz.com,818876507,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110107,9317596845,Dummy User,Dummy@xyz.com,818876508,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110108,9317596846,Dummy User,Dummy@xyz.com,818876509,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110109,9317596847,Dummy User,Dummy@xyz.com,818876510,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110110,9317596848,Dummy User,Dummy@xyz.com,818876511,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110111,9317596849,Dummy User,Dummy@xyz.com,818876512,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110112,9317596850,Dummy User,Dummy@xyz.com,818876513,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110113,9317596851,Dummy User,Dummy@xyz.com,818876514,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110114,9317596852,Dummy User,Dummy@xyz.com,818876515,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110115,9317596853,Dummy User,Dummy@xyz.com,818876516,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110116,9317596854,Dummy User,Dummy@xyz.com,818876517,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110117,9317596855,Dummy User,Dummy@xyz.com,818876518,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110118,9317596856,Jane ,Jane.rose@technoforte.co.in,9840587089,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110119,9317596857,Piyush ,piyush.singh@technoforte.co.in,8277417831,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110120,9317596858,Suchana ,suchana.kankonkar@technoforte.co.in,9980939623,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110121,9317596859,Swapna ,swapna.p@technoforte.co.in,9741112380,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110122,9317596860,Niyati ,niyati.swami@technoforte.co.in,9606139887,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110123,9317596861,Hemant ,Hemant.vadher@technoforte.co.in,9441781690,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110124,9317596862,Sanjeev ,sanjeev.shrivastava@technoforte.co.in,8553967572,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110125,9317596863,Alok ,alok.tiwari@technoforte.co.in,8800932977,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110126,9317596864,Nikhilesh ,nikhilesh.kumar@technoforte.co.in,8600097143,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110127,9317596865,Chandra ,chandra.mishra@technoforte.co.in,9851646105,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110128,9317596866,Ankit,ankit.vaishnav@technoforte.co.in,7738710535,ACT,10002,eng,PWD,TRUE,superadmin,now()
+110129,9317596867,Mosip Test,mosip-test1@technoforte.co.in,9876543212,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110130,9317596868,Testuser1,mosip-test2@technoforte.co.in,9876543213,ACT,10001,eng,PWD,TRUE,superadmin,now()
+110131,9317596869,Testuser2,mosip-test3@technoforte.co.in,9876543214,ACT,10002,eng,PWD,TRUE,superadmin,now()
diff --git a/data-dml/mosip_master/dml/master-user_detail_h.csv b/data-dml/mosip_master/dml/master-user_detail_h.csv
new file mode 100644
index 00000000000..3115b896efb
--- /dev/null
+++ b/data-dml/mosip_master/dml/master-user_detail_h.csv
@@ -0,0 +1,132 @@
+id,uin,name,email,mobile,status_code,regcntr_id,lang_code,last_login_method,is_active,cr_by,cr_dtimes,eff_dtimes
+110001,5402120055,Megha Tanga,hortense.dauenhauer@xyz.com,975366148,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110002,7314004469,Mahesh Kumar G,leonia.bermeo@xyz.com,795281431,ACT,10003,eng,PWD,TRUE,superadmin,now(),now()
+110003,7896109326,Raghav,bong.bragan@xyz.com,739704695,ACT,10003,eng,PWD,TRUE,superadmin,now(),now()
+110004,2870381373,Yaswanth,homer.molinar@xyz.com,725028706,ACT,10004,eng,PWD,TRUE,superadmin,now(),now()
+110005,7234451333,Mahesh Kumar Panda,antony.hughes@xyz.com,804319687,ACT,10005,eng,PWD,TRUE,superadmin,now(),now()
+110006,3563474484,Anusha,sunkadaeanusha@gmail.com,9449170382,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110007,5804057178,MOSIP User 1,leia.white@xyz.com,899884346,ACT,10007,eng,PWD,TRUE,superadmin,now(),now()
+110008,1823955503,Idella Houge,idella.houge@xyz.com,946624002,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110009,6028049229,Shay Vitagliano,shay.vitagliano@xyz.com,716591396,ACT,10009,eng,PWD,TRUE,superadmin,now(),now()
+110010,2685259089,Balaji,mazie.negley@xyz.com,718961429,ACT,10010,eng,PWD,TRUE,superadmin,now(),now()
+110011,3834346151,Magda Godoy,magda.godoy@xyz.com,938380935,ACT,10011,eng,PWD,TRUE,superadmin,now(),now()
+110012,3493338361,Himaja,anya.adorno@xyz.com,911713143,ACT,10011,eng,PWD,TRUE,superadmin,now(),now()
+110013,5145284955,Saravanan,darby.self@xyz.com,859668671,ACT,10012,eng,PWD,TRUE,superadmin,now(),now()
+110014,4285838622,Balamurugan,crissy.flor@xyz.com,971384902,ACT,10012,eng,PWD,TRUE,superadmin,now(),now()
+110015,3740463764,Bettina Goering,bettina.goering@xyz.com,876997632,ACT,10013,eng,PWD,TRUE,superadmin,now(),now()
+110016,6431857131,Dinesh,hilary.dunklin@xyz.com,853451517,ACT,10013,eng,PWD,TRUE,superadmin,now(),now()
+110017,2638207977,Kris Rahm,kris.rahm@xyz.com,723337142,ACT,10014,eng,PWD,TRUE,superadmin,now(),now()
+110018,6893364288,Leona,ferne.hang@xyz.com,733802681,ACT,10014,eng,PWD,TRUE,superadmin,now(),now()
+110019,5251539502,Arjun,leilani.heavener@xyz.com,942983448,ACT,10015,eng,PWD,TRUE,superadmin,now(),now()
+110020,7724013062,MOSIP User 2,irwin.norwood@xyz.com,936463358,ACT,10015,eng,PWD,TRUE,superadmin,now(),now()
+110021,7316931025,Magdalena Weber,magdalena.weber@xyz.com,932122450,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110022,9137847236,Tabish Khan,adrienne.hoffman@xyz.com,848488000,ACT,10003,eng,PWD,TRUE,superadmin,now(),now()
+110023,8428758532,Adrienne Mcgee,adrienne.mcgee@xyz.com,894773246,ACT,10004,eng,PWD,TRUE,superadmin,now(),now()
+110024,9804209494,Sreekar,amare.coleman@xyz.com,956554588,ACT,10003,eng,PWD,TRUE,superadmin,now(),now()
+110025,7105248214,Dawson Ibarra,dawson.ibarra@xyz.com,765455583,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110026,9316557128,Lingam,elvis.mcmillan@xyz.com,884282274,ACT,10007,eng,PWD,TRUE,superadmin,now(),now()
+110027,8103486949,Omsai,steve.george@xyz.com,971073663,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110028,9601932866,Colton Elliott,colton.elliott@xyz.com,809908673,ACT,10009,eng,PWD,TRUE,superadmin,now(),now()
+110029,9317596765,Gaurav,carolyn.rodriguez@xyz.com,818876429,ACT,10010,eng,PWD,TRUE,superadmin,now(),now()
+110030,9317596768,Jane Smith,jane.smith@xyz.com,818876432,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110031,9317596767,John Doe,john.doe@xyz.com,818876431,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110032,9317596770,Sravan Kalla,ewan.marsh@xyz.com,818876433,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110033,9317596771,Nikola Tesla,nikola.tesla@xyz.com,818876434,ACT,10005,eng,PWD,TRUE,superadmin,now(),now()
+110034,9317596772,Graham Bell,graham.bell@xyz.com,818876435,ACT,10005,eng,PWD,TRUE,superadmin,now(),now()
+110035,9317596773,Albert Miles,albert.miles@xyz.com,818876436,ACT,10005,eng,PWD,TRUE,superadmin,now(),now()
+110036,9317596774,Krishnan,krish@mosip.io,818876437,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110037,9317596775,Sayeri Mishra,elvis.ibarra@xyz.com,818876438,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110038,9317596776,Rounak Nayak,rounak.nayak@mindtree.com,8763740607,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110039,9317596777,Girish Yarru,Girish@xyz.com,818876440,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110040,9317596778,Shekhar Suman,Shekhar@xyz.com,818876441,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110041,9317596779,Nagalakshmi Nithyanandan,Nagalakshmi@xyz.com,818876442,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110042,9317596780,Sowmya Ujjappa Banakar,Sowmya@xyz.com,818876443,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110043,9317596781,Horteppa Pujari,Horteppa@xyz.com,818876444,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110044,9317596782,Rishabh Keshari,Rishabh@xyz.com,818876445,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110045,9317596783,Jyoti Prakash Nayak,Jyoti@xyz.com,818876446,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110046,9317596784,Mukul Puspam,Mukul@xyz.com,818876447,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110047,9317596785,Pranav Kumar,Pranav@xyz.com,818876448,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110048,9317596786,Sanjay Shivaji Zende,Sanjay@xyz.com,818876449,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110049,9317596787,Monobikash Das,Monobikash@xyz.com,818876450,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110050,9317596788,Riju Pragyna Jain,Riju@xyz.com,818876451,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110051,9317596789,Ayush Keer,Ayush@xyz.com,818876452,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110052,9317596790,Karthik Ramanan,Karthik@xyz.com,818876453,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110053,9317596791,Anand,Anand@xyz.com,818876454,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110054,9317596792,Technoforte User,technoforte@xyz.com,818876455,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110055,9317596793,Ranjitha Siddegowda,Ranjitha@xyz.com,818876456,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110056,9317596794,Alok Ranjan,Alok@xyz.com,818876457,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110057,9317596795,Sudheer Murthy,Sudheer@xyz.com,818876458,ACT,10006,eng,PWD,TRUE,superadmin,now(),now()
+110058,9317596796,Taleev,Taleev@xyz.com,818876459,ACT,10007,eng,PWD,TRUE,superadmin,now(),now()
+110059,9317596797,Brahma,Brahma@xyz.com,818876460,ACT,10007,eng,PWD,TRUE,superadmin,now(),now()
+110060,9317596798,Rishabh Keshari,Rishabh@xyz.com,818876461,ACT,10007,eng,PWD,TRUE,superadmin,now(),now()
+110061,9317596799,Kiranraj,Kiranraj@xyz.com,818876462,ACT,10007,eng,PWD,TRUE,superadmin,now(),now()
+110062,9317596800,Phillipines User 1,puser1@xyz.com,818876463,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110063,9317596801,Phillipines User 2,puser2@xyz.com,818876464,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110064,9317596802,Phillipines User 3,puser3@xyz.com,818876465,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110065,9317596803,Krishnan,krishnan@xyz.com,818876466,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110066,9317596804,Gururaj 1,Gururaj1@xyz.com,818876467,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110067,9317596805,Gururaj 2,Gururaj2@xyz.com,818876468,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110068,9317596806,Technoforte User 2,technoforte2@xyz.com,818876469,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110069,9317596807,Yadimala,Yadimala@xyz.com,818876470,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110070,9317596808,Dummy User,Dummy@xyz.com,818876471,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110071,9317596809,Dummy User,Dummy@xyz.com,818876472,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110072,9317596810,Dummy User,Dummy@xyz.com,818876473,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110073,9317596811,Dummy User,Dummy@xyz.com,818876474,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110074,9317596812,Dummy User,Dummy@xyz.com,818876475,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110075,9317596813,Dummy User,Dummy@xyz.com,818876476,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110076,9317596814,Dummy User,Dummy@xyz.com,818876477,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110077,9317596815,Dummy User,Dummy@xyz.com,818876478,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110078,9317596816,Dummy User,Dummy@xyz.com,818876479,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110079,9317596817,Dummy User,Dummy@xyz.com,818876480,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110080,9317596818,Dummy User,Dummy@xyz.com,818876481,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110081,9317596819,Dummy User,Dummy@xyz.com,818876482,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110082,9317596820,Dummy User,Dummy@xyz.com,818876483,ACT,33333,eng,PWD,TRUE,superadmin,now(),now()
+110083,9317596821,Dummy User,Dummy@xyz.com,818876484,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110084,9317596822,Dummy User,Dummy@xyz.com,818876485,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110085,9317596823,Dummy User,Dummy@xyz.com,818876486,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110086,9317596824,Dummy User,Dummy@xyz.com,818876487,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110087,9317596825,Dummy User,Dummy@xyz.com,818876488,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110088,9317596826,Dummy User,Dummy@xyz.com,818876489,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110089,9317596827,Dummy User,Dummy@xyz.com,818876490,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110090,9317596828,Dummy User,Dummy@xyz.com,818876491,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110091,9317596829,Dummy User,Dummy@xyz.com,818876492,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110092,9317596830,Dummy User,Dummy@xyz.com,818876493,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110093,9317596831,Dummy User,Dummy@xyz.com,818876494,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110094,9317596832,Dummy User,Dummy@xyz.com,818876495,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110095,9317596833,Dummy User,Dummy@xyz.com,818876496,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110096,9317596834,Dummy User,Dummy@xyz.com,818876497,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110097,9317596835,Dummy User,Dummy@xyz.com,818876498,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110098,9317596836,Dummy User,Dummy@xyz.com,818876499,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110099,9317596837,Dummy User,Dummy@xyz.com,818876500,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110100,9317596838,Dummy User,Dummy@xyz.com,818876501,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110101,9317596839,Dummy User,Dummy@xyz.com,818876502,ACT,10008,eng,PWD,TRUE,superadmin,now(),now()
+110102,9317596840,Dummy User,Dummy@xyz.com,818876503,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110103,9317596841,Dummy User,Dummy@xyz.com,818876504,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110104,9317596842,Dummy User,Dummy@xyz.com,818876505,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110105,9317596843,Dummy User,Dummy@xyz.com,818876506,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110106,9317596844,Dummy User,Dummy@xyz.com,818876507,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110107,9317596845,Dummy User,Dummy@xyz.com,818876508,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110108,9317596846,Dummy User,Dummy@xyz.com,818876509,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110109,9317596847,Dummy User,Dummy@xyz.com,818876510,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110110,9317596848,Dummy User,Dummy@xyz.com,818876511,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110111,9317596849,Dummy User,Dummy@xyz.com,818876512,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110112,9317596850,Dummy User,Dummy@xyz.com,818876513,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110113,9317596851,Dummy User,Dummy@xyz.com,818876514,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110114,9317596852,Dummy User,Dummy@xyz.com,818876515,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110115,9317596853,Dummy User,Dummy@xyz.com,818876516,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110116,9317596854,Dummy User,Dummy@xyz.com,818876517,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110117,9317596855,Dummy User,Dummy@xyz.com,818876518,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110118,9317596856,Jane ,Jane.rose@technoforte.co.in,9840587089,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110119,9317596857,Piyush ,piyush.singh@technoforte.co.in,8277417831,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110120,9317596858,Suchana ,suchana.kankonkar@technoforte.co.in,9980939623,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110121,9317596859,Swapna ,swapna.p@technoforte.co.in,9741112380,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110122,9317596860,Niyati ,niyati.swami@technoforte.co.in,9606139887,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110123,9317596861,Hemant ,Hemant.vadher@technoforte.co.in,9441781690,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110124,9317596862,Sanjeev ,sanjeev.shrivastava@technoforte.co.in,8553967572,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110125,9317596863,Alok ,alok.tiwari@technoforte.co.in,8800932977,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110126,9317596864,Nikhilesh ,nikhilesh.kumar@technoforte.co.in,8600097143,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110127,9317596865,Chandra ,chandra.mishra@technoforte.co.in,9851646105,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110128,9317596866,Ankit,ankit.vaishnav@technoforte.co.in,7738710535,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
+110129,9317596867,Mosip Test,mosip-test1@technoforte.co.in,9876543212,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110130,9317596868,Testuser1,mosip-test2@technoforte.co.in,9876543213,ACT,10001,eng,PWD,TRUE,superadmin,now(),now()
+110131,9317596869,Testuser2,mosip-test3@technoforte.co.in,9876543214,ACT,10002,eng,PWD,TRUE,superadmin,now(),now()
diff --git a/data-dml/mosip_master/dml/master-valid_document.csv b/data-dml/mosip_master/dml/master-valid_document.csv
new file mode 100644
index 00000000000..5f4601acf2b
--- /dev/null
+++ b/data-dml/mosip_master/dml/master-valid_document.csv
@@ -0,0 +1,37 @@
+doctyp_code,doccat_code,lang_code,is_active,cr_by,cr_dtimes
+CIN,POI,ara,TRUE,superadmin,now()
+RNC,POA,ara,TRUE,superadmin,now()
+COR,POA,ara,TRUE,superadmin,now()
+CRN,POR,ara,TRUE,superadmin,now()
+COB,POB,ara,TRUE,superadmin,now()
+DOC001,POI,ara,TRUE,superadmin,now()
+DOC002,POI,ara,TRUE,superadmin,now()
+DOC003,POI,ara,TRUE,superadmin,now()
+DOC004,POI,ara,TRUE,superadmin,now()
+DOC005,POI,ara,TRUE,superadmin,now()
+DOC006,POI,ara,TRUE,superadmin,now()
+DOC007,POI,ara,TRUE,superadmin,now()
+DOC008,POI,ara,TRUE,superadmin,now()
+DOC009,POI,ara,TRUE,superadmin,now()
+DOC010,POI,ara,TRUE,superadmin,now()
+DOC011,POI,ara,TRUE,superadmin,now()
+DOC012,POI,ara,TRUE,superadmin,now()
+DOC001,POA,ara,TRUE,superadmin,now()
+DOC013,POA,ara,TRUE,superadmin,now()
+DOC014,POA,ara,TRUE,superadmin,now()
+DOC015,POA,ara,TRUE,superadmin,now()
+DOC004,POA,ara,TRUE,superadmin,now()
+DOC005,POA,ara,TRUE,superadmin,now()
+DOC006,POA,ara,TRUE,superadmin,now()
+DOC016,POA,ara,TRUE,superadmin,now()
+DOC017,POA,ara,TRUE,superadmin,now()
+DOC018,POA,ara,TRUE,superadmin,now()
+DOC008,POA,ara,TRUE,superadmin,now()
+DOC024,POR,ara,TRUE,superadmin,now()
+DOC025,POR,ara,TRUE,superadmin,now()
+DOC026,POR,ara,TRUE,superadmin,now()
+DOC001,POR,ara,TRUE,superadmin,now()
+DOC027,POR,ara,TRUE,superadmin,now()
+DOC028,POR,ara,TRUE,superadmin,now()
+COE,POE,ara,TRUE,superadmin,now()
+EOP,POE,ara,TRUE,superadmin,now()
diff --git a/data-dml/mosip_master/dml/master-zone.csv b/data-dml/mosip_master/dml/master-zone.csv
new file mode 100644
index 00000000000..c4cf2bc0759
--- /dev/null
+++ b/data-dml/mosip_master/dml/master-zone.csv
@@ -0,0 +1,64 @@
+code,name,hierarchy_level,hierarchy_level_name,hierarchy_path,parent_zone_code,lang_code,is_active,cr_by,cr_dtimes
+MOR,MyCountry,0,Country,MOR,,eng,TRUE,superadmin,now()
+MOR,الْـمَغْرِبُ,0,بلد,MOR,,ara,TRUE,superadmin,now()
+MOR,Maroc,0,Pays,MOR,,fra,TRUE,superadmin,now()
+NTH,North,1,Direction,MOR/NTH,MOR,eng,TRUE,superadmin,now()
+NTH,شمال,1,اتجاه,MOR/NTH,MOR,ara,TRUE,superadmin,now()
+NTH,Nord,1,Direction,MOR/NTH,MOR,fra,TRUE,superadmin,now()
+RSK,RabatSaleKenitra,2,Region,MOR/NTH/RSK,NTH,eng,TRUE,superadmin,now()
+RSK,جهةالرباطسلاالقنيطرة,2,منطقة,MOR/NTH/RSK,NTH,ara,TRUE,superadmin,now()
+RSK,Rabat-Salé-Kénitra,2,Région,MOR/NTH/RSK,NTH,fra,TRUE,superadmin,now()
+RBT,Rabat,3,Province,MOR/NTH/RSK/RBT,RSK,eng,TRUE,superadmin,now()
+RBT,الرباط,3,المحافظة,MOR/NTH/RSK/RBT,RSK,ara,TRUE,superadmin,now()
+RBT,Rabat,3,Province,MOR/NTH/RSK/RBT,RSK,fra,TRUE,superadmin,now()
+KTA,Kenitra,3,Province,MOR/NTH/RSK/KTA,RSK,eng,TRUE,superadmin,now()
+KTA,القنيطرة,3,المحافظة,MOR/NTH/RSK/KTA,RSK,ara,TRUE,superadmin,now()
+KTA,Kénitra,3,Province,MOR/NTH/RSK/KTA,RSK,fra,TRUE,superadmin,now()
+SAL,Salé ,3,Province,MOR/NTH/RSK/SAL,RSK,eng,TRUE,superadmin,now()
+SAL,سلا,3,المحافظة,MOR/NTH/RSK/SAL,RSK,ara,TRUE,superadmin,now()
+SAL,Sala,3,Province,MOR/NTH/RSK/SAL,RSK,fra,TRUE,superadmin,now()
+CST,Casablanca-Settat,2,Region,MOR/NTH/CST,NTH,eng,TRUE,superadmin,now()
+CST,الدارالبيضاء-سطات,2,منطقة,MOR/NTH/CST,NTH,ara,TRUE,superadmin,now()
+CST,Casablanca-Settat,2,Région,MOR/NTH/CST,NTH,fra,TRUE,superadmin,now()
+BSN,Benslimane,3,Province,MOR/NTH/CST/BSN,CST,eng,TRUE,superadmin,now()
+BSN,بنسليمان,3,المحافظة,MOR/NTH/CST/BSN,CST,ara,TRUE,superadmin,now()
+BSN,Benslimane,3,Province,MOR/NTH/CST/BSN,CST,fra,TRUE,superadmin,now()
+CSB,Casablanca,3,Province,MOR/NTH/CST/CSB,CST,eng,TRUE,superadmin,now()
+CSB,ٱلدَّارٱلْبَيْضَاء,3,المحافظة,MOR/NTH/CST/CSB,CST,ara,TRUE,superadmin,now()
+CSB,Casablanca,3,Province,MOR/NTH/CST/CSB,CST,fra,TRUE,superadmin,now()
+STT,Settat,3,Province,MOR/NTH/CST/STT,CST,eng,TRUE,superadmin,now()
+STT,سطات,3,المحافظة,MOR/NTH/CST/STT,CST,ara,TRUE,superadmin,now()
+STT,Settat,3,Province,MOR/NTH/CST/STT,CST,fra,TRUE,superadmin,now()
+ORT,Oriental,2,Region,MOR/NTH/ORT,NTH,eng,TRUE,superadmin,now()
+ORT,الشرق,2,منطقة,MOR/NTH/ORT,NTH,ara,TRUE,superadmin,now()
+ORT,Oriental,2,Région,MOR/NTH/ORT,NTH,fra,TRUE,superadmin,now()
+NDR,Nador,3,Province,MOR/NTH/ORT/NDR,ORT,eng,TRUE,superadmin,now()
+NDR,الناظور,3,المحافظة,MOR/NTH/ORT/NDR,ORT,ara,TRUE,superadmin,now()
+NDR,Nador,3,Province,MOR/NTH/ORT/NDR,ORT,fra,TRUE,superadmin,now()
+BRK,Berkane,3,Province,MOR/NTH/ORT/BRK,ORT,eng,TRUE,superadmin,now()
+BRK,بَركان,3,المحافظة,MOR/NTH/ORT/BRK,ORT,ara,TRUE,superadmin,now()
+BRK,Berkane,3,Province,MOR/NTH/ORT/BRK,ORT,fra,TRUE,superadmin,now()
+JRD,Jerada ,3,Province,MOR/NTH/ORT/JRD,ORT,eng,TRUE,superadmin,now()
+JRD,جرادة,3,المحافظة,MOR/NTH/ORT/JRD,ORT,ara,TRUE,superadmin,now()
+JRD,Jerada ,3,Province,MOR/NTH/ORT/JRD,ORT,fra,TRUE,superadmin,now()
+STH,South,1,Direction,MOR/STH,MOR,eng,TRUE,superadmin,now()
+STH,جنوب,1,اتجاه,MOR/STH,MOR,ara,TRUE,superadmin,now()
+STH,Sud,1,Direction,MOR/STH,MOR,fra,TRUE,superadmin,now()
+MRS,Marrakesh-Safi,2,Region,MOR/STH/MRS,STH,eng,TRUE,superadmin,now()
+MRS,مراكشآسفي,2,منطقة,MOR/STH/MRS,STH,ara,TRUE,superadmin,now()
+MRS,Marrakesh-Safi,2,Région,MOR/STH/MRS,STH,fra,TRUE,superadmin,now()
+SAF,Safi ,3,Province,MOR/STH/MRS/SAF,MRS,eng,TRUE,superadmin,now()
+SAF,آسفي,3,المحافظة,MOR/STH/MRS/SAF,MRS,ara,TRUE,superadmin,now()
+SAF,Safi ,3,Province,MOR/STH/MRS/SAF,MRS,fra,TRUE,superadmin,now()
+YSF,Youssoufia ,3,Province,MOR/STH/MRS/YSF,MRS,eng,TRUE,superadmin,now()
+YSF,اليوسفية,3,المحافظة,MOR/STH/MRS/YSF,MRS,ara,TRUE,superadmin,now()
+YSF,Youssoufia ,3,Province,MOR/STH/MRS/YSF,MRS,fra,TRUE,superadmin,now()
+SOS,Souss-Massa,2,Region,MOR/STH/SOS,STH,eng,TRUE,superadmin,now()
+SOS,سوسماسة,2,منطقة,MOR/STH/SOS,STH,ara,TRUE,superadmin,now()
+SOS,Sus-Massa,2,Région,MOR/STH/SOS,STH,fra,TRUE,superadmin,now()
+TTA,Tata ,3,Province,MOR/STH/SOS/TTA,SOS,eng,TRUE,superadmin,now()
+TTA,طاطا,3,المحافظة,MOR/STH/SOS/TTA,SOS,ara,TRUE,superadmin,now()
+TTA,Tata ,3,Province,MOR/STH/SOS/TTA,SOS,fra,TRUE,superadmin,now()
+TZT,Tiznit,3,Province,MOR/STH/SOS/TZT,SOS,eng,TRUE,superadmin,now()
+TZT,تزنيت,3,المحافظة,MOR/STH/SOS/TZT,SOS,ara,TRUE,superadmin,now()
+TZT,Tiznit,3,Province,MOR/STH/SOS/TZT,SOS,fra,TRUE,superadmin,now()
diff --git a/data-dml/mosip_master/dml/master-zone_user.csv b/data-dml/mosip_master/dml/master-zone_user.csv
new file mode 100644
index 00000000000..846fad6ed39
--- /dev/null
+++ b/data-dml/mosip_master/dml/master-zone_user.csv
@@ -0,0 +1,132 @@
+zone_code,usr_id,lang_code,is_active,cr_by,cr_dtimes
+NTH,110001,eng,TRUE,superadmin,now()
+NTH,110002,eng,TRUE,superadmin,now()
+NTH,110003,eng,TRUE,superadmin,now()
+RSK,110004,eng,TRUE,superadmin,now()
+CST,110005,eng,TRUE,superadmin,now()
+ORT,110006,eng,TRUE,superadmin,now()
+NTH,110007,eng,TRUE,superadmin,now()
+STH,110008,eng,TRUE,superadmin,now()
+STH,110009,eng,TRUE,superadmin,now()
+STH,110010,eng,TRUE,superadmin,now()
+STH,110011,eng,TRUE,superadmin,now()
+STH,110012,eng,TRUE,superadmin,now()
+MRS,110013,eng,TRUE,superadmin,now()
+MRS,110014,eng,TRUE,superadmin,now()
+MRS,110015,eng,TRUE,superadmin,now()
+MRS,110016,eng,TRUE,superadmin,now()
+SOS,110017,eng,TRUE,superadmin,now()
+SOS,110018,eng,TRUE,superadmin,now()
+SOS,110019,eng,TRUE,superadmin,now()
+SOS,110020,eng,TRUE,superadmin,now()
+NTH,110021,eng,TRUE,superadmin,now()
+NTH,110022,eng,TRUE,superadmin,now()
+RSK,110023,eng,TRUE,superadmin,now()
+NTH,110024,eng,TRUE,superadmin,now()
+ORT,110025,eng,TRUE,superadmin,now()
+NTH,110026,eng,TRUE,superadmin,now()
+STH,110027,eng,TRUE,superadmin,now()
+STH,110028,eng,TRUE,superadmin,now()
+STH,110029,eng,TRUE,superadmin,now()
+NTH,110030,eng,TRUE,superadmin,now()
+NTH,110031,eng,TRUE,superadmin,now()
+NTH,110032,eng,TRUE,superadmin,now()
+CST,110033,eng,TRUE,superadmin,now()
+CST,110034,eng,TRUE,superadmin,now()
+CST,110035,eng,TRUE,superadmin,now()
+ORT,110036,eng,TRUE,superadmin,now()
+ORT,110037,eng,TRUE,superadmin,now()
+ORT,110038,eng,TRUE,superadmin,now()
+ORT,110039,eng,TRUE,superadmin,now()
+ORT,110040,eng,TRUE,superadmin,now()
+ORT,110041,eng,TRUE,superadmin,now()
+ORT,110042,eng,TRUE,superadmin,now()
+ORT,110043,eng,TRUE,superadmin,now()
+ORT,110044,eng,TRUE,superadmin,now()
+ORT,110045,eng,TRUE,superadmin,now()
+ORT,110046,eng,TRUE,superadmin,now()
+ORT,110047,eng,TRUE,superadmin,now()
+ORT,110048,eng,TRUE,superadmin,now()
+ORT,110049,eng,TRUE,superadmin,now()
+ORT,110050,eng,TRUE,superadmin,now()
+ORT,110051,eng,TRUE,superadmin,now()
+ORT,110052,eng,TRUE,superadmin,now()
+ORT,110053,eng,TRUE,superadmin,now()
+ORT,110054,eng,TRUE,superadmin,now()
+ORT,110055,eng,TRUE,superadmin,now()
+ORT,110056,eng,TRUE,superadmin,now()
+ORT,110057,eng,TRUE,superadmin,now()
+NTH,110058,eng,TRUE,superadmin,now()
+NTH,110059,eng,TRUE,superadmin,now()
+NTH,110060,eng,TRUE,superadmin,now()
+NTH,110061,eng,TRUE,superadmin,now()
+STH,110062,eng,TRUE,superadmin,now()
+STH,110063,eng,TRUE,superadmin,now()
+STH,110064,eng,TRUE,superadmin,now()
+STH,110065,eng,TRUE,superadmin,now()
+STH,110066,eng,TRUE,superadmin,now()
+STH,110067,eng,TRUE,superadmin,now()
+STH,110068,eng,TRUE,superadmin,now()
+STH,110069,eng,TRUE,superadmin,now()
+STH,110070,eng,TRUE,superadmin,now()
+STH,110071,eng,TRUE,superadmin,now()
+STH,110072,eng,TRUE,superadmin,now()
+STH,110073,eng,TRUE,superadmin,now()
+STH,110074,eng,TRUE,superadmin,now()
+NTH,110075,eng,TRUE,superadmin,now()
+NTH,110076,eng,TRUE,superadmin,now()
+NTH,110077,eng,TRUE,superadmin,now()
+NTH,110078,eng,TRUE,superadmin,now()
+NTH,110079,eng,TRUE,superadmin,now()
+NTH,110080,eng,TRUE,superadmin,now()
+NTH,110081,eng,TRUE,superadmin,now()
+NTH,110082,eng,TRUE,superadmin,now()
+NTH,110083,eng,TRUE,superadmin,now()
+NTH,110084,eng,TRUE,superadmin,now()
+NTH,110085,eng,TRUE,superadmin,now()
+NTH,110086,eng,TRUE,superadmin,now()
+NTH,110087,eng,TRUE,superadmin,now()
+NTH,110088,eng,TRUE,superadmin,now()
+NTH,110089,eng,TRUE,superadmin,now()
+STH,110090,eng,TRUE,superadmin,now()
+STH,110091,eng,TRUE,superadmin,now()
+STH,110092,eng,TRUE,superadmin,now()
+STH,110093,eng,TRUE,superadmin,now()
+STH,110094,eng,TRUE,superadmin,now()
+STH,110095,eng,TRUE,superadmin,now()
+STH,110096,eng,TRUE,superadmin,now()
+STH,110097,eng,TRUE,superadmin,now()
+STH,110098,eng,TRUE,superadmin,now()
+STH,110099,eng,TRUE,superadmin,now()
+STH,110100,eng,TRUE,superadmin,now()
+STH,110101,eng,TRUE,superadmin,now()
+NTH,110102,eng,TRUE,superadmin,now()
+NTH,110103,eng,TRUE,superadmin,now()
+NTH,110104,eng,TRUE,superadmin,now()
+NTH,110105,eng,TRUE,superadmin,now()
+NTH,110106,eng,TRUE,superadmin,now()
+NTH,110107,eng,TRUE,superadmin,now()
+NTH,110108,eng,TRUE,superadmin,now()
+NTH,110109,eng,TRUE,superadmin,now()
+NTH,110110,eng,TRUE,superadmin,now()
+NTH,110111,eng,TRUE,superadmin,now()
+NTH,110112,eng,TRUE,superadmin,now()
+NTH,110113,eng,TRUE,superadmin,now()
+NTH,110114,eng,TRUE,superadmin,now()
+NTH,110115,eng,TRUE,superadmin,now()
+NTH,110116,eng,TRUE,superadmin,now()
+NTH,110117,eng,TRUE,superadmin,now()
+NTH,110118,eng,TRUE,superadmin,now()
+NTH,110119,eng,TRUE,superadmin,now()
+NTH,110120,eng,TRUE,superadmin,now()
+NTH,110121,eng,TRUE,superadmin,now()
+NTH,110122,eng,TRUE,superadmin,now()
+NTH,110123,eng,TRUE,superadmin,now()
+NTH,110124,eng,TRUE,superadmin,now()
+NTH,110125,eng,TRUE,superadmin,now()
+NTH,110126,eng,TRUE,superadmin,now()
+NTH,110127,eng,TRUE,superadmin,now()
+NTH,110128,eng,TRUE,superadmin,now()
+NTH,110129,eng,TRUE,superadmin,now()
+NTH,110130,eng,TRUE,superadmin,now()
+NTH,110131,eng,TRUE,superadmin,now()
diff --git a/data-dml/mosip_master/dml/master-zone_user_h.csv b/data-dml/mosip_master/dml/master-zone_user_h.csv
new file mode 100644
index 00000000000..1d93bc1458f
--- /dev/null
+++ b/data-dml/mosip_master/dml/master-zone_user_h.csv
@@ -0,0 +1,132 @@
+zone_code,usr_id,lang_code,is_active,cr_by,cr_dtimes,eff_dtimes
+NTH,110001,eng,TRUE,superadmin,now(),now()
+NTH,110002,eng,TRUE,superadmin,now(),now()
+NTH,110003,eng,TRUE,superadmin,now(),now()
+RSK,110004,eng,TRUE,superadmin,now(),now()
+CST,110005,eng,TRUE,superadmin,now(),now()
+ORT,110006,eng,TRUE,superadmin,now(),now()
+NTH,110007,eng,TRUE,superadmin,now(),now()
+STH,110008,eng,TRUE,superadmin,now(),now()
+STH,110009,eng,TRUE,superadmin,now(),now()
+STH,110010,eng,TRUE,superadmin,now(),now()
+STH,110011,eng,TRUE,superadmin,now(),now()
+STH,110012,eng,TRUE,superadmin,now(),now()
+MRS,110013,eng,TRUE,superadmin,now(),now()
+MRS,110014,eng,TRUE,superadmin,now(),now()
+MRS,110015,eng,TRUE,superadmin,now(),now()
+MRS,110016,eng,TRUE,superadmin,now(),now()
+SOS,110017,eng,TRUE,superadmin,now(),now()
+SOS,110018,eng,TRUE,superadmin,now(),now()
+SOS,110019,eng,TRUE,superadmin,now(),now()
+SOS,110020,eng,TRUE,superadmin,now(),now()
+NTH,110021,eng,TRUE,superadmin,now(),now()
+NTH,110022,eng,TRUE,superadmin,now(),now()
+RSK,110023,eng,TRUE,superadmin,now(),now()
+NTH,110024,eng,TRUE,superadmin,now(),now()
+ORT,110025,eng,TRUE,superadmin,now(),now()
+NTH,110026,eng,TRUE,superadmin,now(),now()
+STH,110027,eng,TRUE,superadmin,now(),now()
+STH,110028,eng,TRUE,superadmin,now(),now()
+STH,110029,eng,TRUE,superadmin,now(),now()
+NTH,110030,eng,TRUE,superadmin,now(),now()
+NTH,110031,eng,TRUE,superadmin,now(),now()
+NTH,110032,eng,TRUE,superadmin,now(),now()
+CST,110033,eng,TRUE,superadmin,now(),now()
+CST,110034,eng,TRUE,superadmin,now(),now()
+CST,110035,eng,TRUE,superadmin,now(),now()
+ORT,110036,eng,TRUE,superadmin,now(),now()
+ORT,110037,eng,TRUE,superadmin,now(),now()
+ORT,110038,eng,TRUE,superadmin,now(),now()
+ORT,110039,eng,TRUE,superadmin,now(),now()
+ORT,110040,eng,TRUE,superadmin,now(),now()
+ORT,110041,eng,TRUE,superadmin,now(),now()
+ORT,110042,eng,TRUE,superadmin,now(),now()
+ORT,110043,eng,TRUE,superadmin,now(),now()
+ORT,110044,eng,TRUE,superadmin,now(),now()
+ORT,110045,eng,TRUE,superadmin,now(),now()
+ORT,110046,eng,TRUE,superadmin,now(),now()
+ORT,110047,eng,TRUE,superadmin,now(),now()
+ORT,110048,eng,TRUE,superadmin,now(),now()
+ORT,110049,eng,TRUE,superadmin,now(),now()
+ORT,110050,eng,TRUE,superadmin,now(),now()
+ORT,110051,eng,TRUE,superadmin,now(),now()
+ORT,110052,eng,TRUE,superadmin,now(),now()
+ORT,110053,eng,TRUE,superadmin,now(),now()
+ORT,110054,eng,TRUE,superadmin,now(),now()
+ORT,110055,eng,TRUE,superadmin,now(),now()
+ORT,110056,eng,TRUE,superadmin,now(),now()
+ORT,110057,eng,TRUE,superadmin,now(),now()
+NTH,110058,eng,TRUE,superadmin,now(),now()
+NTH,110059,eng,TRUE,superadmin,now(),now()
+NTH,110060,eng,TRUE,superadmin,now(),now()
+NTH,110061,eng,TRUE,superadmin,now(),now()
+STH,110062,eng,TRUE,superadmin,now(),now()
+STH,110063,eng,TRUE,superadmin,now(),now()
+STH,110064,eng,TRUE,superadmin,now(),now()
+STH,110065,eng,TRUE,superadmin,now(),now()
+STH,110066,eng,TRUE,superadmin,now(),now()
+STH,110067,eng,TRUE,superadmin,now(),now()
+STH,110068,eng,TRUE,superadmin,now(),now()
+STH,110069,eng,TRUE,superadmin,now(),now()
+STH,110070,eng,TRUE,superadmin,now(),now()
+STH,110071,eng,TRUE,superadmin,now(),now()
+STH,110072,eng,TRUE,superadmin,now(),now()
+STH,110073,eng,TRUE,superadmin,now(),now()
+STH,110074,eng,TRUE,superadmin,now(),now()
+NTH,110075,eng,TRUE,superadmin,now(),now()
+NTH,110076,eng,TRUE,superadmin,now(),now()
+NTH,110077,eng,TRUE,superadmin,now(),now()
+NTH,110078,eng,TRUE,superadmin,now(),now()
+NTH,110079,eng,TRUE,superadmin,now(),now()
+NTH,110080,eng,TRUE,superadmin,now(),now()
+NTH,110081,eng,TRUE,superadmin,now(),now()
+NTH,110082,eng,TRUE,superadmin,now(),now()
+NTH,110083,eng,TRUE,superadmin,now(),now()
+NTH,110084,eng,TRUE,superadmin,now(),now()
+NTH,110085,eng,TRUE,superadmin,now(),now()
+NTH,110086,eng,TRUE,superadmin,now(),now()
+NTH,110087,eng,TRUE,superadmin,now(),now()
+NTH,110088,eng,TRUE,superadmin,now(),now()
+NTH,110089,eng,TRUE,superadmin,now(),now()
+STH,110090,eng,TRUE,superadmin,now(),now()
+STH,110091,eng,TRUE,superadmin,now(),now()
+STH,110092,eng,TRUE,superadmin,now(),now()
+STH,110093,eng,TRUE,superadmin,now(),now()
+STH,110094,eng,TRUE,superadmin,now(),now()
+STH,110095,eng,TRUE,superadmin,now(),now()
+STH,110096,eng,TRUE,superadmin,now(),now()
+STH,110097,eng,TRUE,superadmin,now(),now()
+STH,110098,eng,TRUE,superadmin,now(),now()
+STH,110099,eng,TRUE,superadmin,now(),now()
+STH,110100,eng,TRUE,superadmin,now(),now()
+STH,110101,eng,TRUE,superadmin,now(),now()
+NTH,110102,eng,TRUE,superadmin,now(),now()
+NTH,110103,eng,TRUE,superadmin,now(),now()
+NTH,110104,eng,TRUE,superadmin,now(),now()
+NTH,110105,eng,TRUE,superadmin,now(),now()
+NTH,110106,eng,TRUE,superadmin,now(),now()
+NTH,110107,eng,TRUE,superadmin,now(),now()
+NTH,110108,eng,TRUE,superadmin,now(),now()
+NTH,110109,eng,TRUE,superadmin,now(),now()
+NTH,110110,eng,TRUE,superadmin,now(),now()
+NTH,110111,eng,TRUE,superadmin,now(),now()
+NTH,110112,eng,TRUE,superadmin,now(),now()
+NTH,110113,eng,TRUE,superadmin,now(),now()
+NTH,110114,eng,TRUE,superadmin,now(),now()
+NTH,110115,eng,TRUE,superadmin,now(),now()
+NTH,110116,eng,TRUE,superadmin,now(),now()
+NTH,110117,eng,TRUE,superadmin,now(),now()
+NTH,110118,eng,TRUE,superadmin,now(),now()
+NTH,110119,eng,TRUE,superadmin,now(),now()
+NTH,110120,eng,TRUE,superadmin,now(),now()
+NTH,110121,eng,TRUE,superadmin,now(),now()
+NTH,110122,eng,TRUE,superadmin,now(),now()
+NTH,110123,eng,TRUE,superadmin,now(),now()
+NTH,110124,eng,TRUE,superadmin,now(),now()
+NTH,110125,eng,TRUE,superadmin,now(),now()
+NTH,110126,eng,TRUE,superadmin,now(),now()
+NTH,110127,eng,TRUE,superadmin,now(),now()
+NTH,110128,eng,TRUE,superadmin,now(),now()
+NTH,110129,eng,TRUE,superadmin,now(),now()
+NTH,110130,eng,TRUE,superadmin,now(),now()
+NTH,110131,eng,TRUE,superadmin,now(),now()
diff --git a/data-dml/mosip_master/mosip_master_deploy.properties b/data-dml/mosip_master/mosip_master_deploy.properties
new file mode 100644
index 00000000000..f474fa3f736
--- /dev/null
+++ b/data-dml/mosip_master/mosip_master_deploy.properties
@@ -0,0 +1,10 @@
+DB_SERVERIP=
+DB_PORT=
+SU_USER=postgres
+DEFAULT_DB_NAME=postgres
+MOSIP_DB_NAME=mosip_master
+SYSADMIN_USER=sysadmin
+BASEPATH=/home/madmin/database/
+LOG_PATH=/home/madmin/logs/
+DML_FLAG=1
+DML_FILENAME=mosip_master_dml_deploy.sql
diff --git a/data-dml/mosip_master/mosip_master_dml_deploy.sh b/data-dml/mosip_master/mosip_master_dml_deploy.sh
new file mode 100644
index 00000000000..a1b2aedb790
--- /dev/null
+++ b/data-dml/mosip_master/mosip_master_dml_deploy.sh
@@ -0,0 +1,70 @@
+### -- ---------------------------------------------------------------------------------------------------------
+### -- Script Name : DML deploy
+### -- Deploy Module : MOSIP MASTER / ADMIN SERVICES
+### -- Purpose : To deploy Database DMLs.
+### -- Create By : Sadanandegowda DM
+### -- Created Date : Nov-2020
+### --
+### -- Modified Date Modified By Comments / Remarks
+### -- -----------------------------------------------------------------------------------------------------------
+
+#########Properties file #############
+set -e
+properties_file="$1"
+echo `date "+%m/%d/%Y %H:%M:%S"` ": $properties_file"
+#properties_file="./app.properties"
+if [ -f "$properties_file" ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Property file \"$properties_file\" found."
+ while IFS='=' read -r key value
+ do
+ key=$(echo $key | tr '.' '_')
+ eval ${key}=\${value}
+ done < "$properties_file"
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Property file not found, Pass property file name as argument."
+fi
+echo `date "+%m/%d/%Y %H:%M:%S"` ": ------------------ Database server and service status check for ${MOSIP_DB_NAME}------------------------"
+##############################################LOG FILE CREATION#############################################################
+
+today=`date '+%d%m%Y_%H%M%S'`;
+LOG="${LOG_PATH}${MOSIP_DB_NAME}-dml-${today}.log"
+touch $LOG
+
+
+SERVICE=$(PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -t -c "select count(1) from pg_roles where rolname IN('sysadmin')";exit; > /dev/null)
+
+if [ "$SERVICE" -eq 0 ] || [ "$SERVICE" -eq 1 ]
+then
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Postgres database server and service is up and running" | tee -a $LOG 2>&1
+else
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Postgres database server or service is not running" | tee -a $LOG 2>&1
+fi
+
+echo `date "+%m/%d/%Y %H:%M:%S"` ": ----------------------------------------------------------------------------------------"
+
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Started sourcing the $MOSIP_DB_NAME Database DML scripts" | tee -a $LOG 2>&1
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Database scripts are sourcing from :$BASEPATH" | tee -a $LOG 2>&1
+
+#========================================DB DML Deployment process begins on DB SERVER======================================
+
+if [ ${DML_FLAG} == 1 ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Deploying DML for ${MOSIP_DB_NAME} database" | tee -a $LOG 2>&1
+ PGPASSWORD=$SYSADMIN_PWD psql --username=$SYSADMIN_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -a -b -f $DML_FILENAME >> $LOG 2>&1
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": There are no DML deployment required for ${MOSIP_DB_NAME}" | tee -a $LOG 2>&1
+fi
+
+if [ $(grep -c ERROR $LOG) -ne 0 ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Database DML deployment is completed with ERRORS, Please check the logs for more information" | tee -a $LOG 2>&1
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": END of MOSIP database deployment" | tee -a $LOG 2>&1
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Database DML deployment completed successfully, Please check the logs for more information" | tee -a $LOG 2>&1
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": END of MOSIP \"${MOSIP_DB_NAME}\" database deployment" | tee -a $LOG 2>&1
+fi
+
+echo "******************************************"`date "+%m/%d/%Y %H:%M:%S"` "*****************************************************" >> $LOG 2>&1
+
+#========================================DB DML Deployment process completes on DB SERVER======================================
diff --git a/data-dml/mosip_master/mosip_master_dml_deploy.sql b/data-dml/mosip_master/mosip_master_dml_deploy.sql
new file mode 100644
index 00000000000..2017b59c637
--- /dev/null
+++ b/data-dml/mosip_master/mosip_master_dml_deploy.sql
@@ -0,0 +1,303 @@
+\c mosip_master sysadmin
+
+\set CSVDataPath '\'/home/dbadmin/mosip_master/dml'
+
+-------------- Level 1 data load scripts ------------------------
+
+----- TRUNCATE master.app_detail TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.app_detail cascade ;
+
+\COPY master.app_detail (id,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-app_detail.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.authentication_method TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.authentication_method cascade ;
+
+\COPY master.authentication_method (code,method_seq,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-authentication_method.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.biometric_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.biometric_type cascade ;
+
+\COPY master.biometric_type (code,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-biometric_type.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.blacklisted_words TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.blacklisted_words cascade ;
+
+\COPY master.blacklisted_words (word,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-blacklisted_words.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.device_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.device_type cascade ;
+
+\COPY master.device_type (code,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-device_type.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.doc_category TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.doc_category cascade ;
+
+\COPY master.doc_category (code,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-doc_category.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.doc_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.doc_type cascade ;
+
+\COPY master.doc_type (code,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-doc_type.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.gender TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.gender cascade ;
+
+\COPY master.gender (code,name,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-gender.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.id_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.id_type cascade ;
+
+\COPY master.id_type (code,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-id_type.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.language TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.language cascade ;
+
+\COPY master.language (code,name,family,native_name,is_active,cr_by,cr_dtimes) FROM './dml/master-language.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.machine_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.machine_type cascade ;
+
+\COPY master.machine_type (code,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-machine_type.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.module_detail TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.module_detail cascade ;
+
+\COPY master.module_detail (id,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-module_detail.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.process_list TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.process_list cascade ;
+
+\COPY master.process_list (id,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-process_list.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.reason_category TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.reason_category cascade ;
+
+\COPY master.reason_category (code,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-reason_category.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.reg_center_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.reg_center_type cascade ;
+
+\COPY master.reg_center_type (code,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-reg_center_type.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.role_list TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.role_list cascade ;
+
+\COPY master.role_list (code,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-role_list.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.status_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.status_type cascade ;
+
+\COPY master.status_type (code,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-status_type.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.template_file_format TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.template_file_format cascade ;
+
+\COPY master.template_file_format (code,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-template_file_format.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.template_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.template_type cascade ;
+
+\COPY master.template_type (code,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-template_type.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.title TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.title cascade ;
+
+\COPY master.title (code,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-title.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.individual_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.individual_type cascade ;
+
+\COPY master.individual_type (code,name,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-individual_type.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.zone TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.zone cascade ;
+
+\COPY master.zone (code,name,hierarchy_level,hierarchy_level_name,hierarchy_path,parent_zone_code,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-zone.csv' delimiter ',' HEADER csv;
+
+
+----- TRUNCATE master.daysofweek_list TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.daysofweek_list cascade ;
+
+\COPY master.daysofweek_list (code,name,day_seq,is_global_working,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-daysofweek_list.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.loc_hierarchy_list TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.loc_hierarchy_list cascade ;
+
+\COPY master.loc_hierarchy_list (hierarchy_level,hierarchy_level_name,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-loc_hierarchy_list.csv' delimiter ',' HEADER csv;
+
+
+----- TRUNCATE master.identity_schema TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.identity_schema cascade ;
+
+\COPY master.identity_schema (id,id_version,title,description,id_attr_json,schema_json,status_code,add_props,effective_from,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-identity_schema.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.sync_job_def TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.sync_job_def cascade ;
+
+\COPY master.sync_job_def (ID,NAME,API_NAME,PARENT_SYNCJOB_ID,SYNC_FREQ,LOCK_DURATION,LANG_CODE,IS_ACTIVE,CR_BY,CR_DTIMES,UPD_BY,UPD_DTIMES,IS_DELETED,DEL_DTIMES) FROM './dml/master-sync_job_def.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.dynamic_field TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.dynamic_field cascade ;
+
+\COPY master.dynamic_field (id,name,description,data_type,value_json,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-dynamic_field.csv' delimiter ',' HEADER csv;
+
+
+
+-------------- Level 2 data load scripts ------------------------
+
+----- TRUNCATE master.location TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.location cascade ;
+
+\COPY master.location (code,name,hierarchy_level,hierarchy_level_name,parent_loc_code,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-location.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.app_authentication_method TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.app_authentication_method cascade ;
+
+\COPY master.app_authentication_method (app_id,process_id,role_code,auth_method_code,method_seq,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-app_authentication_method.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.app_role_priority TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.app_role_priority cascade ;
+
+\COPY master.app_role_priority (app_id,process_id,role_code,priority,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-app_role_priority.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.biometric_attribute TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.biometric_attribute cascade ;
+
+\COPY master.biometric_attribute (code,name,descr,bmtyp_code,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-biometric_attribute.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.device_spec TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.device_spec cascade ;
+
+\COPY master.device_spec (id,name,brand,model,dtyp_code,min_driver_ver,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-device_spec.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.loc_holiday TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.loc_holiday cascade ;
+
+\COPY master.loc_holiday (id,location_code,holiday_date,holiday_name,holiday_desc,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-loc_holiday.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.machine_spec TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.machine_spec cascade ;
+
+\COPY master.machine_spec (id,name,brand,model,mtyp_code,min_driver_ver,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-machine_spec.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.reason_list TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.reason_list cascade ;
+
+\COPY master.reason_list (code,name,descr,rsncat_code,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-reason_list.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.registration_center TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.registration_center cascade ;
+
+\COPY master.registration_center (id,name,cntrtyp_code,addr_line1,addr_line2,addr_line3,latitude,longitude,location_code,contact_phone,contact_person,number_of_kiosks,working_hours,per_kiosk_process_time,center_start_time,center_end_time,lunch_start_time,lunch_end_time,time_zone,holiday_loc_code,zone_code,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-registration_center.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.screen_detail TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.screen_detail cascade ;
+
+\COPY master.screen_detail (id,app_id,name,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-screen_detail.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.status_list TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.status_list cascade ;
+
+\COPY master.status_list (code,descr,sttyp_code,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-status_list.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.template TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.template cascade ;
+
+\COPY master.template (id,name,descr,file_format_code,model,file_txt,module_id,module_name,template_typ_code,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-template.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.applicant_valid_document TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.applicant_valid_document cascade ;
+
+\COPY master.applicant_valid_document (apptyp_code,doccat_code,doctyp_code,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-applicant_valid_document.csv' delimiter ',' HEADER csv;
+
+
+----- TRUNCATE master.valid_document TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.valid_document cascade ;
+
+\COPY master.valid_document (doctyp_code,doccat_code,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-valid_document.csv' delimiter ',' HEADER csv;
+
+
+-------------- Level 3 data load scripts ------------------------
+
+----- TRUNCATE master.device_master TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.device_master cascade ;
+
+\COPY master.device_master (id,name,mac_address,serial_num,ip_address,dspec_id,zone_code,regcntr_id,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-device_master.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.machine_master TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.machine_master cascade ;
+
+\COPY master.machine_master (id,name,mac_address,serial_num,ip_address,mspec_id,public_key,key_index,zone_code,regcntr_id,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-machine_master.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.screen_authorization TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.screen_authorization cascade ;
+
+\COPY master.screen_authorization (screen_id,role_code,lang_code,is_permitted,is_active,cr_by,cr_dtimes) FROM './dml/master-screen_authorization.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.user_detail TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.user_detail cascade ;
+
+\COPY master.user_detail (id,uin,name,email,mobile,status_code,regcntr_id,lang_code,last_login_method,is_active,cr_by,cr_dtimes) FROM './dml/master-user_detail.csv' delimiter ',' HEADER csv;
+
+
+----- TRUNCATE master.reg_working_nonworking TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.reg_working_nonworking cascade ;
+
+\COPY master.reg_working_nonworking (regcntr_id,day_code,lang_code,is_working,is_active,cr_by,cr_dtimes) FROM './dml/master-reg_working_nonworking.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.reg_exceptional_holiday TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.reg_exceptional_holiday cascade ;
+
+\COPY master.reg_exceptional_holiday (regcntr_id,hol_date,hol_name,hol_reason,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-reg_exceptional_holiday.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.zone_user TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.zone_user cascade ;
+
+\COPY master.zone_user (zone_code,usr_id,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-zone_user.csv' delimiter ',' HEADER csv;
+
+-------------- Level 4 data load scripts ------------------------
+
+----- TRUNCATE master.device_master_h TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.device_master_h cascade ;
+
+\COPY master.device_master_h (id,name,mac_address,serial_num,ip_address,dspec_id,zone_code,regcntr_id,lang_code,is_active,cr_by,cr_dtimes,eff_dtimes) FROM './dml/master-device_master_h.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.machine_master_h TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.machine_master_h cascade ;
+
+\COPY master.machine_master_h (id,name,mac_address,serial_num,ip_address,mspec_id,public_key,key_index,zone_code,regcntr_id,lang_code,is_active,cr_by,cr_dtimes,eff_dtimes) FROM './dml/master-machine_master_h.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.registration_center_h TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.registration_center_h cascade ;
+
+\COPY master.registration_center_h (id,name,cntrtyp_code,addr_line1,addr_line2,addr_line3,latitude,longitude,location_code,contact_phone,contact_person,number_of_kiosks,working_hours,per_kiosk_process_time,center_start_time,center_end_time,lunch_start_time,lunch_end_time,time_zone,holiday_loc_code,zone_code,lang_code,is_active,cr_by,cr_dtimes,eff_dtimes) FROM './dml/master-registration_center_h.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.user_detail_h TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.user_detail_h cascade ;
+
+\COPY master.user_detail_h (id,uin,name,email,mobile,status_code,regcntr_id,lang_code,last_login_method,is_active,cr_by,cr_dtimes,eff_dtimes) FROM './dml/master-user_detail_h.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE master.zone_user TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE master.zone_user_h cascade ;
+
+\COPY master.zone_user_h (zone_code,usr_id,lang_code,is_active,cr_by,cr_dtimes,eff_dtimes) FROM './dml/master-zone_user_h.csv' delimiter ',' HEADER csv;
+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data-dml/mosip_pms/dml/pms-auth_policy.csv b/data-dml/mosip_pms/dml/pms-auth_policy.csv
new file mode 100644
index 00000000000..f15bfa7abf5
--- /dev/null
+++ b/data-dml/mosip_pms/dml/pms-auth_policy.csv
@@ -0,0 +1,8 @@
+id,policy_group_id,name,descr,policy_file_id,policy_type,version,policy_schema,valid_from_date,valid_to_date,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes
+mpolicy-default-auth,mpolicygroup-default-auth,mpolicy-default-auth,mpolicy-default-auth,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare-service"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now()
+mpolicy-default-abis,mpolicygroup-deafult-abis,mpolicy-default-abis,mpolicy-default-abis,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare-service"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now()
+mpolicy-default-qrcode,mpolicygroup-deafult-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare-service"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now()
+mpolicy-default-euin,mpolicygroup-deafult-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare-service"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now()
+mpolicy-default-reprint,mpolicygroup-deafult-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare-service"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now()
+mpolicy-default-resident,mpolicygroup-deafult-resident,mpolicy-default-resident,mpolicy-default-resident,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare-service"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now()
+mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-adjudication,mpolicy-default-adjudication,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""},{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""100000"",""encryptionType"":""none"",""shareDomain"":""datashare-service"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now()
diff --git a/data-dml/mosip_pms/dml/pms-auth_policy_h.csv b/data-dml/mosip_pms/dml/pms-auth_policy_h.csv
new file mode 100644
index 00000000000..720b6c6e3b4
--- /dev/null
+++ b/data-dml/mosip_pms/dml/pms-auth_policy_h.csv
@@ -0,0 +1,8 @@
+id,eff_dtimes,policy_group_id,name,descr,policy_file_id,policy_type,version,policy_schema,valid_from_date,valid_to_date,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes
+mpolicy-default-auth,11-10-2020 05:55,mpolicygroup-default-auth,mpolicy-default-auth,mpolicy-default-auth,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare-service"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now()
+mpolicy-default-abis,11-11-2020 05:56,mpolicygroup-deafult-abis,mpolicy-default-abis,mpolicy-default-abis,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare-service"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/29/2025 9:37,TRUE,admin,now(),admin,now()
+mpolicy-default-qrcode,11-12-2020 05:57,mpolicygroup-deafult-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare-service"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/30/2025 9:37,TRUE,admin,now(),admin,now()
+mpolicy-default-euin,11/13/2020 5:58,mpolicygroup-deafult-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare-service"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),05-01-2025 09:37,TRUE,admin,now(),admin,now()
+mpolicy-default-reprint,11/14/2020 5:59,mpolicygroup-deafult-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare-service"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),05-02-2025 09:37,TRUE,admin,now(),admin,now()
+mpolicy-default-resident,11/14/2020 5:59,mpolicygroup-deafult-resident,mpolicy-default-resident,mpolicy-default-resident,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare-service"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),05-02-2025 09:37,TRUE,admin,now(),admin,now()
+mpolicy-default-adjudication,11/14/2020 5:59,mpolicygroup-default-adjudication,mpolicy-default-adjudication,mpolicy-default-adjudication,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""},{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare-service"",""source"":""Packet""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),05-02-2025 09:37,TRUE,admin,now(),admin,now()
diff --git a/data-dml/mosip_pms/dml/pms-partner.csv b/data-dml/mosip_pms/dml/pms-partner.csv
new file mode 100644
index 00000000000..fb9698ad053
--- /dev/null
+++ b/data-dml/mosip_pms/dml/pms-partner.csv
@@ -0,0 +1,7 @@
+id,policy_group_id,name,address,contact_no,email_id,certificate_alias,user_id,partner_type_code,approval_status,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes
+mpartner-default-auth,mpolicygroup-default-auth,mpartner-default-auth,mpartner-default-auth,9232121212,info@mosip.io,,mpartner-default-auth,Online_Verification_Partner,Activated,TRUE,superadmin,now(),superadmin,now()
+mpartner-default-abis,mpolicygroup-deafult-abis,mpartner-default-abis,mpartner-default-abis,9232121212,absi@mosip.io,,mpartner-default-abis,ABIS_Partner,Activated,TRUE,superadmin,now(),superadmin,now()
+mpartner-default-print,mpolicygroup-deafult-print,mpartner-default-print,mpartner-default-print,9232121212,print@mosip.io,,mpartner-default-print,Credential_Partner,Activated,TRUE,superadmin,now(),superadmin,now()
+MOSIP.PROXY.SBI,mpolicygroup-default-mockdevice,MOSIP,headoffice9,9988776655,abc@mock.co.in,,MOSIP.PROXY.SBI,Device_Provider,Activated,TRUE,superadmin,now(),superadmin,now()
+mpartner-default-resident,mpolicygroup-deafult-resident,mpartner-default-resident,mpartner-default-resident,9232121212,resident@mosip.io,,mpartner-default-resident,Credential_Partner,Activated,TRUE,superadmin,now(),superadmin,now()
+mpartner-default-adjudication,mpolicygroup-default-adjudication,mpartner-default-adjudication,mpartner-default-adjudication,9232121212,adjudication@mosip.io,,mpartner-default-adjudication,Manual_Adjudication,Activated,TRUE,superadmin,now(),superadmin,now()
diff --git a/data-dml/mosip_pms/dml/pms-partner_h.csv b/data-dml/mosip_pms/dml/pms-partner_h.csv
new file mode 100644
index 00000000000..97d17e89e6a
--- /dev/null
+++ b/data-dml/mosip_pms/dml/pms-partner_h.csv
@@ -0,0 +1,7 @@
+id,eff_dtimes,policy_group_id,name,address,contact_no,email_id,certificate_alias,user_id,partner_type_code,approval_status,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes
+mpartner-default-auth,now(),mpolicygroup-default-auth,mpartner-default-auth,mpartner-default-auth,9232121212,info@mosip.io,,mpartner-default-auth,Online_Verification_Partner,Activated,TRUE,superadmin,now(),superadmin,now()
+mpartner-default-abis,now(),mpolicygroup-deafult-abis,mpartner-default-abis,mpartner-default-abis,9232121212,absi@mosip.io,,mpartner-default-abis,ABIS_Partner,Activated,TRUE,superadmin,now(),superadmin,now()
+mpartner-default-print,now(),mpolicygroup-deafult-print,mpartner-default-print,mpartner-default-print,9232121212,print@mosip.io,,mpartner-default-print,Credential_Partner,Activated,TRUE,superadmin,now(),superadmin,now()
+MOSIP.PROXY.SBI,now(),mpolicygroup-default-mockdevice,MOSIP,headoffice9,9988776655,abc@mock.co.in,,MOSIP.PROXY.SBI,Device_Provider,Activated,TRUE,superadmin,now(),superadmin,now()
+mpartner-default-resident,now(),mpolicygroup-deafult-resident,mpartner-default-resident,mpartner-default-resident,9232121212,resident@mosip.io,,mpartner-default-resident,Credential_Partner,Activated,TRUE,superadmin,now(),superadmin,now()
+mpartner-default-adjudication,now(),mpolicygroup-default-adjudication,mpartner-default-adjudication,mpartner-default-adjudication,9232121212,adjudication@mosip.io,,mpartner-default-adjudication,Manual_Adjudication,Activated,TRUE,superadmin,now(),superadmin,now()
diff --git a/data-dml/mosip_pms/dml/pms-partner_policy.csv b/data-dml/mosip_pms/dml/pms-partner_policy.csv
new file mode 100644
index 00000000000..c7879570027
--- /dev/null
+++ b/data-dml/mosip_pms/dml/pms-partner_policy.csv
@@ -0,0 +1,8 @@
+policy_api_key,part_id,policy_id,valid_from_datetime,valid_to_datetime,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes
+mpolicy_part_auth_api,mpartner-default-auth,mpolicy-default-auth,now(),12-01-2025 05:31,TRUE,admin,now(),admin,now()
+mpolicy_part_abis_api,mpartner-default-abis,mpolicy-default-abis,now(),12-01-2025 05:31,TRUE,admin,now(),admin,now()
+mpolicy_part_qrcode_api,mpartner-default-print,mpolicy-default-qrcode,now(),12-01-2025 05:31,TRUE,admin,now(),admin,now()
+mpolicy_part_euin_api,mpartner-default-print,mpolicy-default-euin,now(),12-01-2025 05:31,TRUE,admin,now(),admin,now()
+mpolicy_part_reprint_api,mpartner-default-print,mpolicy-default-reprint,now(),12-01-2025 05:31,TRUE,admin,now(),admin,now()
+mpolicy_part_resident_api,mpartner-default-resident,mpolicy-default-resident,now(),12-01-2025 05:31,TRUE,admin,now(),admin,now()
+mpolicy_part_adjudica_api,mpartner-default-adjudication,mpolicy-default-adjudication,now(),12-01-2025 05:31,TRUE,admin,now(),admin,now()
diff --git a/data-dml/mosip_pms/dml/pms-partner_policy_bioextract.csv b/data-dml/mosip_pms/dml/pms-partner_policy_bioextract.csv
new file mode 100644
index 00000000000..1d259a6308c
--- /dev/null
+++ b/data-dml/mosip_pms/dml/pms-partner_policy_bioextract.csv
@@ -0,0 +1,13 @@
+id,part_id,policy_id,attribute_name,extractor_provider,extractor_provider_version,biometric_modality,biometric_sub_types,cr_by,cr_dtimes,upd_by,upd_dtimes
+146098,mpartner-default-auth,mpolicy-default-auth,photo,mock,1.1,face,,admin,now(),admin,now()
+146099,mpartner-default-auth,mpolicy-default-auth,iris,mock,1.1,iris,,admin,now(),admin,now()
+146100,mpartner-default-auth,mpolicy-default-auth,fingerprint,mock,1.1,finger,,admin,now(),admin,now()
+146101,mpartner-default-print,mpolicy-default-qrcode,photo,mock,1.1,face,,admin,now(),admin,now()
+146102,mpartner-default-print,mpolicy-default-qrcode,iris,mock,1.1,iris,,admin,now(),admin,now()
+146103,mpartner-default-print,mpolicy-default-qrcode,fingerprint,mock,1.1,finger,,admin,now(),admin,now()
+146104,mpartner-default-print,mpolicy-default-euin,photo,mock,1.1,face,,admin,now(),admin,now()
+146105,mpartner-default-print,mpolicy-default-euin,iris,mock,1.1,iris,,admin,now(),admin,now()
+146106,mpartner-default-print,mpolicy-default-euin,fingerprint,mock,1.1,finger,,admin,now(),admin,now()
+146107,mpartner-default-print,mpolicy-default-reprint,photo,mock,1.1,face,,admin,now(),admin,now()
+146108,mpartner-default-print,mpolicy-default-reprint,iris,mock,1.1,iris,,admin,now(),admin,now()
+146109,mpartner-default-print,mpolicy-default-reprint,fingerprint,mock,1.1,finger,,admin,now(),admin,now()
diff --git a/data-dml/mosip_pms/dml/pms-partner_policy_credential_type.csv b/data-dml/mosip_pms/dml/pms-partner_policy_credential_type.csv
new file mode 100644
index 00000000000..fd8614804f4
--- /dev/null
+++ b/data-dml/mosip_pms/dml/pms-partner_policy_credential_type.csv
@@ -0,0 +1,5 @@
+part_id,policy_id,credential_type,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes,is_deleted,del_dtimes
+mpartner-default-print,mpolicy-default-qrcode,qrcode,TRUE,system,12-01-2020 05:31,,,FALSE,
+mpartner-default-print,mpolicy-default-euin,euin,TRUE,system,12-01-2020 05:31,,,FALSE,
+mpartner-default-print,mpolicy-default-reprint,reprint,TRUE,system,12-01-2020 05:31,,,FALSE,
+mpartner-default-auth,mpolicy-default-auth,auth,TRUE,system,12-01-2020 05:31,,,FALSE,
diff --git a/data-dml/mosip_pms/dml/pms-partner_policy_request.csv b/data-dml/mosip_pms/dml/pms-partner_policy_request.csv
new file mode 100644
index 00000000000..7ef5505652e
--- /dev/null
+++ b/data-dml/mosip_pms/dml/pms-partner_policy_request.csv
@@ -0,0 +1,8 @@
+id,part_id,policy_id,request_datetimes,request_detail,status_code,cr_by,cr_dtimes,upd_by,upd_dtimes
+mpartner_policy_auth_req,mpartner-default-auth,mpolicy-default-auth,now(),mpolicy-default-auth,Approved,admin,now(),admin,now()
+mpartner_policy_abis_req,mpartner-default-abis,mpolicy-default-abis,now(),mpolicy-default-abis,Approved,admin,now(),admin,now()
+mpartner_policy_qrcode_req,mpartner-default-print,mpolicy-default-qrcode,now(),mpolicy-default-qrcode,Approved,admin,now(),admin,now()
+mpartner_policy_euin_req,mpartner-default-print,mpolicy-default-euin,now(),mpolicy-default-euin,Approved,admin,now(),admin,now()
+mpartner_policy_reprint_req,mpartner-default-print,mpolicy-default-reprint,now(),mpolicy-default-reprint,Approved,admin,now(),admin,now()
+mpartner_policy_resident_req,mpartner-default-resident,mpolicy-default-resident,now(),mpolicy-default-resident,Approved,admin,now(),admin,now()
+mpartner_policy_ajudica_req,mpartner-default-adjudication,mpolicy-default-adjudication,now(),mpolicy-default-adjudication,Approved,admin,now(),admin,now()
diff --git a/data-dml/mosip_pms/dml/pms-partner_type.csv b/data-dml/mosip_pms/dml/pms-partner_type.csv
new file mode 100644
index 00000000000..8df84776d93
--- /dev/null
+++ b/data-dml/mosip_pms/dml/pms-partner_type.csv
@@ -0,0 +1,10 @@
+code,partner_description,is_active,cr_by,cr_dtimes,is_policy_required
+Auth_Partner,Auth Partner,TRUE,superadmin,now(),TRUE
+Device_Provider,Device Provider,TRUE,superadmin,now(),FALSE
+Credential_Partner,Credential Partner,TRUE,superadmin,now(),TRUE
+Partner_Admin,Partner Admin,TRUE,superadmin,now(),FALSE
+FTM_Provider,FTM Provider,TRUE,superadmin,now(),FALSE
+Online_Verification_Partner,Online_Verification_Partner,TRUE,superadmin,now(),TRUE
+ABIS_Partner,ABIS Partner,TRUE,superadmin,now(),TRUE
+Manual_Adjudication,Manual Adjudication,TRUE,superadmin,now(),TRUE
+MISP_Partner,MISP_Partner,TRUE,superadmin,now(),FALSE
diff --git a/data-dml/mosip_pms/dml/pms-policy_group.csv b/data-dml/mosip_pms/dml/pms-policy_group.csv
new file mode 100644
index 00000000000..a50dc09591e
--- /dev/null
+++ b/data-dml/mosip_pms/dml/pms-policy_group.csv
@@ -0,0 +1,7 @@
+id,name,descr,user_id,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes
+mpolicygroup-default-auth,mpolicygroup-default-auth,mpolicygroup-default-auth,superadmin,TRUE,superadmin,now(),superadmin,now()
+mpolicygroup-deafult-abis,mpolicygroup-deafult-abis,mpolicygroup-deafult-abis,superadmin,TRUE,superadmin,now(),superadmin,now()
+mpolicygroup-deafult-print,mpolicygroup-deafult-print,mpolicygroup-deafult-print,superadmin,TRUE,superadmin,now(),superadmin,now()
+mpolicygroup-default-mockdevice,mmpolicygroup-default-mockdevice,mpolicygroup-default-mockdevice,superadmin,TRUE,superadmin,now(),superadmin,now()
+mpolicygroup-deafult-resident,mpolicygroup-deafult-resident,mpolicygroup-deafult-resident,superadmin,TRUE,superadmin,now(),superadmin,now()
+mpolicygroup-default-adjudication,mpolicygroup-default-adjudication, mpolicygroup-deafult-resident,superadmin,TRUE,superadmin,now(),superadmin,now()
diff --git a/data-dml/mosip_pms/mosip_pms_deploy.properties b/data-dml/mosip_pms/mosip_pms_deploy.properties
new file mode 100644
index 00000000000..34f6e62a719
--- /dev/null
+++ b/data-dml/mosip_pms/mosip_pms_deploy.properties
@@ -0,0 +1,10 @@
+DB_SERVERIP=
+DB_PORT=
+SU_USER=postgres
+DEFAULT_DB_NAME=postgres
+MOSIP_DB_NAME=mosip_pms
+SYSADMIN_USER=sysadmin
+BASEPATH=/home/madmin/database/
+LOG_PATH=/home/madmin/logs/
+DML_FLAG=1
+DML_FILENAME=mosip_pms_dml_deploy.sql
diff --git a/data-dml/mosip_pms/mosip_pms_dml_deploy.sh b/data-dml/mosip_pms/mosip_pms_dml_deploy.sh
new file mode 100644
index 00000000000..88848df68b7
--- /dev/null
+++ b/data-dml/mosip_pms/mosip_pms_dml_deploy.sh
@@ -0,0 +1,70 @@
+### -- ---------------------------------------------------------------------------------------------------------
+### -- Script Name : DML deploy
+### -- Deploy Module : MOSIP PARTNER MANAGEMENT SERVICE
+### -- Purpose : To deploy Database DMLs.
+### -- Create By : Sadanandegowda DM
+### -- Created Date : Nov-2020
+### --
+### -- Modified Date Modified By Comments / Remarks
+### -- -----------------------------------------------------------------------------------------------------------
+
+#########Properties file #############
+set -e
+properties_file="$1"
+echo `date "+%m/%d/%Y %H:%M:%S"` ": $properties_file"
+#properties_file="./app.properties"
+if [ -f "$properties_file" ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Property file \"$properties_file\" found."
+ while IFS='=' read -r key value
+ do
+ key=$(echo $key | tr '.' '_')
+ eval ${key}=\${value}
+ done < "$properties_file"
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Property file not found, Pass property file name as argument."
+fi
+echo `date "+%m/%d/%Y %H:%M:%S"` ": ------------------ Database server and service status check for ${MOSIP_DB_NAME}------------------------"
+##############################################LOG FILE CREATION#############################################################
+
+today=`date '+%d%m%Y_%H%M%S'`;
+LOG="${LOG_PATH}${MOSIP_DB_NAME}-dml-${today}.log"
+touch $LOG
+
+
+SERVICE=$(PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -t -c "select count(1) from pg_roles where rolname IN('sysadmin')";exit; > /dev/null)
+
+if [ "$SERVICE" -eq 0 ] || [ "$SERVICE" -eq 1 ]
+then
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Postgres database server and service is up and running" | tee -a $LOG 2>&1
+else
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Postgres database server or service is not running" | tee -a $LOG 2>&1
+fi
+
+echo `date "+%m/%d/%Y %H:%M:%S"` ": ----------------------------------------------------------------------------------------"
+
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Started sourcing the $MOSIP_DB_NAME Database DML scripts" | tee -a $LOG 2>&1
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Database scripts are sourcing from :$BASEPATH" | tee -a $LOG 2>&1
+
+#========================================DB DML Deployment process begins on DB SERVER======================================
+
+if [ ${DML_FLAG} == 1 ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Deploying DML for ${MOSIP_DB_NAME} database" | tee -a $LOG 2>&1
+ PGPASSWORD=$SYSADMIN_PWD psql --username=$SYSADMIN_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -a -b -f $DML_FILENAME >> $LOG 2>&1
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": There are no DML deployment required for ${MOSIP_DB_NAME}" | tee -a $LOG 2>&1
+fi
+
+if [ $(grep -c ERROR $LOG) -ne 0 ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Database DML deployment is completed with ERRORS, Please check the logs for more information" | tee -a $LOG 2>&1
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": END of MOSIP database deployment" | tee -a $LOG 2>&1
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Database DML deployment completed successfully, Please check the logs for more information" | tee -a $LOG 2>&1
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": END of MOSIP \"${MOSIP_DB_NAME}\" database deployment" | tee -a $LOG 2>&1
+fi
+
+echo "******************************************"`date "+%m/%d/%Y %H:%M:%S"` "*****************************************************" >> $LOG 2>&1
+
+#========================================DB DML Deployment process completes on DB SERVER======================================
diff --git a/data-dml/mosip_pms/mosip_pms_dml_deploy.sql b/data-dml/mosip_pms/mosip_pms_dml_deploy.sql
new file mode 100644
index 00000000000..11716b7f617
--- /dev/null
+++ b/data-dml/mosip_pms/mosip_pms_dml_deploy.sql
@@ -0,0 +1,65 @@
+\c mosip_pms sysadmin
+
+\set CSVDataPath '\'/home/dbadmin/mosip_pms/'
+
+
+------------------------------------------- Level 1 data load scripts ----------------------------------
+
+----- TRUNCATE pms.key_policy_def TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE pms.partner_type cascade ;
+
+\COPY pms.partner_type (code,partner_description,is_active,cr_by,cr_dtimes,is_policy_required) FROM './dml/pms-partner_type.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE pms.partner TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE pms.partner cascade ;
+
+\COPY pms.partner (id,policy_group_id,name,address,contact_no,email_id,certificate_alias,user_id,partner_type_code,approval_status,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes) FROM './dml/pms-partner.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE pms.policy_group TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE pms.policy_group cascade ;
+
+\COPY pms.policy_group (id,name,descr,user_id,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes) FROM './dml/pms-policy_group.csv' delimiter ',' HEADER csv;
+
+
+----- TRUNCATE pms.auth_policy TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE pms.auth_policy cascade ;
+
+\COPY pms.auth_policy (id,policy_group_id,name,descr,policy_file_id,policy_type,version,policy_schema,valid_from_date,valid_to_date,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes) FROM './dml/pms-auth_policy.csv' delimiter ',' HEADER csv;
+
+------------------------------------------- Level 2 data load scripts ----------------------------------
+
+----- TRUNCATE pms.partner_policy TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE pms.partner_policy cascade ;
+
+\COPY pms.partner_policy (policy_api_key,part_id,policy_id,valid_from_datetime,valid_to_datetime,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes) FROM './dml/pms-partner_policy.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE pms.partner_policy_bioextract TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE pms.partner_policy_bioextract cascade ;
+
+\COPY pms.partner_policy_bioextract (id,part_id,policy_id,attribute_name,extractor_provider,extractor_provider_version,biometric_modality,biometric_sub_types,cr_by,cr_dtimes,upd_by,upd_dtimes) FROM './dml/pms-partner_policy_bioextract.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE pms.partner_policy_request TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE pms.partner_policy_request cascade ;
+
+\COPY pms.partner_policy_request (id,part_id,policy_id,request_datetimes,request_detail,status_code,cr_by,cr_dtimes,upd_by,upd_dtimes) FROM './dml/pms-partner_policy_request.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE pms.partner_policy_credential_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE pms.partner_policy_credential_type cascade ;
+
+\COPY pms.partner_policy_credential_type (part_id,policy_id,credential_type,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes,is_deleted,del_dtimes) FROM './dml/pms-partner_policy_credential_type.csv' delimiter ',' HEADER csv;
+
+------------------------------------------- History Table Loading ----------------------------------
+
+----- TRUNCATE pms.partner_h TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE pms.partner_h cascade ;
+
+\COPY pms.partner_h (id,eff_dtimes,policy_group_id,name,address,contact_no,email_id,certificate_alias,user_id,partner_type_code,approval_status,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes) FROM './dml/pms-partner_h.csv' delimiter ',' HEADER csv;
+
+
+----- TRUNCATE pms.auth_policy_h TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE pms.auth_policy_h cascade ;
+
+\COPY pms.auth_policy_h (id,eff_dtimes,policy_group_id,name,descr,policy_file_id,policy_type,version,policy_schema,valid_from_date,valid_to_date,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes) FROM './dml/pms-auth_policy_h.csv' delimiter ',' HEADER csv;
+
+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------
\ No newline at end of file
diff --git a/data-dml/mosip_prereg/dml/prereg-language_transliteration.csv b/data-dml/mosip_prereg/dml/prereg-language_transliteration.csv
new file mode 100644
index 00000000000..737fbadbfc3
--- /dev/null
+++ b/data-dml/mosip_prereg/dml/prereg-language_transliteration.csv
@@ -0,0 +1,5 @@
+lang_from_code,lang_to_code,lang_id,cr_by,cr_dtimes
+eng,ara,Latin-Arabic,MOSIP_SYSTEM,now()
+fra,ara,Latin-Arabic,MOSIP_SYSTEM,now()
+ara,fra,Arabic-Latin,MOSIP_SYSTEM,now()
+ara,eng,Arabic-Latin,MOSIP_SYSTEM,now()
diff --git a/data-dml/mosip_prereg/mosip_prereg_deploy.properties b/data-dml/mosip_prereg/mosip_prereg_deploy.properties
new file mode 100644
index 00000000000..2ad46c1048b
--- /dev/null
+++ b/data-dml/mosip_prereg/mosip_prereg_deploy.properties
@@ -0,0 +1,10 @@
+DB_SERVERIP=
+DB_PORT=
+SU_USER=postgres
+DEFAULT_DB_NAME=postgres
+MOSIP_DB_NAME=mosip_prereg
+SYSADMIN_USER=sysadmin
+BASEPATH=/home/madmin/database/
+LOG_PATH=/home/madmin/logs/
+DML_FLAG=1
+DML_FILENAME=mosip_prereg_dml_deploy.sql
diff --git a/data-dml/mosip_prereg/mosip_prereg_dml_deploy.sh b/data-dml/mosip_prereg/mosip_prereg_dml_deploy.sh
new file mode 100644
index 00000000000..d439f9afaeb
--- /dev/null
+++ b/data-dml/mosip_prereg/mosip_prereg_dml_deploy.sh
@@ -0,0 +1,70 @@
+### -- ---------------------------------------------------------------------------------------------------------
+### -- Script Name : DML deploy
+### -- Deploy Module : MOSIP PRE REGISTRATION
+### -- Purpose : To deploy Database DMLs.
+### -- Create By : Sadanandegowda DM
+### -- Created Date : Nov-2020
+### --
+### -- Modified Date Modified By Comments / Remarks
+### -- -----------------------------------------------------------------------------------------------------------
+
+#########Properties file #############
+set -e
+properties_file="$1"
+echo `date "+%m/%d/%Y %H:%M:%S"` ": $properties_file"
+#properties_file="./app.properties"
+if [ -f "$properties_file" ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Property file \"$properties_file\" found."
+ while IFS='=' read -r key value
+ do
+ key=$(echo $key | tr '.' '_')
+ eval ${key}=\${value}
+ done < "$properties_file"
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Property file not found, Pass property file name as argument."
+fi
+echo `date "+%m/%d/%Y %H:%M:%S"` ": ------------------ Database server and service status check for ${MOSIP_DB_NAME}------------------------"
+##############################################LOG FILE CREATION#############################################################
+
+today=`date '+%d%m%Y_%H%M%S'`;
+LOG="${LOG_PATH}${MOSIP_DB_NAME}-dml-${today}.log"
+touch $LOG
+
+
+SERVICE=$(PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -t -c "select count(1) from pg_roles where rolname IN('sysadmin')";exit; > /dev/null)
+
+if [ "$SERVICE" -eq 0 ] || [ "$SERVICE" -eq 1 ]
+then
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Postgres database server and service is up and running" | tee -a $LOG 2>&1
+else
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Postgres database server or service is not running" | tee -a $LOG 2>&1
+fi
+
+echo `date "+%m/%d/%Y %H:%M:%S"` ": ----------------------------------------------------------------------------------------"
+
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Started sourcing the $MOSIP_DB_NAME Database DML scripts" | tee -a $LOG 2>&1
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Database scripts are sourcing from :$BASEPATH" | tee -a $LOG 2>&1
+
+#========================================DB DML Deployment process begins on DB SERVER======================================
+
+if [ ${DML_FLAG} == 1 ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Deploying DML for ${MOSIP_DB_NAME} database" | tee -a $LOG 2>&1
+ PGPASSWORD=$SYSADMIN_PWD psql --username=$SYSADMIN_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -a -b -f $DML_FILENAME >> $LOG 2>&1
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": There are no DML deployment required for ${MOSIP_DB_NAME}" | tee -a $LOG 2>&1
+fi
+
+if [ $(grep -c ERROR $LOG) -ne 0 ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Database DML deployment is completed with ERRORS, Please check the logs for more information" | tee -a $LOG 2>&1
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": END of MOSIP database deployment" | tee -a $LOG 2>&1
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Database DML deployment completed successfully, Please check the logs for more information" | tee -a $LOG 2>&1
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": END of MOSIP \"${MOSIP_DB_NAME}\" database deployment" | tee -a $LOG 2>&1
+fi
+
+echo "******************************************"`date "+%m/%d/%Y %H:%M:%S"` "*****************************************************" >> $LOG 2>&1
+
+#========================================DB DML Deployment process completes on DB SERVER======================================
diff --git a/data-dml/mosip_prereg/mosip_prereg_dml_deploy.sql b/data-dml/mosip_prereg/mosip_prereg_dml_deploy.sql
new file mode 100644
index 00000000000..ec8d5861d8d
--- /dev/null
+++ b/data-dml/mosip_prereg/mosip_prereg_dml_deploy.sql
@@ -0,0 +1,31 @@
+\c mosip_prereg sysadmin
+
+\set CSVDataPath '\'/home/dbadmin/mosip_prereg/'
+
+-------------- Level 1 data load scripts ------------------------
+
+----- TRUNCATE prereg.language_transliteration TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE prereg.language_transliteration cascade ;
+
+\COPY prereg.language_transliteration (lang_from_code,lang_to_code,lang_id,cr_by,cr_dtimes) FROM './dml/prereg-language_transliteration.csv' delimiter ',' HEADER csv;
+
+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data-dml/mosip_regdevice/dml/regdevice-device_detail.csv b/data-dml/mosip_regdevice/dml/regdevice-device_detail.csv
new file mode 100644
index 00000000000..4336001414b
--- /dev/null
+++ b/data-dml/mosip_regdevice/dml/regdevice-device_detail.csv
@@ -0,0 +1,4 @@
+id,dprovider_id,dtype_code,dstype_code,make,model,partner_org_name,approval_status,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes
+mdevice_detail_default_face,MOSIP.PROXY.SBI,Face,Full face,MOSIP,FACE01,MOSIP,Activated,TRUE,superadmin,now(),superadmin,now()
+mdevice_detail_default_finger,MOSIP.PROXY.SBI,Finger,Slap,MOSIP,SLAP01,MOSIP,Activated,TRUE,superadmin,now(),superadmin,now()
+mdevice_detail_default_iris,MOSIP.PROXY.SBI,Iris,Double,MOSIP,IRIS01,MOSIP,Activated,TRUE,superadmin,now(),superadmin,now()
diff --git a/data-dml/mosip_regdevice/dml/regdevice-reg_device_sub_type.csv b/data-dml/mosip_regdevice/dml/regdevice-reg_device_sub_type.csv
new file mode 100644
index 00000000000..e0ce955d38c
--- /dev/null
+++ b/data-dml/mosip_regdevice/dml/regdevice-reg_device_sub_type.csv
@@ -0,0 +1,7 @@
+code,dtyp_code,name,descr,is_active,cr_by,cr_dtimes
+Slap,Finger,Slap,Fingerprint Slap,TRUE,superadmin,now()
+Single,Finger,Single,Fingerprint Single Finger,TRUE,superadmin,now()
+Touchless,Finger,Touchless,Touch Fingerprint,TRUE,superadmin,now()
+Single,Iris,Single,Single,TRUE,superadmin,now()
+Double,Iris,Double,Double,TRUE,superadmin,now()
+Full face,Face,Full face,Full Face,TRUE,superadmin,now()
diff --git a/data-dml/mosip_regdevice/dml/regdevice-reg_device_type.csv b/data-dml/mosip_regdevice/dml/regdevice-reg_device_type.csv
new file mode 100644
index 00000000000..1dc42350d9c
--- /dev/null
+++ b/data-dml/mosip_regdevice/dml/regdevice-reg_device_type.csv
@@ -0,0 +1,4 @@
+code,name,descr,is_active,cr_by,cr_dtimes
+Finger,Finger,Fingerprint Biometric,TRUE,superadmin,now()
+Face,Face,Face Biometric,TRUE,superadmin,now()
+Iris,Iris,Iris Biomertric,TRUE,superadmin,now()
diff --git a/data-dml/mosip_regdevice/dml/regdevice-registered_device_master.csv b/data-dml/mosip_regdevice/dml/regdevice-registered_device_master.csv
new file mode 100644
index 00000000000..d6a7a75f850
--- /dev/null
+++ b/data-dml/mosip_regdevice/dml/regdevice-registered_device_master.csv
@@ -0,0 +1,4 @@
+code,status_code,device_id,device_sub_id,digital_id,serial_number,device_detail_id,purpose,firmware,expiry_date,certification_level,foundational_trust_provider_id,hotlisted,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes
+b692b595-3523-slap-99fc-bd76e35f190f,Registered,76ea9022-5b95-41c5-bf18-960f8c67a6c9,"[1,2,3]","{""serialNo"":""1234567890"",""deviceProvider"":""MOSIP"",""deviceProviderId"":""MOSIP.PROXY.SBI"",""make"":""MOSIP"",""model"":""SLAP01"",""dateTime"":""2020-12-01T13:37:59.402Z"",""type"":""Finger"",""deviceSubType"":""Slap""}",1234567890,mdevice_detail_default_finger,Registration,MOSIP.SLAP.1.0.0.0,10/1/2021 12:03,L0,,FALSE,TRUE,superadmin,now(),superadmin,now()
+b692b595-3523-face-99fc-bd76e35f190f,Registered,bf77b975-0d7f-4cb1-8429-33f3939c409a,[0],"{""serialNo"":""2345678901"",""deviceProvider"":""MOSIP"",""deviceProviderId"":""MOSIP.PROXY.SBI"",""make"":""MOSIP"",""model"":""FACE01"",""dateTime"":""2020-12-01T13:32:41.565Z"",""type"":""Face"",""deviceSubType"":""Full Face""}",2345678901,mdevice_detail_default_face,Registration,MOSIP.FACE.1.0.0.0,10/1/2021 12:03,L0,,FALSE,TRUE,superadmin,now(),superadmin,now()
+b692b595-3523-iris-99fc-bd76e35f190f,Registered,9a402e95-303d-49f6-a8e4-55c8f4f9acfc,"[1,2,3]","{""serialNo"":""3456789012"",""deviceProvider"":""MOSIP"",""deviceProviderId"":""MOSIP.PROXY.SBI"",""make"":""MOSIP"",""model"":""IRIS01"",""dateTime"":""2020-12-01T13:36:47.015Z"",""type"":""Iris"",""deviceSubType"":""Double""}",3456789012,mdevice_detail_default_iris,Registration,MOSIP.IRIS.1.0.0.0,10/1/2021 12:03,L0,,FALSE,TRUE,superadmin,now(),superadmin,now()
diff --git a/data-dml/mosip_regdevice/dml/regdevice-registered_device_master_h.csv b/data-dml/mosip_regdevice/dml/regdevice-registered_device_master_h.csv
new file mode 100644
index 00000000000..d1fbb662a83
--- /dev/null
+++ b/data-dml/mosip_regdevice/dml/regdevice-registered_device_master_h.csv
@@ -0,0 +1,4 @@
+code,status_code,device_id,device_sub_id,digital_id,serial_number,device_detail_id,purpose,firmware,expiry_date,certification_level,foundational_trust_provider_id,hotlisted,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes,eff_dtimes
+b692b595-3523-slap-99fc-bd76e35f190f,Registered,76ea9022-5b95-41c5-bf18-960f8c67a6c9,"[1,2,3]","{""serialNo"":""1234567890"",""deviceProvider"":""MOSIP"",""deviceProviderId"":""MOSIP.PROXY.SBI"",""make"":""MOSIP"",""model"":""SLAP01"",""dateTime"":""2020-12-01T13:37:59.402Z"",""type"":""Finger"",""deviceSubType"":""Slap""}",1234567890,mdevice_detail_default_finger,Registration,MOSIP.SLAP.1.0.0.0,10/1/2021 12:03,L0,,FALSE,TRUE,superadmin,now(),superadmin,now(),now()
+b692b595-3523-face-99fc-bd76e35f190f,Registered,bf77b975-0d7f-4cb1-8429-33f3939c409a,[0],"{""serialNo"":""2345678901"",""deviceProvider"":""MOSIP"",""deviceProviderId"":""MOSIP.PROXY.SBI"",""make"":""MOSIP"",""model"":""FACE01"",""dateTime"":""2020-12-01T13:32:41.565Z"",""type"":""Face"",""deviceSubType"":""Full Face""}",2345678901,mdevice_detail_default_face,Registration,MOSIP.FACE.1.0.0.0,10/1/2021 12:03,L0,,FALSE,TRUE,superadmin,now(),superadmin,now(),now()
+b692b595-3523-iris-99fc-bd76e35f190f,Registered,9a402e95-303d-49f6-a8e4-55c8f4f9acfc,"[1,2,3]","{""serialNo"":""3456789012"",""deviceProvider"":""MOSIP"",""deviceProviderId"":""MOSIP.PROXY.SBI"",""make"":""MOSIP"",""model"":""IRIS01"",""dateTime"":""2020-12-01T13:36:47.015Z"",""type"":""Iris"",""deviceSubType"":""Double""}",3456789012,mdevice_detail_default_iris,Registration,MOSIP.IRIS.1.0.0.0,10/1/2021 12:03,L0,,FALSE,TRUE,superadmin,now(),superadmin,now(),now()
diff --git a/data-dml/mosip_regdevice/dml/regdevice-secure_biometric_interface.csv b/data-dml/mosip_regdevice/dml/regdevice-secure_biometric_interface.csv
new file mode 100644
index 00000000000..7a0c505bba9
--- /dev/null
+++ b/data-dml/mosip_regdevice/dml/regdevice-secure_biometric_interface.csv
@@ -0,0 +1,4 @@
+id,sw_binary_hash,sw_version,device_detail_id,sw_cr_dtimes,sw_expiry_dtimes,approval_status,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes
+618856c8-43fc-4e01-9d9b-67d20a07b352,binary data,0.9.5,mdevice_detail_default_finger,now(),10/1/2021 12:03,Activated,TRUE,superadmin,now(),superadmin,now()
+5fbe45ac-b4dc-4523-b368-c38f46633662,binary data,0.9.5,mdevice_detail_default_face,now(),10/1/2021 12:03,Activated,TRUE,superadmin,now(),superadmin,now()
+d2479cf1-4c63-420e-9480-105e744caa99,binary data,0.9.5,mdevice_detail_default_iris,now(),10/1/2021 12:03,Activated,TRUE,superadmin,now(),superadmin,now()
diff --git a/data-dml/mosip_regdevice/dml/regdevice-secure_biometric_interface_h.csv b/data-dml/mosip_regdevice/dml/regdevice-secure_biometric_interface_h.csv
new file mode 100644
index 00000000000..1a2a41fd713
--- /dev/null
+++ b/data-dml/mosip_regdevice/dml/regdevice-secure_biometric_interface_h.csv
@@ -0,0 +1,4 @@
+id,sw_binary_hash,sw_version,device_detail_id,sw_cr_dtimes,sw_expiry_dtimes,approval_status,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes,eff_dtimes
+618856c8-43fc-4e01-9d9b-67d20a07b352,binary data,0.9.5,mdevice_detail_default_finger,now(),10/1/2021 12:03,Activated,TRUE,superadmin,now(),superadmin,now(),now()
+5fbe45ac-b4dc-4523-b368-c38f46633662,binary data,0.9.5,mdevice_detail_default_face,now(),10/1/2021 12:03,Activated,TRUE,superadmin,now(),superadmin,now(),now()
+d2479cf1-4c63-420e-9480-105e744caa99,binary data,0.9.5,mdevice_detail_default_iris,now(),10/1/2021 12:03,Activated,TRUE,superadmin,now(),superadmin,now(),now()
diff --git a/data-dml/mosip_regdevice/mosip_regdevice_deploy.properties b/data-dml/mosip_regdevice/mosip_regdevice_deploy.properties
new file mode 100644
index 00000000000..4d88afa7ffe
--- /dev/null
+++ b/data-dml/mosip_regdevice/mosip_regdevice_deploy.properties
@@ -0,0 +1,10 @@
+DB_SERVERIP=
+DB_PORT=
+SU_USER=postgres
+DEFAULT_DB_NAME=postgres
+MOSIP_DB_NAME=mosip_regdevice
+SYSADMIN_USER=sysadmin
+BASEPATH=/home/madmin/database/
+LOG_PATH=/home/madmin/logs/
+DML_FLAG=1
+DML_FILENAME=mosip_regdevice_dml_deploy.sql
diff --git a/data-dml/mosip_regdevice/mosip_regdevice_dml_deploy.sh b/data-dml/mosip_regdevice/mosip_regdevice_dml_deploy.sh
new file mode 100644
index 00000000000..001e5548bb6
--- /dev/null
+++ b/data-dml/mosip_regdevice/mosip_regdevice_dml_deploy.sh
@@ -0,0 +1,70 @@
+### -- ---------------------------------------------------------------------------------------------------------
+### -- Script Name : DML deploy
+### -- Deploy Module : MOSIP REGISTRATION DEVICE MANAGEMENT
+### -- Purpose : To deploy Database DMLs.
+### -- Create By : Sadanandegowda DM
+### -- Created Date : Nov-2020
+### --
+### -- Modified Date Modified By Comments / Remarks
+### -- -----------------------------------------------------------------------------------------------------------
+
+#########Properties file #############
+set -e
+properties_file="$1"
+echo `date "+%m/%d/%Y %H:%M:%S"` ": $properties_file"
+#properties_file="./app.properties"
+if [ -f "$properties_file" ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Property file \"$properties_file\" found."
+ while IFS='=' read -r key value
+ do
+ key=$(echo $key | tr '.' '_')
+ eval ${key}=\${value}
+ done < "$properties_file"
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Property file not found, Pass property file name as argument."
+fi
+echo `date "+%m/%d/%Y %H:%M:%S"` ": ------------------ Database server and service status check for ${MOSIP_DB_NAME}------------------------"
+##############################################LOG FILE CREATION#############################################################
+
+today=`date '+%d%m%Y_%H%M%S'`;
+LOG="${LOG_PATH}${MOSIP_DB_NAME}-dml-${today}.log"
+touch $LOG
+
+
+SERVICE=$(PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -t -c "select count(1) from pg_roles where rolname IN('sysadmin')";exit; > /dev/null)
+
+if [ "$SERVICE" -eq 0 ] || [ "$SERVICE" -eq 1 ]
+then
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Postgres database server and service is up and running" | tee -a $LOG 2>&1
+else
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Postgres database server or service is not running" | tee -a $LOG 2>&1
+fi
+
+echo `date "+%m/%d/%Y %H:%M:%S"` ": ----------------------------------------------------------------------------------------"
+
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Started sourcing the $MOSIP_DB_NAME Database DML scripts" | tee -a $LOG 2>&1
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Database scripts are sourcing from :$BASEPATH" | tee -a $LOG 2>&1
+
+#========================================DB DML Deployment process begins on DB SERVER======================================
+
+if [ ${DML_FLAG} == 1 ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Deploying DML for ${MOSIP_DB_NAME} database" | tee -a $LOG 2>&1
+ PGPASSWORD=$SYSADMIN_PWD psql --username=$SYSADMIN_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -a -b -f $DML_FILENAME >> $LOG 2>&1
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": There are no DML deployment required for ${MOSIP_DB_NAME}" | tee -a $LOG 2>&1
+fi
+
+if [ $(grep -c ERROR $LOG) -ne 0 ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Database DML deployment is completed with ERRORS, Please check the logs for more information" | tee -a $LOG 2>&1
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": END of MOSIP database deployment" | tee -a $LOG 2>&1
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Database DML deployment completed successfully, Please check the logs for more information" | tee -a $LOG 2>&1
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": END of MOSIP \"${MOSIP_DB_NAME}\" database deployment" | tee -a $LOG 2>&1
+fi
+
+echo "******************************************"`date "+%m/%d/%Y %H:%M:%S"` "*****************************************************" >> $LOG 2>&1
+
+#========================================DB DML Deployment process completes on DB SERVER======================================
diff --git a/data-dml/mosip_regdevice/mosip_regdevice_dml_deploy.sql b/data-dml/mosip_regdevice/mosip_regdevice_dml_deploy.sql
new file mode 100644
index 00000000000..978f5fe7629
--- /dev/null
+++ b/data-dml/mosip_regdevice/mosip_regdevice_dml_deploy.sql
@@ -0,0 +1,58 @@
+\c mosip_regdevice sysadmin
+
+\set CSVDataPath '\'/home/dbadmin/mosip_regdevice/dml'
+
+-------------- Level 1 data load scripts ------------------------
+
+----- TRUNCATE regdevice.reg_device_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE regdevice.reg_device_type cascade ;
+
+\COPY regdevice.reg_device_type (code,name,descr,is_active,cr_by,cr_dtimes) FROM './dml/regdevice-reg_device_type.csv' delimiter ',' HEADER csv;
+
+-------------- Level 2 data load scripts ------------------------
+
+----- TRUNCATE regdevice.reg_device_sub_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE regdevice.reg_device_sub_type cascade ;
+
+\COPY regdevice.reg_device_sub_type (code,dtyp_code,name,descr,is_active,cr_by,cr_dtimes) FROM './dml/regdevice-reg_device_sub_type.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE regdevice.device_detail TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE regdevice.device_detail cascade ;
+
+\COPY regdevice.device_detail (id,dprovider_id,dtype_code,dstype_code,make,model,partner_org_name,approval_status,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes) FROM './dml/regdevice-device_detail.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE regdevice.registered_device_master TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE regdevice.registered_device_master cascade ;
+
+\COPY regdevice.registered_device_master (code,status_code,device_id,device_sub_id,digital_id,serial_number,device_detail_id,purpose,firmware,expiry_date,certification_level,foundational_trust_provider_id,hotlisted,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes) FROM './dml/regdevice-registered_device_master.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE regdevice.secure_biometric_interface TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE regdevice.secure_biometric_interface cascade ;
+
+\COPY regdevice.secure_biometric_interface (id,sw_binary_hash,sw_version,device_detail_id,sw_cr_dtimes,sw_expiry_dtimes,approval_status,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes) FROM './dml/regdevice-secure_biometric_interface.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE regdevice.registered_device_master_h TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE regdevice.registered_device_master_h cascade ;
+
+\COPY regdevice.registered_device_master_h (code,status_code,device_id,device_sub_id,digital_id,serial_number,device_detail_id,purpose,firmware,expiry_date,certification_level,foundational_trust_provider_id,hotlisted,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes,eff_dtimes) FROM './dml/regdevice-registered_device_master_h.csv' delimiter ',' HEADER csv;
+
+----- TRUNCATE regdevice.secure_biometric_interface_h TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE regdevice.secure_biometric_interface_h cascade ;
+
+\COPY regdevice.secure_biometric_interface_h (id,sw_binary_hash,sw_version,device_detail_id,sw_cr_dtimes,sw_expiry_dtimes,approval_status,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes,eff_dtimes) FROM './dml/regdevice-secure_biometric_interface_h.csv' delimiter ',' HEADER csv;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data-dml/mosip_regprc/dml/regprc-transaction_type.csv b/data-dml/mosip_regprc/dml/regprc-transaction_type.csv
new file mode 100644
index 00000000000..53ad6bf3610
--- /dev/null
+++ b/data-dml/mosip_regprc/dml/regprc-transaction_type.csv
@@ -0,0 +1,24 @@
+code,descr,lang_code,is_active,cr_by,cr_dtimes
+CREATE,transaction_done,eng,TRUE,MOSIP_SYSTEM,now()
+DELETE,delete transaction,eng,TRUE,MOSIP_SYSTEM,now()
+FAILED,transaction failed,eng,TRUE,MOSIP_SYSTEM,now()
+UPDATE,transaction_done,eng,TRUE,MOSIP_SYSTEM,now()
+DEMO,transaction_done,eng,TRUE,MOSIP_SYSTEM,now()
+BIO,transaction_done,eng,TRUE,MOSIP_SYSTEM,now()
+PACKET_RECEIVER,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+UPLOAD_PACKET,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+VALIDATE_PACKET,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+VIRUS_SCAN,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+OSI_VALIDATE,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+EXTERNAL_INTEGRATION,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+DEMOGRAPHIC_VERIFICATION,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+MANUAL_VERIFICATION,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+BIOGRAPHIC_VERIFICATION,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+UIN_GENERATOR,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+NOTIFICATION,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+PRINT_SERVICE,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+PRINT_POSTAL_SERVICE,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+QUALITY_CHECK,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+BIOMETRIC_AUTHENTICATION,transaction done,eng,TRUE,MOSIP_SYSTEM,now()
+PACKET_REPROCESS,transcation done,eng,TRUE,MOSIP_SYSTEM,now()
+SECUREZONE_NOTIFICATION,transaction notification,eng,TRUE,MOSIP_SYSTEM,now()
diff --git a/data-dml/mosip_regprc/mosip_regprc_deploy.properties b/data-dml/mosip_regprc/mosip_regprc_deploy.properties
new file mode 100644
index 00000000000..478fc344eaa
--- /dev/null
+++ b/data-dml/mosip_regprc/mosip_regprc_deploy.properties
@@ -0,0 +1,10 @@
+DB_SERVERIP=
+DB_PORT=
+SU_USER=postgres
+DEFAULT_DB_NAME=postgres
+MOSIP_DB_NAME=mosip_regprc
+SYSADMIN_USER=sysadmin
+BASEPATH=/home/madmin/database/
+LOG_PATH=/home/madmin/logs/
+DML_FLAG=1
+DML_FILENAME=mosip_regprc_dml_deploy.sql
diff --git a/data-dml/mosip_regprc/mosip_regprc_dml_deploy.sh b/data-dml/mosip_regprc/mosip_regprc_dml_deploy.sh
new file mode 100644
index 00000000000..6cbb59b78f8
--- /dev/null
+++ b/data-dml/mosip_regprc/mosip_regprc_dml_deploy.sh
@@ -0,0 +1,70 @@
+### -- ---------------------------------------------------------------------------------------------------------
+### -- Script Name : DML deploy
+### -- Deploy Module : MOSIP REGISTRATION PROCESSOR
+### -- Purpose : To deploy Database DMLs.
+### -- Create By : Sadanandegowda DM
+### -- Created Date : Nov-2020
+### --
+### -- Modified Date Modified By Comments / Remarks
+### -- -----------------------------------------------------------------------------------------------------------
+
+#########Properties file #############
+set -e
+properties_file="$1"
+echo `date "+%m/%d/%Y %H:%M:%S"` ": $properties_file"
+#properties_file="./app.properties"
+if [ -f "$properties_file" ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Property file \"$properties_file\" found."
+ while IFS='=' read -r key value
+ do
+ key=$(echo $key | tr '.' '_')
+ eval ${key}=\${value}
+ done < "$properties_file"
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Property file not found, Pass property file name as argument."
+fi
+echo `date "+%m/%d/%Y %H:%M:%S"` ": ------------------ Database server and service status check for ${MOSIP_DB_NAME}------------------------"
+##############################################LOG FILE CREATION#############################################################
+
+today=`date '+%d%m%Y_%H%M%S'`;
+LOG="${LOG_PATH}${MOSIP_DB_NAME}-dml-${today}.log"
+touch $LOG
+
+
+SERVICE=$(PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -t -c "select count(1) from pg_roles where rolname IN('sysadmin')";exit; > /dev/null)
+
+if [ "$SERVICE" -eq 0 ] || [ "$SERVICE" -eq 1 ]
+then
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Postgres database server and service is up and running" | tee -a $LOG 2>&1
+else
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Postgres database server or service is not running" | tee -a $LOG 2>&1
+fi
+
+echo `date "+%m/%d/%Y %H:%M:%S"` ": ----------------------------------------------------------------------------------------"
+
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Started sourcing the $MOSIP_DB_NAME Database DML scripts" | tee -a $LOG 2>&1
+echo `date "+%m/%d/%Y %H:%M:%S"` ": Database scripts are sourcing from :$BASEPATH" | tee -a $LOG 2>&1
+
+#========================================DB DML Deployment process begins on DB SERVER======================================
+
+if [ ${DML_FLAG} == 1 ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Deploying DML for ${MOSIP_DB_NAME} database" | tee -a $LOG 2>&1
+ PGPASSWORD=$SYSADMIN_PWD psql --username=$SYSADMIN_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -a -b -f $DML_FILENAME >> $LOG 2>&1
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": There are no DML deployment required for ${MOSIP_DB_NAME}" | tee -a $LOG 2>&1
+fi
+
+if [ $(grep -c ERROR $LOG) -ne 0 ]
+then
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Database DML deployment is completed with ERRORS, Please check the logs for more information" | tee -a $LOG 2>&1
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": END of MOSIP database deployment" | tee -a $LOG 2>&1
+else
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": Database DML deployment completed successfully, Please check the logs for more information" | tee -a $LOG 2>&1
+ echo `date "+%m/%d/%Y %H:%M:%S"` ": END of MOSIP \"${MOSIP_DB_NAME}\" database deployment" | tee -a $LOG 2>&1
+fi
+
+echo "******************************************"`date "+%m/%d/%Y %H:%M:%S"` "*****************************************************" >> $LOG 2>&1
+
+#========================================DB DML Deployment process completes on DB SERVER======================================
diff --git a/data-dml/mosip_regprc/mosip_regprc_dml_deploy.sql b/data-dml/mosip_regprc/mosip_regprc_dml_deploy.sql
new file mode 100644
index 00000000000..2ee31ca0c61
--- /dev/null
+++ b/data-dml/mosip_regprc/mosip_regprc_dml_deploy.sql
@@ -0,0 +1,30 @@
+\c mosip_regprc sysadmin
+
+\set CSVDataPath '\'/home/dbadmin/mosip_regprc/'
+
+-------------- Level 1 data load scripts ------------------------
+----- TRUNCATE regprc.transaction_type TABLE Data and It's reference Data and COPY Data from CSV file -----
+TRUNCATE TABLE regprc.transaction_type cascade ;
+
+\COPY regprc.transaction_type (code,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/regprc-transaction_type.csv' delimiter ',' HEADER csv;
+
+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/kernel/kernel-ref-idobjectvalidator/pom.xml b/kernel/kernel-ref-idobjectvalidator/pom.xml
index 1acc67d085b..71929a3c74b 100644
--- a/kernel/kernel-ref-idobjectvalidator/pom.xml
+++ b/kernel/kernel-ref-idobjectvalidator/pom.xml
@@ -4,15 +4,15 @@
io.mosip.kernel
kernel-ref-parent
- 1.1.2
+ 1.1.4
kernel-ref-idobjectvalidator
kernel-ref-idobjectvalidator
-
1.1.2
+
1.1.4
- 1.1.2
+ 1.1.4
11
11
3.8.0
diff --git a/kernel/kernel-ref-idobjectvalidator/src/main/java/io/mosip/kernel/idobjectvalidator/constant/IdObjectReferenceValidatorConstant.java b/kernel/kernel-ref-idobjectvalidator/src/main/java/io/mosip/kernel/idobjectvalidator/constant/IdObjectReferenceValidatorConstant.java
index 048493f487b..05d5aaab9c7 100644
--- a/kernel/kernel-ref-idobjectvalidator/src/main/java/io/mosip/kernel/idobjectvalidator/constant/IdObjectReferenceValidatorConstant.java
+++ b/kernel/kernel-ref-idobjectvalidator/src/main/java/io/mosip/kernel/idobjectvalidator/constant/IdObjectReferenceValidatorConstant.java
@@ -9,23 +9,20 @@ public class IdObjectReferenceValidatorConstant {
public static final String ROOT_PATH = "identity";
public static final String IDENTITY_ARRAY_VALUE_FIELD = "value";
+ public static final String MASTERDATA_LANGUAGE_PATH = "response.languages.*";
+ public static final String MASTERDATA_LOCATIONS_PATH = "locations.*";
+ public static final String DOC_TYPE_SCHEMA_FORMAT = "identity.%s.type";
+ public static final String JSON_PATH_WILDCARD_SEARCH = "*.%s";
+ public static final String SIMPLE_TYPE_VALUE_PATH = "%s.*.value";
+ public static final String SIMPLE_TYPE_LANGUAGE_PATH = "%s.*.language";
public static final String IDENTITY_REFERENCE_IDENTITY_NUMBER_PATH = "identity.referenceIdentityNumber";
public static final String IDENTITY_LANGUAGE_PATH = "identity.*.*.language";
- public static final String IDENTITY_POSTAL_CODE_PATH = "identity.postalCode";
public static final String IDENTITY_GENDER_LANGUAGE_PATH = "identity.gender.*.language";
public static final String IDENTITY_GENDER_VALUE_PATH = "identity.gender.*.value";
- public static final String IDENTITY_REGION_LANGUAGE_PATH = "identity.region.*.language";
- public static final String IDENTITY_REGION_VALUE_PATH = "identity.region.*.value";
- public static final String IDENTITY_PROVINCE_LANGUAGE_PATH = "identity.province.*.language";
- public static final String IDENTITY_PROVINCE_VALUE_PATH = "identity.province.*.value";
- public static final String IDENTITY_CITY_LANGUAGE_PATH = "identity.city.*.language";
- public static final String IDENTITY_CITY_VALUE_PATH = "identity.city.*.value";
- public static final String IDENTITY_ZONE_LANGUAGE_PATH = "identity.zone.*.language";
- public static final String IDENTITY_ZONE_VALUE_PATH = "identity.zone.*.value";
public static final String IDENTITY_RESIDENCE_STATUS_LANGUAGE_PATH = "identity.residenceStatus.*.language";
public static final String IDENTITY_RESIDENCE_STATUS_VALUE_PATH = "identity.residenceStatus.*.value";
- public static final String MASTERDATA_LANGUAGE_PATH = "response.languages.*";
- public static final String MASTERDATA_LOCATIONS_PATH = "locations.*";
+ public static final String IDENTITY_DOB_PATH = "identity.dateOfBirth";
+ public static final String DOB_FORMAT = "mosip.kernel.idobjectvalidator.date-format";
public static final String MASTERDATA_LANGUAGE_URI = "mosip.kernel.idobjectvalidator.masterdata.languages.rest.uri";
public static final String MASTERDATA_GENDERTYPES_URI = "mosip.kernel.idobjectvalidator.masterdata.gendertypes.rest.uri";
public static final String MASTERDATA_DOCUMENT_CATEGORIES_URI = "mosip.kernel.idobjectvalidator.masterdata.documentcategories.rest.uri";
@@ -34,6 +31,4 @@ public class IdObjectReferenceValidatorConstant {
public static final String MASTERDATA_LOCATION_HIERARCHY_URI = "mosip.kernel.idobjectvalidator.masterdata.locationhierarchy.rest.uri";
public static final String MASTERDATA_INDIVIDUAL_TYPES_URI = "mosip.kernel.idobjectvalidator.masterdata.individualtypes.rest.uri";
public static final String LOCATION_NA = "mosip.kernel.idobjectvalidator.masterdata.locations.locationNotAvailable";
- public static final String DOB_FORMAT = "uuuu/MM/dd";
- public static final String IDENTITY_DOB_PATH = "identity.dateOfBirth";
}
diff --git a/kernel/kernel-ref-idobjectvalidator/src/main/java/io/mosip/kernel/idobjectvalidator/impl/IdObjectReferenceValidator.java b/kernel/kernel-ref-idobjectvalidator/src/main/java/io/mosip/kernel/idobjectvalidator/impl/IdObjectReferenceValidator.java
index dda509c380f..386b7705377 100644
--- a/kernel/kernel-ref-idobjectvalidator/src/main/java/io/mosip/kernel/idobjectvalidator/impl/IdObjectReferenceValidator.java
+++ b/kernel/kernel-ref-idobjectvalidator/src/main/java/io/mosip/kernel/idobjectvalidator/impl/IdObjectReferenceValidator.java
@@ -4,21 +4,14 @@
import static io.mosip.kernel.core.idobjectvalidator.constant.IdObjectValidatorErrorConstant.ID_OBJECT_VALIDATION_FAILED;
import static io.mosip.kernel.core.idobjectvalidator.constant.IdObjectValidatorErrorConstant.INVALID_INPUT_PARAMETER;
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.DOB_FORMAT;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_CITY_LANGUAGE_PATH;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_CITY_VALUE_PATH;
+import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.DOC_TYPE_SCHEMA_FORMAT;
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_DOB_PATH;
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_GENDER_LANGUAGE_PATH;
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_GENDER_VALUE_PATH;
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_LANGUAGE_PATH;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_POSTAL_CODE_PATH;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_PROVINCE_LANGUAGE_PATH;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_PROVINCE_VALUE_PATH;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_REGION_LANGUAGE_PATH;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_REGION_VALUE_PATH;
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_RESIDENCE_STATUS_LANGUAGE_PATH;
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_RESIDENCE_STATUS_VALUE_PATH;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_ZONE_LANGUAGE_PATH;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.IDENTITY_ZONE_VALUE_PATH;
+import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.JSON_PATH_WILDCARD_SEARCH;
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.LOCATION_NA;
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.MASTERDATA_DOCUMENT_CATEGORIES_URI;
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.MASTERDATA_DOCUMENT_TYPES_URI;
@@ -29,11 +22,8 @@
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.MASTERDATA_LOCATIONS_PATH;
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.MASTERDATA_LOCATIONS_URI;
import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.MASTERDATA_LOCATION_HIERARCHY_URI;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorLocationMapping.CITY;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorLocationMapping.POSTAL_CODE;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorLocationMapping.PROVINCE;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorLocationMapping.REGION;
-import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorLocationMapping.ZONE;
+import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.SIMPLE_TYPE_LANGUAGE_PATH;
+import static io.mosip.kernel.idobjectvalidator.constant.IdObjectReferenceValidatorConstant.SIMPLE_TYPE_VALUE_PATH;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
@@ -41,7 +31,10 @@
import java.time.format.ResolverStyle;
import java.util.AbstractMap;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
import java.util.Collections;
+import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -56,11 +49,13 @@
import org.apache.commons.collections4.SetValuedMap;
import org.apache.commons.collections4.multimap.HashSetValuedHashMap;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Lazy;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpMethod;
+import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
@@ -91,8 +86,12 @@
*/
@Lazy
@RefreshScope
+@Component
+@ConfigurationProperties("mosip.kernel.idobjectvalidator.locationhierarchy")
public class IdObjectReferenceValidator implements IdObjectValidator {
-
+
+ private Map mapping = Collections.emptyMap();
+
private static final String INDIVIDUAL_TYPES = "individualTypes";
private static final String GENDER_NAME = "genderName";
@@ -127,19 +126,19 @@ public class IdObjectReferenceValidator implements IdObjectValidator {
/** The env. */
@Autowired
private Environment env;
-
+
/** The mapper. */
@Autowired
private ObjectMapper mapper;
-
+
/** The Constant READ_OPTIONS. */
private static final Configuration READ_OPTIONS = Configuration.defaultConfiguration()
.addOptions(Option.SUPPRESS_EXCEPTIONS);
-
+
/** The Constant READ_LIST_OPTIONS. */
private static final Configuration READ_LIST_OPTIONS = Configuration.defaultConfiguration()
.addOptions(Option.SUPPRESS_EXCEPTIONS, Option.ALWAYS_RETURN_LIST);
-
+
/** The Constant PATH_LIST_OPTIONS. */
private static final Configuration PATH_LIST_OPTIONS = Configuration.defaultConfiguration()
.addOptions(Option.SUPPRESS_EXCEPTIONS, Option.AS_PATH_LIST, Option.ALWAYS_RETURN_LIST);
@@ -147,64 +146,47 @@ public class IdObjectReferenceValidator implements IdObjectValidator {
/** The rest template. */
@Autowired
private RestTemplate restTemplate;
-
+
/** The language list. */
private List languageList;
-
+
/** The gender map. */
private SetValuedMap genderMap;
-
+
/** The doc cat map. */
private SetValuedMap docCatMap;
-
+
/** The doc type map. */
private SetValuedMap docTypeMap;
-
+
/** The location hierarchy details. */
- private SetValuedMap locationHierarchyDetails;
-
+ private Map> locationHierarchyDetails;
+
/** The location details. */
private Map> locationDetails;
-
- /** The region map. */
- private SetValuedMap regionMap;
-
- /** The province map. */
- private SetValuedMap provinceMap;
-
- /** The city map. */
- private SetValuedMap cityMap;
-
- /** The zone map. */
- private SetValuedMap zoneMap;
-
- /** The postal code map. */
- private SetValuedMap postalCodeMap;
-
+
private SetValuedMap residenceStatusMap;
-
+
/**
* Load data.
*/
@PostConstruct
public void loadData() {
- mapper.registerModule(new Jdk8Module())
- .registerModule(new JavaTimeModule());
+ mapper.registerModule(new Jdk8Module()).registerModule(new JavaTimeModule());
loadLanguages();
loadGenderTypes();
loadLocationDetails();
loadDocCategories();
loadDocTypes();
- loadRegion();
- loadProvince();
- loadCity();
- loadZone();
- loadPostalCode();
loadResidenceStatus();
}
-
- /* (non-Javadoc)
- * @see io.mosip.kernel.core.idobjectvalidator.spi.IdObjectValidator#validateIdObject(java.lang.Object)
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * io.mosip.kernel.core.idobjectvalidator.spi.IdObjectValidator#validateIdObject
+ * (java.lang.Object)
*/
@Override
public boolean validateIdObject(String identitySchema, Object identityObject, List requiredFields)
@@ -215,18 +197,13 @@ public boolean validateIdObject(String identitySchema, Object identityObject, Li
validateDateOfBirth(identityString, errorList);
validateLanguage(identityString, errorList);
validateGender(identityString, errorList);
- validateRegion(identityString, errorList);
- validateProvince(identityString, errorList);
- validateCity(identityString, errorList);
- validatePostalCode(identityString, errorList);
- validateZone(identityString, errorList);
+ validateLocationHierarchy(identityString, errorList);
validateDocuments(identityString, errorList);
validateResidenceStatus(identityString, errorList);
if (errorList.isEmpty()) {
return true;
} else {
- throw new IdObjectValidationFailedException(
- ID_OBJECT_VALIDATION_FAILED, errorList);
+ throw new IdObjectValidationFailedException(ID_OBJECT_VALIDATION_FAILED, errorList);
}
} catch (JsonProcessingException e) {
ExceptionUtils.logRootCause(e);
@@ -239,19 +216,16 @@ public boolean validateIdObject(String identitySchema, Object identityObject, Li
*/
@SuppressWarnings("unchecked")
private void loadLanguages() {
- ObjectNode responseBody = restTemplate.getForObject(
- env.getProperty(MASTERDATA_LANGUAGE_URI), ObjectNode.class);
- JsonPath jsonPath = JsonPath.compile(MASTERDATA_LANGUAGE_PATH);
- JSONArray response = jsonPath.read(responseBody.toString(), READ_LIST_OPTIONS);
- languageList = Optional
- .ofNullable(response)
- .filter(data -> !data.isEmpty())
- .orElse(new JSONArray())
- .stream()
- .map(obj -> ((LinkedHashMap) obj))
- .filter(obj -> (Boolean) obj.get(IS_ACTIVE))
- .map(obj -> String.valueOf(obj.get(CODE)))
- .collect(Collectors.toList());
+ if (Objects.nonNull(env.getProperty(MASTERDATA_LANGUAGE_URI))) {
+ ObjectNode responseBody = restTemplate.getForObject(env.getProperty(MASTERDATA_LANGUAGE_URI),
+ ObjectNode.class);
+ JsonPath jsonPath = JsonPath.compile(MASTERDATA_LANGUAGE_PATH);
+ JSONArray response = jsonPath.read(responseBody.toString(), READ_LIST_OPTIONS);
+ languageList = Optional.ofNullable(response).filter(data -> !data.isEmpty()).orElse(new JSONArray())
+ .stream().map(obj -> ((LinkedHashMap) obj))
+ .filter(obj -> (Boolean) obj.get(IS_ACTIVE)).map(obj -> String.valueOf(obj.get(CODE)))
+ .collect(Collectors.toList());
+ }
}
/**
@@ -259,462 +233,344 @@ private void loadLanguages() {
*/
@SuppressWarnings("unchecked")
private void loadGenderTypes() {
- ResponseWrapper>>> responseBody = restTemplate
- .getForObject(env.getProperty(MASTERDATA_GENDERTYPES_URI),
- ResponseWrapper.class);
- if (Objects.isNull(responseBody.getErrors()) || responseBody.getErrors().isEmpty()) {
- ArrayList> response = responseBody.getResponse().get(GENDER_TYPE);
- genderMap = new HashSetValuedHashMap<>(response.size());
- IntStream.range(0, response.size())
- .filter(index -> (Boolean) response.get(index).get(IS_ACTIVE))
- .forEach(index -> {
- genderMap.put(String.valueOf(response.get(index).get(LANG_CODE)),
- String.valueOf(response.get(index).get(GENDER_NAME)));
- genderMap.put(String.valueOf(response.get(index).get(LANG_CODE)),
- String.valueOf(response.get(index).get(CODE)));
- });
+ if (Objects.nonNull(env.getProperty(MASTERDATA_LANGUAGE_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_GENDERTYPES_URI))) {
+ ResponseWrapper>>> responseBody = restTemplate
+ .getForObject(env.getProperty(MASTERDATA_GENDERTYPES_URI), ResponseWrapper.class);
+ if (Objects.isNull(responseBody.getErrors()) || responseBody.getErrors().isEmpty()) {
+ ArrayList> response = responseBody.getResponse().get(GENDER_TYPE);
+ genderMap = new HashSetValuedHashMap<>(response.size());
+ IntStream.range(0, response.size()).filter(index -> (Boolean) response.get(index).get(IS_ACTIVE))
+ .forEach(index -> {
+ genderMap.put(String.valueOf(response.get(index).get(LANG_CODE)),
+ String.valueOf(response.get(index).get(GENDER_NAME)));
+ genderMap.put(String.valueOf(response.get(index).get(LANG_CODE)),
+ String.valueOf(response.get(index).get(CODE)));
+ });
+ }
}
}
-
+
/**
* Load doc categories.
*/
@SuppressWarnings("unchecked")
private void loadDocCategories() {
- ResponseWrapper>>> responseBody = restTemplate
- .getForObject(env.getProperty(MASTERDATA_DOCUMENT_CATEGORIES_URI),
- ResponseWrapper.class);
- if (Objects.isNull(responseBody.getErrors()) || responseBody.getErrors().isEmpty()) {
- ArrayList> response = responseBody.getResponse().get(DOCUMENTCATEGORIES);
- docCatMap = new HashSetValuedHashMap<>(response.size());
- IntStream.range(0, response.size())
- .filter(index -> (Boolean) response.get(index).get(IS_ACTIVE))
- .forEach(index ->
- docCatMap.put(String.valueOf(response.get(index).get(LANG_CODE)),
- String.valueOf(response.get(index).get(CODE))));
+ if (Objects.nonNull(env.getProperty(MASTERDATA_LANGUAGE_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_DOCUMENT_CATEGORIES_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_DOCUMENT_TYPES_URI))) {
+ ResponseWrapper>>> responseBody = restTemplate
+ .getForObject(env.getProperty(MASTERDATA_DOCUMENT_CATEGORIES_URI), ResponseWrapper.class);
+ if (Objects.isNull(responseBody.getErrors()) || responseBody.getErrors().isEmpty()) {
+ ArrayList> response = responseBody.getResponse().get(DOCUMENTCATEGORIES);
+ docCatMap = new HashSetValuedHashMap<>(response.size());
+ IntStream.range(0, response.size()).filter(index -> (Boolean) response.get(index).get(IS_ACTIVE))
+ .forEach(index -> docCatMap.put(String.valueOf(response.get(index).get(LANG_CODE)),
+ String.valueOf(response.get(index).get(CODE))));
+ }
}
}
-
+
/**
* Load doc types.
*/
@SuppressWarnings("unchecked")
private void loadDocTypes() {
- docTypeMap = new HashSetValuedHashMap<>();
- if (Objects.nonNull(docCatMap) && !docCatMap.isEmpty()) {
- docCatMap.keySet().stream().forEach(langCode ->
- docCatMap.get(langCode).stream().forEach(docCat -> {
- String uri = UriComponentsBuilder
- .fromUriString(env.getProperty(MASTERDATA_DOCUMENT_TYPES_URI))
- .buildAndExpand(docCat, langCode).toUriString();
+ if (Objects.nonNull(env.getProperty(MASTERDATA_LANGUAGE_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_DOCUMENT_CATEGORIES_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_DOCUMENT_TYPES_URI))) {
+ docTypeMap = new HashSetValuedHashMap<>();
+ if (Objects.nonNull(docCatMap) && !docCatMap.isEmpty()) {
+ docCatMap.keySet().stream().forEach(langCode -> docCatMap.get(langCode).stream().forEach(docCat -> {
+ String uri = UriComponentsBuilder.fromUriString(env.getProperty(MASTERDATA_DOCUMENT_TYPES_URI))
+ .buildAndExpand(docCat, langCode).toUriString();
ResponseWrapper>>> responseBody = restTemplate
.getForObject(uri, ResponseWrapper.class);
if (Objects.isNull(responseBody.getErrors()) || responseBody.getErrors().isEmpty()) {
ArrayList> response = responseBody.getResponse().get(DOCUMENTS);
IntStream.range(0, response.size())
- .filter(index -> (Boolean) response.get(index).get(IS_ACTIVE))
- .forEach(index ->
- docTypeMap.put(docCat, String.valueOf(response.get(index).get(CODE)))
- );
+ .filter(index -> (Boolean) response.get(index).get(IS_ACTIVE)).forEach(
+ index -> docTypeMap.put(docCat, String.valueOf(response.get(index).get(CODE))));
}
- })
- );
+ }));
+ }
}
}
-
+
/**
* Load location details.
*/
@SuppressWarnings({ "unchecked" })
private void loadLocationDetails() {
- locationHierarchyDetails = new HashSetValuedHashMap<>();
- locationDetails = new LinkedHashMap<>();
- languageList.stream().forEach(langCode -> {
- String uri = UriComponentsBuilder
- .fromUriString(env.getProperty(MASTERDATA_LOCATIONS_URI))
- .buildAndExpand(langCode).toUriString();
- ResponseWrapper responseBody = restTemplate
- .exchange(uri, HttpMethod.GET, null, new ParameterizedTypeReference>() {
- }).getBody();
- if (Objects.isNull(responseBody.getErrors()) || responseBody.getErrors().isEmpty()) {
- JsonPath jsonPath = JsonPath.compile(MASTERDATA_LOCATIONS_PATH);
- JSONArray response = jsonPath.read(responseBody.getResponse().toString(), READ_LIST_OPTIONS);
- response.stream()
- .map(obj -> ((LinkedHashMap) obj))
- .filter(obj -> (Boolean) obj.get(IS_ACTIVE))
- .forEach(obj -> {
- locationHierarchyDetails.put(String.valueOf(obj.get(LOCATION_HIERARCHYLEVEL)),
- String.valueOf(obj.get(LOCATION_HIERARCHY_NAME)));
- locationDetails.put(String.valueOf(obj.get(LOCATION_HIERARCHY_NAME)), null);
- });
- }
- });
-
- Set locationHierarchyNames = locationDetails.keySet().stream().collect(Collectors.toSet());
- locationHierarchyNames.stream().forEach(hierarchyName -> {
- String uri = UriComponentsBuilder
- .fromUriString(
- env.getProperty(MASTERDATA_LOCATION_HIERARCHY_URI))
- .buildAndExpand(hierarchyName).toUriString();
+ if (Objects.nonNull(env.getProperty(MASTERDATA_LANGUAGE_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_LOCATIONS_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_LOCATION_HIERARCHY_URI))) {
+ locationHierarchyDetails = new LinkedHashMap<>();
+ locationDetails = new LinkedHashMap<>();
+ languageList.stream().forEach(langCode -> {
+ String uri = UriComponentsBuilder.fromUriString(env.getProperty(MASTERDATA_LOCATIONS_URI))
+ .buildAndExpand(langCode).toUriString();
+ ResponseWrapper responseBody = restTemplate.exchange(uri, HttpMethod.GET, null,
+ new ParameterizedTypeReference>() {
+ }).getBody();
+ if (Objects.isNull(responseBody.getErrors()) || responseBody.getErrors().isEmpty()) {
+ JsonPath jsonPath = JsonPath.compile(MASTERDATA_LOCATIONS_PATH);
+ JSONArray response = jsonPath.read(responseBody.getResponse().toString(), READ_LIST_OPTIONS);
+ response.stream().map(obj -> ((LinkedHashMap) obj))
+ .filter(obj -> (Boolean) obj.get(IS_ACTIVE)).forEach(obj -> {
+ locationHierarchyDetails.putIfAbsent(String.valueOf(obj.get(LOCATION_HIERARCHYLEVEL)),
+ new HashSetValuedHashMap<>());
+ locationHierarchyDetails.get(String.valueOf(obj.get(LOCATION_HIERARCHYLEVEL)))
+ .put(langCode, String.valueOf(obj.get(LOCATION_HIERARCHY_NAME)));
+ locationDetails.put(String.valueOf(obj.get(LOCATION_HIERARCHY_NAME)), null);
+ });
+ }
+ });
+
+ Set locationHierarchyNames = locationDetails.keySet().stream().collect(Collectors.toSet());
+ locationHierarchyNames.stream().forEach(hierarchyName -> {
+ String uri = UriComponentsBuilder.fromUriString(env.getProperty(MASTERDATA_LOCATION_HIERARCHY_URI))
+ .buildAndExpand(hierarchyName).toUriString();
+ ResponseWrapper>>> responseBody = restTemplate
+ .getForObject(uri, ResponseWrapper.class);
+ if (Objects.isNull(responseBody.getErrors()) || responseBody.getErrors().isEmpty()) {
+ ArrayList> response = responseBody.getResponse().get(LOCATIONS);
+ SetValuedMap locations = new HashSetValuedHashMap<>(response.size());
+ IntStream.range(0, response.size()).filter(index -> (Boolean) response.get(index).get(IS_ACTIVE))
+ .forEach(index -> {
+ locations.put(String.valueOf(response.get(index).get(LANG_CODE)),
+ String.valueOf(response.get(index).get(CODE)));
+ locations.put(String.valueOf(response.get(index).get(LANG_CODE)),
+ String.valueOf(response.get(index).get(NAME)));
+ if (StringUtils.isNotBlank(env.getProperty(LOCATION_NA))) {
+ locations.put(String.valueOf(response.get(index).get(LANG_CODE)),
+ StringUtils.trim(env.getProperty(LOCATION_NA)));
+ }
+ });
+ locationDetails.put(hierarchyName, locations);
+ }
+ });
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private void loadResidenceStatus() {
+ if (Objects.nonNull(env.getProperty(MASTERDATA_LANGUAGE_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_INDIVIDUAL_TYPES_URI))) {
ResponseWrapper>>> responseBody = restTemplate
- .getForObject(uri, ResponseWrapper.class);
+ .getForObject(env.getProperty(MASTERDATA_INDIVIDUAL_TYPES_URI), ResponseWrapper.class);
if (Objects.isNull(responseBody.getErrors()) || responseBody.getErrors().isEmpty()) {
- ArrayList> response = responseBody.getResponse().get(LOCATIONS);
- SetValuedMap locations = new HashSetValuedHashMap<>(response.size());
- IntStream.range(0, response.size())
- .filter(index -> (Boolean) response.get(index).get(IS_ACTIVE))
- .forEach(index -> {
- locations.put(String.valueOf(response.get(index).get(LANG_CODE)),
- String.valueOf(response.get(index).get(CODE)));
- locations.put(String.valueOf(response.get(index).get(LANG_CODE)),
- String.valueOf(response.get(index).get(NAME)));
- if (StringUtils.isNotBlank(env.getProperty(LOCATION_NA))) {
- locations.put(String.valueOf(response.get(index).get(LANG_CODE)),
- StringUtils.trim(env.getProperty(LOCATION_NA)));
- }
- });
- locationDetails.put(hierarchyName, locations);
+ ArrayList> response = responseBody.getResponse().get(INDIVIDUAL_TYPES);
+ residenceStatusMap = new HashSetValuedHashMap<>(response.size());
+ IntStream.range(0, response.size()).filter(index -> (Boolean) response.get(index).get(IS_ACTIVE))
+ .forEach(index -> {
+ residenceStatusMap.put(String.valueOf(response.get(index).get(LANG_CODE)),
+ String.valueOf(response.get(index).get(CODE)));
+ residenceStatusMap.put(String.valueOf(response.get(index).get(LANG_CODE)),
+ String.valueOf(response.get(index).get(NAME)));
+ });
}
- });
- }
-
- /**
- * Load region.
- */
- private void loadRegion() {
- regionMap = new HashSetValuedHashMap<>();
- Set regionNameList = locationHierarchyDetails.get(REGION.getLevel());
- Optional.ofNullable(regionNameList).orElse(Collections.emptySet()).stream()
- .forEach(hierarchyName -> Optional.ofNullable(locationDetails.get(hierarchyName))
- .ifPresent(regionMap::putAll));
- }
-
- /**
- * Load province.
- */
- private void loadProvince() {
- provinceMap = new HashSetValuedHashMap<>();
- Set provinceNameList = locationHierarchyDetails
- .get(PROVINCE.getLevel());
- Optional.ofNullable(provinceNameList).orElse(Collections.emptySet()).stream()
- .forEach(hierarchyName -> Optional.ofNullable(locationDetails.get(hierarchyName))
- .ifPresent(provinceMap::putAll));
- }
-
- /**
- * Load city.
- */
- private void loadCity() {
- cityMap = new HashSetValuedHashMap<>();
- Set cityNameList = locationHierarchyDetails.get(CITY.getLevel());
- Optional.ofNullable(cityNameList).orElse(Collections.emptySet()).stream()
- .forEach(hierarchyName -> Optional.ofNullable(locationDetails.get(hierarchyName))
- .ifPresent(cityMap::putAll));
- }
-
- /**
- * Load zone.
- */
- private void loadZone() {
- zoneMap = new HashSetValuedHashMap<>();
- Set zoneList = locationHierarchyDetails
- .get(ZONE.getLevel());
- Optional.ofNullable(zoneList).orElse(Collections.emptySet()).stream()
- .forEach(hierarchyName -> Optional.ofNullable(locationDetails.get(hierarchyName))
- .ifPresent(zoneMap::putAll));
- }
-
- /**
- * Load postal code.
- */
- private void loadPostalCode() {
- postalCodeMap = new HashSetValuedHashMap<>();
- Set postalCodeNameList = locationHierarchyDetails
- .get(POSTAL_CODE.getLevel());
- Optional.ofNullable(postalCodeNameList).orElse(Collections.emptySet()).stream()
- .forEach(hierarchyName -> Optional.ofNullable(locationDetails.get(hierarchyName))
- .ifPresent(postalCodeMap::putAll));
+ }
}
-
- @SuppressWarnings("unchecked")
- private void loadResidenceStatus() {
- ResponseWrapper>>> responseBody = restTemplate
- .getForObject(env.getProperty(MASTERDATA_INDIVIDUAL_TYPES_URI), ResponseWrapper.class);
- if (Objects.isNull(responseBody.getErrors()) || responseBody.getErrors().isEmpty()) {
- ArrayList> response = responseBody.getResponse().get(INDIVIDUAL_TYPES);
- residenceStatusMap = new HashSetValuedHashMap<>(response.size());
- IntStream.range(0, response.size()).filter(index -> (Boolean) response.get(index).get(IS_ACTIVE))
- .forEach(index -> {
- residenceStatusMap.put(String.valueOf(response.get(index).get(LANG_CODE)),
- String.valueOf(response.get(index).get(CODE)));
- residenceStatusMap.put(String.valueOf(response.get(index).get(LANG_CODE)),
- String.valueOf(response.get(index).get(NAME)));
- });
+
+ private void validateLocationHierarchy(String identityString, List errorList) {
+ if (Objects.nonNull(env.getProperty(MASTERDATA_LANGUAGE_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_LOCATIONS_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_LOCATION_HIERARCHY_URI))) {
+ mapping.entrySet().stream().forEach(fieldEntry -> {
+ Arrays.asList(fieldEntry.getValue().split(",")).stream()
+ .map(field -> String.format(JSON_PATH_WILDCARD_SEARCH, field)).forEach(field -> {
+ JsonPath jsonPath = JsonPath.compile(field);
+ JSONArray fieldData = jsonPath.read(identityString,
+ Configuration.defaultConfiguration().addOptions(Option.SUPPRESS_EXCEPTIONS));
+ final String fieldValuePath = String.format(SIMPLE_TYPE_VALUE_PATH, field);
+ final String fieldLangPath = String.format(SIMPLE_TYPE_LANGUAGE_PATH, field);
+ fieldData.stream().forEach(data -> {
+ String extractedLang = null;
+ String extractedValue = null;
+ JSONArray pathList = null;
+
+ if (data instanceof JSONArray) {
+ JSONArray fieldLang = JsonPath.compile(fieldLangPath).read(identityString,
+ Configuration.defaultConfiguration()
+ .addOptions(Option.SUPPRESS_EXCEPTIONS));
+ extractedLang = fieldLang.get(0).toString();
+ JsonPath valuePath = JsonPath.compile(fieldValuePath);
+ JSONArray fieldValue = valuePath.read(identityString, Configuration
+ .defaultConfiguration().addOptions(Option.SUPPRESS_EXCEPTIONS));
+ extractedValue = fieldValue.get(0).toString();
+ pathList = valuePath.read(identityString, Configuration.defaultConfiguration()
+ .addOptions(Option.SUPPRESS_EXCEPTIONS, Option.AS_PATH_LIST));
+ } else if (data instanceof String) {
+ extractedValue = data.toString();
+ pathList = jsonPath.read(identityString, Configuration.defaultConfiguration()
+ .addOptions(Option.SUPPRESS_EXCEPTIONS, Option.AS_PATH_LIST));
+ }
+
+ Set hierarchyList = Objects.nonNull(extractedLang)
+ ? locationHierarchyDetails.get(fieldEntry.getKey()).get(extractedLang)
+ : new HashSet<>(locationHierarchyDetails.get(fieldEntry.getKey()).values());
+ if (hierarchyList.isEmpty()) {
+ JSONArray langPathList = JsonPath.compile(fieldLangPath).read(identityString,
+ Configuration.defaultConfiguration().addOptions(Option.SUPPRESS_EXCEPTIONS,
+ Option.AS_PATH_LIST));
+ String errorMessage = String.format(INVALID_INPUT_PARAMETER.getMessage(),
+ convertToPath(String.valueOf(langPathList.get(0))));
+ errorList.removeIf(serviceError -> serviceError.getMessage().equals(errorMessage));
+ errorList.add(
+ new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(), errorMessage));
+ } else {
+ boolean result = Objects.nonNull(extractedLang)
+ ? locationDetails.get(hierarchyList.iterator().next()).get(extractedLang)
+ .contains(extractedValue)
+ : hierarchyList.stream()
+ .map(hierarchy -> locationDetails.get(hierarchy).values())
+ .flatMap(Collection::stream).collect(Collectors.toSet())
+ .contains(extractedValue);
+ if (!result) {
+ String errorMessage = String.format(INVALID_INPUT_PARAMETER.getMessage(),
+ convertToPath(String.valueOf(pathList.get(0))));
+ errorList.removeIf(
+ serviceError -> serviceError.getMessage().equals(errorMessage));
+ errorList.add(
+ new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(), errorMessage));
+ }
+ }
+ });
+ });
+ });
}
}
-
+
/**
* Validate date of birth.
*
- * @param identity the identity
+ * @param identity the identity
* @param errorList the error list
*/
private void validateDateOfBirth(String identity, List errorList) {
- JsonPath jsonPath = JsonPath.compile(IDENTITY_DOB_PATH);
- JSONArray pathList = jsonPath.read(identity,
- Configuration.defaultConfiguration()
- .addOptions(
- Option.SUPPRESS_EXCEPTIONS,
- Option.AS_PATH_LIST));
- String data = jsonPath.read(identity,
- Configuration.defaultConfiguration().addOptions(Option.SUPPRESS_EXCEPTIONS));
- try {
- if (Objects.nonNull(data)
- && LocalDate
- .parse(data,
- DateTimeFormatter.ofPattern(DOB_FORMAT)
- .withResolverStyle(ResolverStyle.STRICT))
- .isAfter(DateUtils.getUTCCurrentDateTime().toLocalDate())) {
+ if (Objects.nonNull(env.getProperty(DOB_FORMAT))) {
+ JsonPath jsonPath = JsonPath.compile(IDENTITY_DOB_PATH);
+ JSONArray pathList = jsonPath.read(identity,
+ Configuration.defaultConfiguration().addOptions(Option.SUPPRESS_EXCEPTIONS, Option.AS_PATH_LIST));
+ String data = jsonPath.read(identity,
+ Configuration.defaultConfiguration().addOptions(Option.SUPPRESS_EXCEPTIONS));
+ try {
+ if (Objects.nonNull(data) && LocalDate
+ .parse(data,
+ DateTimeFormatter.ofPattern(env.getProperty(DOB_FORMAT))
+ .withResolverStyle(ResolverStyle.STRICT))
+ .isAfter(DateUtils.getUTCCurrentDateTime().toLocalDate())) {
+ String errorMessage = String.format(INVALID_INPUT_PARAMETER.getMessage(),
+ convertToPath(String.valueOf(pathList.get(0))));
+ errorList.removeIf(serviceError -> serviceError.getMessage().equals(errorMessage));
+ errorList.add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(), errorMessage));
+ }
+ } catch (DateTimeParseException e) {
+ ExceptionUtils.logRootCause(e);
String errorMessage = String.format(INVALID_INPUT_PARAMETER.getMessage(),
convertToPath(String.valueOf(pathList.get(0))));
errorList.removeIf(serviceError -> serviceError.getMessage().equals(errorMessage));
errorList.add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(), errorMessage));
}
- } catch (DateTimeParseException e) {
- ExceptionUtils.logRootCause(e);
- String errorMessage = String.format(INVALID_INPUT_PARAMETER.getMessage(),
- convertToPath(String.valueOf(pathList.get(0))));
- errorList.removeIf(serviceError -> serviceError.getMessage().equals(errorMessage));
- errorList.add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(), errorMessage));
}
}
-
+
/**
* Validate language.
*
* @param identityString the identity string
- * @param errorList the error list
+ * @param errorList the error list
*/
private void validateLanguage(String identityString, List errorList) {
- JsonPath jsonPath = JsonPath.compile(IDENTITY_LANGUAGE_PATH);
- JSONArray pathList = jsonPath.read(identityString, PATH_LIST_OPTIONS);
- Map dataMap = IntStream.range(0, pathList.size())
- .boxed()
- .collect(
- Collectors.toMap(i -> String.valueOf(pathList.get(i)), i -> JsonPath
- .compile(String.valueOf(pathList.get(i))).read(identityString, READ_OPTIONS)));
- dataMap.entrySet().stream().filter(entry -> !languageList.contains(entry.getValue()))
- .forEach(entry -> errorList
- .add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(),
- String.format(INVALID_INPUT_PARAMETER.getMessage(),
- convertToPath(entry.getKey())))));
+ if (Objects.nonNull(env.getProperty(MASTERDATA_LANGUAGE_URI))) {
+ JsonPath jsonPath = JsonPath.compile(IDENTITY_LANGUAGE_PATH);
+ JSONArray pathList = jsonPath.read(identityString, PATH_LIST_OPTIONS);
+ Map dataMap = IntStream.range(0, pathList.size()).boxed()
+ .collect(Collectors.toMap(i -> String.valueOf(pathList.get(i)),
+ i -> JsonPath.compile(String.valueOf(pathList.get(i))).read(identityString, READ_OPTIONS)));
+ dataMap.entrySet().stream().filter(entry -> !languageList.contains(entry.getValue()))
+ .forEach(entry -> errorList.add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(),
+ String.format(INVALID_INPUT_PARAMETER.getMessage(), convertToPath(entry.getKey())))));
+ }
}
/**
* Validate gender.
*
* @param identityString the identity string
- * @param errorList the error list
+ * @param errorList the error list
*/
private void validateGender(String identityString, List errorList) {
- JsonPath genderLangPath = JsonPath.compile(IDENTITY_GENDER_LANGUAGE_PATH);
- List genderLangPathList = genderLangPath.read(identityString, PATH_LIST_OPTIONS);
- JsonPath genderValuePath = JsonPath.compile(IDENTITY_GENDER_VALUE_PATH);
- List genderValuePathList = genderValuePath.read(identityString, PATH_LIST_OPTIONS);
- Map> dataMap = IntStream.range(0, genderLangPathList.size())
- .filter(index -> languageList
- .contains(JsonPath.compile(genderLangPathList.get(index)).read(identityString, READ_OPTIONS)))
- .boxed()
- .collect(Collectors.toMap(genderLangPathList::get,
- i -> new AbstractMap.SimpleImmutableEntry(genderValuePathList.get(i),
- JsonPath.compile(genderValuePathList.get(i)).read(identityString, READ_OPTIONS))));
- dataMap.entrySet().stream()
- .filter(entry -> {
+ if (Objects.nonNull(env.getProperty(MASTERDATA_LANGUAGE_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_GENDERTYPES_URI))) {
+ JsonPath genderLangPath = JsonPath.compile(IDENTITY_GENDER_LANGUAGE_PATH);
+ List genderLangPathList = genderLangPath.read(identityString, PATH_LIST_OPTIONS);
+ JsonPath genderValuePath = JsonPath.compile(IDENTITY_GENDER_VALUE_PATH);
+ List genderValuePathList = genderValuePath.read(identityString, PATH_LIST_OPTIONS);
+ Map> dataMap = IntStream.range(0, genderLangPathList.size())
+ .filter(index -> languageList.contains(
+ JsonPath.compile(genderLangPathList.get(index)).read(identityString, READ_OPTIONS)))
+ .boxed()
+ .collect(Collectors.toMap(genderLangPathList::get,
+ i -> new AbstractMap.SimpleImmutableEntry(genderValuePathList.get(i),
+ JsonPath.compile(genderValuePathList.get(i)).read(identityString, READ_OPTIONS))));
+ dataMap.entrySet().stream().filter(entry -> {
String lang = JsonPath.compile(entry.getKey()).read(identityString, READ_OPTIONS);
return genderMap.containsKey(lang) && !genderMap.get(lang).contains(entry.getValue().getValue());
- })
- .forEach(entry -> errorList
- .add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(),
- String.format(INVALID_INPUT_PARAMETER.getMessage(),
- convertToPath(entry.getValue().getKey())))));
- }
-
- /**
- * Validate region.
- *
- * @param identityString the identity string
- * @param errorList the error list
- */
- private void validateRegion(String identityString, List errorList) {
- JsonPath langPath = JsonPath.compile(IDENTITY_REGION_LANGUAGE_PATH);
- List langPathList = langPath.read(identityString, PATH_LIST_OPTIONS);
- JsonPath valuePath = JsonPath.compile(IDENTITY_REGION_VALUE_PATH);
- List valuePathList = valuePath.read(identityString, PATH_LIST_OPTIONS);
- Map> dataMap = IntStream.range(0, langPathList.size())
- .filter(index -> languageList
- .contains(JsonPath.compile(langPathList.get(index)).read(identityString, READ_OPTIONS)))
- .boxed()
- .collect(Collectors.toMap(langPathList::get,
- i -> new AbstractMap.SimpleImmutableEntry(valuePathList.get(i),
- JsonPath.compile(valuePathList.get(i)).read(identityString, READ_OPTIONS))));
- dataMap.entrySet().stream()
- .filter(entry -> {
- String lang = JsonPath.compile(entry.getKey()).read(identityString, READ_OPTIONS);
- return regionMap.containsKey(lang) && !regionMap.get(lang).contains(entry.getValue().getValue());
- })
- .forEach(entry -> errorList
- .add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(),
- String.format(INVALID_INPUT_PARAMETER.getMessage(),
- convertToPath(entry.getValue().getKey())))));
- }
-
- /**
- * Validate province.
- *
- * @param identityString the identity string
- * @param errorList the error list
- */
- private void validateProvince(String identityString, List errorList) {
- JsonPath langPath = JsonPath.compile(IDENTITY_PROVINCE_LANGUAGE_PATH);
- List langPathList = langPath.read(identityString, PATH_LIST_OPTIONS);
- JsonPath valuePath = JsonPath.compile(IDENTITY_PROVINCE_VALUE_PATH);
- List valuePathList = valuePath.read(identityString, PATH_LIST_OPTIONS);
- Map> dataMap = IntStream.range(0, langPathList.size())
- .filter(index -> languageList
- .contains(JsonPath.compile(langPathList.get(index)).read(identityString, READ_OPTIONS)))
- .boxed()
- .collect(Collectors.toMap(langPathList::get,
- i -> new AbstractMap.SimpleImmutableEntry(valuePathList.get(i),
- JsonPath.compile(valuePathList.get(i)).read(identityString, READ_OPTIONS))));
- dataMap.entrySet().stream()
- .filter(entry -> {
- String lang = JsonPath.compile(entry.getKey()).read(identityString, READ_OPTIONS);
- return provinceMap.containsKey(lang) && !provinceMap.get(lang).contains(entry.getValue().getValue());
- })
- .forEach(entry -> errorList
- .add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(),
- String.format(INVALID_INPUT_PARAMETER.getMessage(),
- convertToPath(entry.getValue().getKey())))));
- }
-
- /**
- * Validate city.
- *
- * @param identityString the identity string
- * @param errorList the error list
- */
- private void validateCity(String identityString, List errorList) {
- JsonPath langPath = JsonPath.compile(IDENTITY_CITY_LANGUAGE_PATH);
- List langPathList = langPath.read(identityString, PATH_LIST_OPTIONS);
- JsonPath valuePath = JsonPath.compile(IDENTITY_CITY_VALUE_PATH);
- List valuePathList = valuePath.read(identityString, PATH_LIST_OPTIONS);
- Map> dataMap = IntStream.range(0, langPathList.size())
- .filter(index -> languageList
- .contains(JsonPath.compile(langPathList.get(index)).read(identityString, READ_OPTIONS)))
- .boxed()
- .collect(Collectors.toMap(langPathList::get,
- i -> new AbstractMap.SimpleImmutableEntry(valuePathList.get(i),
- JsonPath.compile(valuePathList.get(i)).read(identityString, READ_OPTIONS))));
- dataMap.entrySet().stream()
- .filter(entry -> {
- String lang = JsonPath.compile(entry.getKey()).read(identityString, READ_OPTIONS);
- return cityMap.containsKey(lang) && !cityMap.get(lang).contains(entry.getValue().getValue());
- })
- .forEach(entry -> errorList
- .add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(),
- String.format(INVALID_INPUT_PARAMETER.getMessage(),
- convertToPath(entry.getValue().getKey())))));
- }
-
- /**
- * Validate Zone.
- *
- * @param identityString the identity string
- * @param errorList the error list
- */
- private void validateZone(String identityString, List errorList) {
- JsonPath langPath = JsonPath
- .compile(IDENTITY_ZONE_LANGUAGE_PATH);
- List langPathList = langPath.read(identityString, PATH_LIST_OPTIONS);
- JsonPath valuePath = JsonPath
- .compile(IDENTITY_ZONE_VALUE_PATH);
- List valuePathList = valuePath.read(identityString, PATH_LIST_OPTIONS);
- Map> dataMap = IntStream.range(0, langPathList.size())
- .filter(index -> languageList
- .contains(JsonPath.compile(langPathList.get(index)).read(identityString, READ_OPTIONS)))
- .boxed()
- .collect(Collectors.toMap(langPathList::get,
- i -> new AbstractMap.SimpleImmutableEntry(valuePathList.get(i),
- JsonPath.compile(valuePathList.get(i)).read(identityString, READ_OPTIONS))));
- dataMap.entrySet().stream()
- .filter(entry -> {
- String lang = JsonPath.compile(entry.getKey()).read(identityString, READ_OPTIONS);
- return zoneMap.containsKey(lang)
- && !zoneMap.get(lang).contains(entry.getValue().getValue());
- })
- .forEach(entry -> errorList
- .add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(),
- String.format(INVALID_INPUT_PARAMETER.getMessage(),
- convertToPath(entry.getValue().getKey())))));
- }
-
- /**
- * Validate postal code.
- *
- * @param identityString the identity string
- * @param errorList the error list
- */
- private void validatePostalCode(String identityString, List errorList) {
- JsonPath jsonPath = JsonPath.compile(IDENTITY_POSTAL_CODE_PATH);
- String value = jsonPath.read(identityString, READ_OPTIONS);
- if (Objects.nonNull(value) && !postalCodeMap.values().contains(value)) {
- errorList.add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(),
- String.format(INVALID_INPUT_PARAMETER.getMessage(), convertToPath(jsonPath.getPath()))));
+ }).forEach(entry -> errorList.add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(),
+ String.format(INVALID_INPUT_PARAMETER.getMessage(), convertToPath(entry.getValue().getKey())))));
}
}
-
+
/**
* Validate documents.
*
* @param identityString the identity string
- * @param errorList the error list
+ * @param errorList the error list
*/
private void validateDocuments(String identityString, List errorList) {
- IdObjectReferenceValidatorDocumentMapping.getAllMapping().entrySet().stream()
- .filter(entry -> docTypeMap.containsKey(entry.getKey())).forEach(entry -> {
- JsonPath jsonPath = JsonPath.compile("identity." + entry.getValue() + ".type");
- Object value = jsonPath.read(identityString, READ_OPTIONS);
- if (Objects.nonNull(value) && !docTypeMap.get(entry.getKey()).contains(value)) {
- errorList.add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(), String
- .format(INVALID_INPUT_PARAMETER.getMessage(), convertToPath(jsonPath.getPath()))));
- }
- });
+ if (Objects.nonNull(env.getProperty(MASTERDATA_LANGUAGE_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_DOCUMENT_CATEGORIES_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_DOCUMENT_TYPES_URI))) {
+ IdObjectReferenceValidatorDocumentMapping.getAllMapping().entrySet().stream()
+ .filter(entry -> docTypeMap.containsKey(entry.getKey())).forEach(entry -> {
+ JsonPath jsonPath = JsonPath.compile(String.format(DOC_TYPE_SCHEMA_FORMAT, entry.getValue()));
+ Object value = jsonPath.read(identityString, READ_OPTIONS);
+ if (Objects.nonNull(value) && !docTypeMap.get(entry.getKey()).contains(value)) {
+ errorList.add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(), String
+ .format(INVALID_INPUT_PARAMETER.getMessage(), convertToPath(jsonPath.getPath()))));
+ }
+ });
+ }
}
-
+
private void validateResidenceStatus(String identityString, List errorList) {
- JsonPath residenceStatusLangPath = JsonPath.compile(IDENTITY_RESIDENCE_STATUS_LANGUAGE_PATH);
- List residenceStatusLangPathList = residenceStatusLangPath.read(identityString, PATH_LIST_OPTIONS);
- JsonPath residenceStatusValuePath = JsonPath.compile(IDENTITY_RESIDENCE_STATUS_VALUE_PATH);
- List residenceStatusValuePathList = residenceStatusValuePath.read(identityString, PATH_LIST_OPTIONS);
- Map> dataMap = IntStream.range(0, residenceStatusLangPathList.size())
- .filter(index -> languageList
- .contains(JsonPath.compile(residenceStatusLangPathList.get(index)).read(identityString, READ_OPTIONS)))
- .boxed()
- .collect(Collectors.toMap(residenceStatusLangPathList::get,
- i -> new AbstractMap.SimpleImmutableEntry(residenceStatusValuePathList.get(i),
- JsonPath.compile(residenceStatusValuePathList.get(i)).read(identityString, READ_OPTIONS))));
- dataMap.entrySet().stream()
- .filter(entry -> {
+ if (Objects.nonNull(env.getProperty(MASTERDATA_LANGUAGE_URI))
+ && Objects.nonNull(env.getProperty(MASTERDATA_INDIVIDUAL_TYPES_URI))) {
+ JsonPath residenceStatusLangPath = JsonPath.compile(IDENTITY_RESIDENCE_STATUS_LANGUAGE_PATH);
+ List residenceStatusLangPathList = residenceStatusLangPath.read(identityString, PATH_LIST_OPTIONS);
+ JsonPath residenceStatusValuePath = JsonPath.compile(IDENTITY_RESIDENCE_STATUS_VALUE_PATH);
+ List residenceStatusValuePathList = residenceStatusValuePath.read(identityString,
+ PATH_LIST_OPTIONS);
+ Map> dataMap = IntStream.range(0, residenceStatusLangPathList.size())
+ .filter(index -> languageList.contains(JsonPath
+ .compile(residenceStatusLangPathList.get(index)).read(identityString, READ_OPTIONS)))
+ .boxed()
+ .collect(Collectors.toMap(residenceStatusLangPathList::get,
+ i -> new AbstractMap.SimpleImmutableEntry(
+ residenceStatusValuePathList.get(i),
+ JsonPath.compile(residenceStatusValuePathList.get(i)).read(identityString,
+ READ_OPTIONS))));
+ dataMap.entrySet().stream().filter(entry -> {
String lang = JsonPath.compile(entry.getKey()).read(identityString, READ_OPTIONS);
- return residenceStatusMap.containsKey(lang)
- && !residenceStatusMap.get(lang).contains(entry.getValue().getValue());
- })
- .forEach(entry -> errorList
- .add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(),
- String.format(INVALID_INPUT_PARAMETER.getMessage(),
- convertToPath(entry.getValue().getKey())))));
+ return residenceStatusMap.containsKey(lang)
+ && !residenceStatusMap.get(lang).contains(entry.getValue().getValue());
+ }).forEach(entry -> errorList.add(new ServiceError(INVALID_INPUT_PARAMETER.getErrorCode(),
+ String.format(INVALID_INPUT_PARAMETER.getMessage(), convertToPath(entry.getValue().getKey())))));
+ }
}
-
+
/**
* Convert to path.
*
@@ -725,4 +581,8 @@ private String convertToPath(String jsonPath) {
String path = String.valueOf(jsonPath.replaceAll("[$']", ""));
return path.substring(1, path.length() - 1).replace("][", "/");
}
+
+ public void setMapping(Map mapping) {
+ this.mapping = mapping;
+ }
}
diff --git a/kernel/kernel-ref-idobjectvalidator/src/test/resources/application-test.properties b/kernel/kernel-ref-idobjectvalidator/src/test/resources/application-test.properties
index e7f58a8d0fc..3a130b58818 100644
--- a/kernel/kernel-ref-idobjectvalidator/src/test/resources/application-test.properties
+++ b/kernel/kernel-ref-idobjectvalidator/src/test/resources/application-test.properties
@@ -6,6 +6,13 @@ mosip.kernel.idobjectvalidator.masterdata.documenttypes.rest.uri=https://0.0.0.0
mosip.kernel.idobjectvalidator.masterdata.locations.rest.uri=https://0.0.0.0/locations/{langCode}
mosip.kernel.idobjectvalidator.masterdata.locationhierarchy.rest.uri=https://0.0.0.0/locationhierarchy/{hierarchy}
+mosip.kernel.idobjectvalidator.locationhierarchy.mapping.0=Country
+mosip.kernel.idobjectvalidator.locationhierarchy.mapping.1=region
+mosip.kernel.idobjectvalidator.locationhierarchy.mapping.2=province
+mosip.kernel.idobjectvalidator.locationhierarchy.mapping.3=city
+mosip.kernel.idobjectvalidator.locationhierarchy.mapping.4=zone
+mosip.kernel.idobjectvalidator.locationhierarchy.mapping.5=postalCode
+
# To disable spring boot logs
logging.level.org.springframework=OFF
logging.level.root=OFF
diff --git a/kernel/kernel-smsserviceprovider-msg91/README.md b/kernel/kernel-smsserviceprovider-msg91/README.md
new file mode 100644
index 00000000000..cec1a4a7ef9
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/README.md
@@ -0,0 +1,76 @@
+## kernel-smsserviceprovider-msg91
+
+ [Background & Design]()
+
+ **Implementation**
+This service is provided as a reference implementation so the adopters could change this code to support their respective service provider.
+
+```
+io.mosip.kernel.core.notification.spi.SMSServiceProvider
+
+```
+The above interface is implemented in this service. Adopters are expected to be compliant to the interface and add their implementation in the SMSServiceProviderImpl.java or create equivalent impl.
+
+Its expected that the adopters do not change the controller and the REST api.
+
+ [API Documentation ]
+
+ ```
+ mvn javadoc:javadoc
+
+ ```
+
+**Properties to be added in Spring application environment using this component**
+
+[application-dev.properties](../../config/application-dev.properties)
+
+ ```
+ #-----------------------------VID Properties--------------------------------------
+mosip.kernel.sms.enabled=true
+mosip.kernel.sms.country.code=91
+mosip.kernel.sms.number.length=10
+
+
+#----------msg91 gateway---------------
+mosip.kernel.sms.api=http://api.msg91.com/api/v2/sendsms
+mosip.kernel.sms.authkey=
+mosip.kernel.sms.route=4
+mosip.kernel.sms.sender=MOSMSG
+
+auth.server.admin.validate.url=
+
+ ```
+
+ **Maven Dependency**
+
+ ```
+
+ io.mosip.kernel
+ kernel-smsserviceprovider-msg91
+ ${version}
+
+
+ ```
+
+
+
+
+**Usage Sample:**
+
+Autowired interface
+
+```
+ @Autowired
+ private VidValidator vidValidatorImpl;
+```
+Call the method
+
+Example:
+
+ ```
+ smsServiceProvider.sendSms(contactNumber, contentMessage);
+
+```
+
+
+
diff --git a/kernel/kernel-smsserviceprovider-msg91/pom.xml b/kernel/kernel-smsserviceprovider-msg91/pom.xml
new file mode 100644
index 00000000000..a55506f8179
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/pom.xml
@@ -0,0 +1,393 @@
+
+ 4.0.0
+io.mosip.kernel
+ kernel-smsserviceprovider-msg91
+ kernel-smsserviceprovider-msg91
+ kernel-smsserviceprovider-msg91
+ https://github.com/mosip/commons
+ 1.1.4
+
+ UTF-8
+
+
+ 11
+ 11
+ 3.8.0
+ 2.22.0
+
+ 3.0.2
+ 3.1.0
+ 0.8.1
+ 3.7.0.1746
+ 3.2.0
+ 2.3
+
+
+ 2.0.2.RELEASE
+ 2.0.7.RELEASE
+ 5.0.5.RELEASE
+ 2.0.4.RELEASE
+
+
+ 2.0.7
+ 1.5.21
+ 2.9.2
+
+
+ 3.6.2
+ 3.7.0
+
+
+
+ 1.2
+ 3.0.0
+ 1.3
+ 2.2
+ 2.0.1.Final
+ 2.2.6
+
+
+ 1.4.197
+ 5.1.46
+ 42.2.2
+ 2.5.0
+ 5.2.17.Final
+ 6.0.12.Final
+
+
+ 4.12
+ 2.23.4
+ 1.7.4
+ 2.0.7
+
+
+ 1.2.3
+ 1.7.19
+ 1.7.7
+ 1.7.25
+
+
+ 2.9.5
+ 2.9.8
+ 2.9.6
+ 20180130
+ 2.2.10
+ 20180813
+ 1.1.1
+
+
+ 3.6.1
+ 3.7
+ 2.6
+ 1.11
+ 4.3
+ 1.9.2
+ 2.2
+ 4.5.6
+ 19.0
+ 1.18.8
+ 0.1.54
+ 1.4.0
+ 7.1.0
+ 2.0.0
+ 5.5.13
+ 2.3.23
+ 1.7
+ 2.0
+ 1.5.2
+ 2.1.1
+ 1.66
+ 63.1
+ 1.0.0
+ 3.3.3
+ 3.1.0
+ 4.1.0-incubating
+ 1.11.368
+ 0.2.4
+ 2.3.0
+ 3.0.1
+ 1.9.12
+ 0.6.0
+ 2.0.0.AM2
+ 1.8.12
+ 1.4.2
+ 1.4.2
+ UTF-8
+
+
+ 11
+ 11
+ 3.8.0
+ 2.22.0
+
+ 3.0.2
+ 3.1.0
+ 0.8.1
+ 3.7.0.1746
+ 3.2.0
+ 2.3
+
+
+ 2.0.2.RELEASE
+ 2.0.7.RELEASE
+ 5.0.5.RELEASE
+ 2.0.4.RELEASE
+
+
+ 2.0.7
+ 1.5.21
+ 2.9.2
+
+
+ 3.6.2
+ 3.7.0
+
+
+
+ 1.2
+ 3.0.0
+ 1.3
+ 2.2
+ 2.0.1.Final
+ 2.2.6
+
+
+ 1.4.197
+ 5.1.46
+ 42.2.2
+ 2.5.0
+ 5.2.17.Final
+ 6.0.12.Final
+
+
+ 4.12
+ 2.23.4
+ 1.7.4
+ 2.0.7
+
+
+ 1.2.3
+ 1.7.19
+ 1.7.7
+ 1.7.25
+
+
+ 2.9.5
+ 2.9.8
+ 2.9.6
+ 20180130
+ 2.2.10
+ 20180813
+ 1.1.1
+
+
+ 3.6.1
+ 3.7
+ 2.6
+ 1.11
+ 4.3
+ 1.9.2
+ 2.2
+ 4.5.6
+ 19.0
+ 1.18.8
+ 0.1.54
+ 1.4.0
+ 7.1.0
+ 2.0.0
+ 5.5.13
+ 2.3.23
+ 1.7
+ 2.0
+ 1.5.2
+ 2.1.1
+ 1.66
+ 63.1
+ 1.0.0
+ 3.3.3
+ 3.1.0
+ 4.1.0-incubating
+ 1.11.368
+ 0.2.4
+ 2.3.0
+ 3.0.1
+ 1.9.12
+ 0.6.0
+ 2.0.0.AM2
+ 1.8.12
+ 1.4.2
+ 1.4.2
+ 1.1.4
+ 1.1.4
+
+
+
+
+ io.mosip.kernel
+ kernel-core
+ ${kernel.core.version}
+
+
+ io.mosip.kernel
+ kernel-auth-adapter
+ ${kernel.auth.adaptor.version}
+
+
+
+
+
+ ossrh
+ https://oss.sonatype.org/content/repositories/snapshots
+
+
+ ossrh
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+
+
+
+ src/main/resources
+
+ bootstrap.properties
+
+
+
+
+
+ maven-deploy-plugin
+ 2.8.1
+
+
+ default-deploy
+ deploy
+
+ deploy
+
+
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.7
+ true
+
+
+ default-deploy
+ deploy
+
+ deploy
+
+
+
+
+ ossrh
+ https://oss.sonatype.org/
+ false
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ true
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.2.0
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+ none
+ false
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+ --pinentry-mode
+ loopback
+
+
+
+
+
+
+ pl.project13.maven
+ git-commit-id-plugin
+ 3.0.1
+
+
+ get-the-git-infos
+
+ revision
+
+ validate
+
+
+
+ true
+ ${project.build.outputDirectory}/git.properties
+
+ ^git.build.(time|version)$
+ ^git.commit.id.(abbrev|full)$
+
+ full
+ ${project.basedir}/.git
+
+
+
+
+
+
+ scm:git:git://github.com/mosip/commons.git
+ scm:git:ssh://github.com:mosip/commons.git
+ https://github.com/mosip/commons
+ HEAD
+
+
+
+ MPL 2.0
+ https://www.mozilla.org/en-US/MPL/2.0/
+
+
+
+
+ Mosip
+ mosip.emailnotifier@gmail.com
+ io.mosip
+ https://github.com/mosip/commons
+
+
+
+
\ No newline at end of file
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/main/java/META-INF/MANIFEST.MF b/kernel/kernel-smsserviceprovider-msg91/src/main/java/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..254272e1c07
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/src/main/java/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/constant/SmsExceptionConstant.java b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/constant/SmsExceptionConstant.java
new file mode 100644
index 00000000000..e2ffeb5791c
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/constant/SmsExceptionConstant.java
@@ -0,0 +1,50 @@
+package io.mosip.kernel.smsserviceprovider.msg91.constant;
+
+/**
+ * This enum provides all the exception constants for sms notification.
+ *
+ * @author Ritesh sinha
+ * @since 1.0.0
+ *
+ */
+public enum SmsExceptionConstant {
+
+ SMS_ILLEGAL_INPUT("KER-NOS-001", "Number and message can't be empty, null"),
+ SMS_INVALID_CONTACT_NUMBER("KER-NOS-002",
+ "Contact number cannot contains alphabet,special character or less than or more than "),
+ SMS_INVALID_CREDENTIAL("KER-NOS-003", ""), INTERNAL_SERVER_ERROR("KER-NOS-500", "Internal server error");
+
+ /**
+ * The error code.
+ */
+ private String errorCode;
+
+ /**
+ * The error message.
+ */
+ private String errorMessage;
+
+ /**
+ * @param errorCode The error code to be set.
+ * @param errorMessage The error message to be set.
+ */
+ private SmsExceptionConstant(String errorCode, String errorMessage) {
+ this.errorCode = errorCode;
+ this.errorMessage = errorMessage;
+ }
+
+ /**
+ * @return the error code.
+ */
+ public String getErrorCode() {
+ return errorCode;
+ }
+
+ /**
+ * @return the error message.
+ */
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+}
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/constant/SmsPropertyConstant.java b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/constant/SmsPropertyConstant.java
new file mode 100644
index 00000000000..cc22848050f
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/constant/SmsPropertyConstant.java
@@ -0,0 +1,39 @@
+package io.mosip.kernel.smsserviceprovider.msg91.constant;
+
+/**
+ * This enum provides all the constant for sms notification.
+ *
+ * @author Ritesh sinha
+ * @since 1.0.0
+ *
+ */
+public enum SmsPropertyConstant {
+
+ AUTH_KEY("authkey"), SMS_MESSAGE("message"), RECIPIENT_NUMBER("mobiles"), COUNTRY_CODE("country"), ROUTE("route"),
+ SENDER_ID("sender"), VENDOR_RESPONSE_SUCCESS("success"), SUCCESS_RESPONSE("Sms Request Sent"), UNICODE("unicode"),
+ PROJECT_NAME("kernel-notification-sms"), SUFFIX_MESSAGE(" digits"), NUMBERS("numbers");
+
+ /**
+ * The property for sms notification.
+ */
+ private String property;
+
+ /**
+ * The constructor to set sms property.
+ *
+ * @param property the property to set.
+ */
+ private SmsPropertyConstant(String property) {
+ this.property = property;
+ }
+
+ /**
+ * Getter for sms property.
+ *
+ * @return the sms property.
+ */
+ public String getProperty() {
+ return property;
+ }
+
+}
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/dto/SmsServerResponseDto.java b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/dto/SmsServerResponseDto.java
new file mode 100644
index 00000000000..241f51b1ebe
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/dto/SmsServerResponseDto.java
@@ -0,0 +1,28 @@
+package io.mosip.kernel.smsserviceprovider.msg91.dto;
+
+import lombok.Data;
+
+/**
+ * The DTO class for sms server response.
+ *
+ * @author Ritesh Sinha
+ * @since 1.0.0
+ *
+ */
+@Data
+public class SmsServerResponseDto {
+ /**
+ * Status for request.
+ */
+ private String type;
+
+ /**
+ * Response message
+ */
+ private String message;
+
+ /**
+ * Response code.
+ */
+ private String code;
+}
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/dto/SmsVendorRequestDto.java b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/dto/SmsVendorRequestDto.java
new file mode 100644
index 00000000000..a59fbac1759
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/dto/SmsVendorRequestDto.java
@@ -0,0 +1,10 @@
+package io.mosip.kernel.smsserviceprovider.msg91.dto;
+
+import lombok.Data;
+
+@Data
+public class SmsVendorRequestDto {
+ private String from;
+ private String to;
+ private String text;
+}
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/exception/ApiExceptionHandler.java b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/exception/ApiExceptionHandler.java
new file mode 100644
index 00000000000..5c1e4462d04
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/exception/ApiExceptionHandler.java
@@ -0,0 +1,182 @@
+package io.mosip.kernel.smsserviceprovider.msg91.exception;
+
+import java.io.IOException;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.converter.HttpMessageNotReadableException;
+import org.springframework.validation.BindingResult;
+import org.springframework.validation.FieldError;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.HttpServerErrorException;
+import org.springframework.web.util.ContentCachingRequestWrapper;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+
+import io.mosip.kernel.core.exception.ExceptionUtils;
+import io.mosip.kernel.core.exception.ServiceError;
+import io.mosip.kernel.core.http.ResponseWrapper;
+import io.mosip.kernel.core.notification.exception.InvalidNumberException;
+import io.mosip.kernel.core.util.EmptyCheckUtils;
+import io.mosip.kernel.smsserviceprovider.msg91.constant.SmsExceptionConstant;
+
+/**
+ * Class for handling exceptions.
+ *
+ * @author Urvil Joshi
+ * @since 1.0.0
+ *
+ */
+@Order(Ordered.HIGHEST_PRECEDENCE-1)
+@RestControllerAdvice
+public class ApiExceptionHandler {
+
+ /**
+ * Reference to ObjectMapper.
+ */
+ @Autowired
+ private ObjectMapper objectMapper;
+
+ private static final String WHITESPACE = " ";
+
+ /**
+ * This method handles MethodArgumentNotValidException type of exceptions.
+ *
+ * @param httpServletRequest the request
+ * @param exception The exception
+ * @return The response entity.
+ * @throws IOException the IOException
+ */
+ @ExceptionHandler(MethodArgumentNotValidException.class)
+ public ResponseEntity> smsInvalidInputsFound(
+ final HttpServletRequest httpServletRequest, final MethodArgumentNotValidException exception)
+ throws IOException {
+ ResponseWrapper responseWrapper = setErrors(httpServletRequest);
+ BindingResult bindingResult = exception.getBindingResult();
+ final List fieldErrors = bindingResult.getFieldErrors();
+ fieldErrors.forEach(x -> {
+ ServiceError error = new ServiceError(SmsExceptionConstant.SMS_ILLEGAL_INPUT.getErrorCode(),
+ x.getField() + WHITESPACE + x.getDefaultMessage());
+ responseWrapper.getErrors().add(error);
+ });
+ return new ResponseEntity<>(responseWrapper, HttpStatus.OK);
+ }
+
+ /**
+ * This method handles MosipInvalidNumberException type of exceptions.
+ *
+ * @param httpServletRequest the request
+ * @param e The exception
+ * @return The response entity.
+ * @throws IOException the IOException
+ */
+ @ExceptionHandler(InvalidNumberException.class)
+ public ResponseEntity> smsNotificationInvalidNumber(
+ final HttpServletRequest httpServletRequest, final InvalidNumberException e) throws IOException {
+ ResponseWrapper errorResponse = setErrors(httpServletRequest);
+ ServiceError error = new ServiceError(e.getErrorCode(), e.getErrorText());
+ errorResponse.getErrors().add(error);
+ return new ResponseEntity<>(errorResponse, HttpStatus.OK);
+
+ }
+
+ /**
+ * This method handle HttpMessageNotReadableException type of exception.
+ *
+ * @param httpServletRequest the request.
+ * @param e the exception.
+ * @return the response entity.
+ * @throws IOException IOException.
+ */
+ @ExceptionHandler(HttpMessageNotReadableException.class)
+ public ResponseEntity> onHttpMessageNotReadable(
+ final HttpServletRequest httpServletRequest, final HttpMessageNotReadableException e) throws IOException {
+ ResponseWrapper errorResponse = setErrors(httpServletRequest);
+ ServiceError error = new ServiceError(SmsExceptionConstant.SMS_ILLEGAL_INPUT.getErrorCode(), e.getMessage());
+ errorResponse.getErrors().add(error);
+ return new ResponseEntity<>(errorResponse, HttpStatus.OK);
+ }
+
+ /**
+ * This method handle HttpClientErrorException type of exception.
+ *
+ * @param httpServletRequest the request.
+ * @param e the exception.
+ * @return the response entity.
+ * @throws IOException IOException.
+ */
+ @ExceptionHandler(HttpClientErrorException.class)
+ public ResponseEntity> smsVendorServiceException(
+ final HttpServletRequest httpServletRequest, final HttpClientErrorException e) throws IOException {
+ ResponseWrapper errorResponse = setErrors(httpServletRequest);
+
+ JsonNode responseTree = objectMapper.readTree(e.getResponseBodyAsString());
+ String errorMessage = null;
+ if (responseTree != null) {
+ responseTree = responseTree.get("requestError").get("serviceException");
+ errorMessage = responseTree.get("text").asText();
+ } else {
+ errorMessage = e.getMessage();
+ }
+ ServiceError error = new ServiceError(SmsExceptionConstant.SMS_INVALID_CREDENTIAL.getErrorCode(), errorMessage);
+ errorResponse.getErrors().add(error);
+ return new ResponseEntity<>(errorResponse, HttpStatus.OK);
+ }
+
+ @ExceptionHandler(HttpServerErrorException.class)
+ public ResponseEntity> httpServerErrorException(HttpServletRequest httpServletRequest,
+ final HttpServerErrorException exception) throws IOException {
+ ResponseWrapper errorResponse = setErrors(httpServletRequest);
+ JsonNode responseTree = objectMapper.readTree(exception.getResponseBodyAsString());
+ String errorMessage = null;
+ if (responseTree != null) {
+ responseTree = responseTree.get("requestError").get("serviceException");
+ errorMessage = responseTree.get("text").asText();
+ } else {
+ errorMessage = exception.getMessage();
+ }
+ ServiceError error = new ServiceError("KER-NOS-004", errorMessage);
+ errorResponse.getErrors().add(error);
+ return new ResponseEntity<>(errorResponse, HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+
+ @ExceptionHandler(value = { Exception.class, RuntimeException.class })
+ public ResponseEntity> defaultErrorHandler(
+ final HttpServletRequest httpServletRequest, Exception e) throws IOException {
+
+ ResponseWrapper responseWrapper = setErrors(httpServletRequest);
+ ServiceError error = new ServiceError(SmsExceptionConstant.INTERNAL_SERVER_ERROR.getErrorCode(),
+ e.getMessage());
+ responseWrapper.getErrors().add(error);
+ ExceptionUtils.logRootCause(e);
+ return new ResponseEntity<>(responseWrapper, HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+
+ private ResponseWrapper setErrors(HttpServletRequest httpServletRequest) throws IOException {
+ ResponseWrapper responseWrapper = new ResponseWrapper<>();
+ String requestBody = null;
+ if (httpServletRequest instanceof ContentCachingRequestWrapper) {
+ requestBody = new String(((ContentCachingRequestWrapper) httpServletRequest).getContentAsByteArray());
+ }
+ if (EmptyCheckUtils.isNullEmpty(requestBody)) {
+ return responseWrapper;
+ }
+ objectMapper.registerModule(new JavaTimeModule());
+ JsonNode reqNode = objectMapper.readTree(requestBody);
+ responseWrapper.setId(reqNode.path("id").asText());
+ responseWrapper.setVersion(reqNode.path("version").asText());
+ return responseWrapper;
+ }
+
+}
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/impl/SMSServiceProviderImpl.java b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/impl/SMSServiceProviderImpl.java
new file mode 100644
index 00000000000..e0315a1eb02
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/impl/SMSServiceProviderImpl.java
@@ -0,0 +1,89 @@
+/**
+ *
+ */
+package io.mosip.kernel.smsserviceprovider.msg91.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.HttpServerErrorException;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.util.UriComponentsBuilder;
+
+import io.mosip.kernel.core.notification.exception.InvalidNumberException;
+import io.mosip.kernel.core.notification.model.SMSResponseDto;
+import io.mosip.kernel.core.notification.spi.SMSServiceProvider;
+import io.mosip.kernel.core.util.StringUtils;
+import io.mosip.kernel.smsserviceprovider.msg91.constant.SmsExceptionConstant;
+import io.mosip.kernel.smsserviceprovider.msg91.constant.SmsPropertyConstant;
+
+/**
+ * @author Ritesh Sinha
+ * @since 1.0.0
+ */
+@Component
+public class SMSServiceProviderImpl implements SMSServiceProvider {
+
+ @Autowired
+ RestTemplate restTemplate;
+
+ @Value("${mosip.kernel.sms.enabled:false}")
+ boolean smsEnabled;
+
+ @Value("${mosip.kernel.sms.country.code}")
+ String countryCode;
+
+ @Value("${mosip.kernel.sms.number.length}")
+ int numberLength;
+
+ @Value("${mosip.kernel.sms.api}")
+ String api;
+
+ @Value("${mosip.kernel.sms.sender}")
+ String sender;
+
+ @Value("${mosip.kernel.sms.password:null}")
+ private String password;
+
+ @Value("${mosip.kernel.sms.route:null}")
+ String route;
+
+ @Value("${mosip.kernel.sms.authkey:null}")
+ String authkey;
+
+ @Value("${mosip.kernel.sms.unicode:1}")
+ String unicode;
+
+ @Override
+ public SMSResponseDto sendSms(String contactNumber, String message) {
+ SMSResponseDto smsResponseDTO = new SMSResponseDto();
+ validateInput(contactNumber);
+ UriComponentsBuilder sms = UriComponentsBuilder.fromHttpUrl(api)
+ .queryParam(SmsPropertyConstant.AUTH_KEY.getProperty(), authkey)
+ .queryParam(SmsPropertyConstant.SMS_MESSAGE.getProperty(), message)
+ .queryParam(SmsPropertyConstant.ROUTE.getProperty(), route)
+ .queryParam(SmsPropertyConstant.SENDER_ID.getProperty(), sender)
+ .queryParam(SmsPropertyConstant.RECIPIENT_NUMBER.getProperty(), contactNumber)
+ .queryParam(SmsPropertyConstant.UNICODE.getProperty(), unicode)
+ .queryParam(SmsPropertyConstant.COUNTRY_CODE.getProperty(), countryCode);
+ try {
+ restTemplate.getForEntity(sms.toUriString(), String.class);
+ } catch (HttpClientErrorException | HttpServerErrorException e) {
+ throw new RuntimeException(e.getResponseBodyAsString());
+ }
+ smsResponseDTO.setMessage(SmsPropertyConstant.SUCCESS_RESPONSE.getProperty());
+ smsResponseDTO.setStatus("success");
+ return smsResponseDTO;
+ }
+
+ private void validateInput(String contactNumber) {
+ if (!StringUtils.isNumeric(contactNumber) || contactNumber.length() < numberLength
+ || contactNumber.length() > numberLength) {
+ throw new InvalidNumberException(SmsExceptionConstant.SMS_INVALID_CONTACT_NUMBER.getErrorCode(),
+ SmsExceptionConstant.SMS_INVALID_CONTACT_NUMBER.getErrorMessage() + numberLength
+ + SmsPropertyConstant.SUFFIX_MESSAGE.getProperty());
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/main/resources/META-INF/spring.factories b/kernel/kernel-smsserviceprovider-msg91/src/main/resources/META-INF/spring.factories
new file mode 100644
index 00000000000..2810e6a5014
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.mosip.kernel.smsserviceprovider.msg91.exception.ApiExceptionHandler,\
+io.mosip.kernel.smsserviceprovider.msg91.impl.SMSServiceProviderImpl
\ No newline at end of file
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/main/resources/logback.xml b/kernel/kernel-smsserviceprovider-msg91/src/main/resources/logback.xml
new file mode 100644
index 00000000000..7285a15d201
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/src/main/resources/logback.xml
@@ -0,0 +1,10 @@
+
+
+
+ %d [%t] %p [%C{1}].%M.%L : %m%n
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/test/java/io/mosip/kernel/smsserviceprovider/msg91/SMSServiceProviderBootApplication.java b/kernel/kernel-smsserviceprovider-msg91/src/test/java/io/mosip/kernel/smsserviceprovider/msg91/SMSServiceProviderBootApplication.java
new file mode 100644
index 00000000000..1a79077d248
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/src/test/java/io/mosip/kernel/smsserviceprovider/msg91/SMSServiceProviderBootApplication.java
@@ -0,0 +1,18 @@
+package io.mosip.kernel.smsserviceprovider.msg91;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
+
+/*
+ * (non-Javadoc)
+ * IdValidator Boot Application for SpringBootTest
+ */
+
+@SpringBootApplication
+@ComponentScan(basePackages = "io.mosip.kernel.*")
+public class SMSServiceProviderBootApplication {
+ public static void main(String[] args) {
+ SpringApplication.run(SMSServiceProviderBootApplication.class, args);
+ }
+}
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/test/java/io/mosip/kernel/smsserviceprovider/msg91/test/SmsServiceProviderTest.java b/kernel/kernel-smsserviceprovider-msg91/src/test/java/io/mosip/kernel/smsserviceprovider/msg91/test/SmsServiceProviderTest.java
new file mode 100644
index 00000000000..353d76ec3c5
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/src/test/java/io/mosip/kernel/smsserviceprovider/msg91/test/SmsServiceProviderTest.java
@@ -0,0 +1,102 @@
+package io.mosip.kernel.smsserviceprovider.msg91.test;
+
+import static org.mockito.Mockito.when;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.test.util.ReflectionTestUtils;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.util.UriComponentsBuilder;
+
+import io.mosip.kernel.core.notification.exception.InvalidNumberException;
+import io.mosip.kernel.core.notification.model.SMSResponseDto;
+import io.mosip.kernel.smsserviceprovider.msg91.SMSServiceProviderBootApplication;
+import io.mosip.kernel.smsserviceprovider.msg91.constant.SmsPropertyConstant;
+import io.mosip.kernel.smsserviceprovider.msg91.dto.SmsServerResponseDto;
+import io.mosip.kernel.smsserviceprovider.msg91.impl.SMSServiceProviderImpl;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = { SMSServiceProviderBootApplication.class })
+public class SmsServiceProviderTest {
+
+ @Autowired
+ SMSServiceProviderImpl service;
+
+ @MockBean
+ RestTemplate restTemplate;
+
+ @Value("${mosip.kernel.sms.api}")
+ String api;
+
+ @Value("${mosip.kernel.sms.authkey}")
+ String authkey;
+
+ @Value("${mosip.kernel.sms.country.code}")
+ String countryCode;
+
+ @Value("${mosip.kernel.sms.sender}")
+ String senderId;
+
+ @Value("${mosip.kernel.sms.route}")
+ String route;
+
+ @Value("${mosip.kernel.sms.number.length}")
+ String length;
+
+ @Test
+ public void sendSmsTest() {
+
+ UriComponentsBuilder sms = UriComponentsBuilder.fromHttpUrl(api)
+ .queryParam(SmsPropertyConstant.AUTH_KEY.getProperty(), authkey)
+ .queryParam(SmsPropertyConstant.SMS_MESSAGE.getProperty(), "your otp is 4646")
+ .queryParam(SmsPropertyConstant.ROUTE.getProperty(), route)
+ .queryParam(SmsPropertyConstant.SENDER_ID.getProperty(), senderId)
+ .queryParam(SmsPropertyConstant.RECIPIENT_NUMBER.getProperty(), "8987876473")
+ .queryParam(SmsPropertyConstant.COUNTRY_CODE.getProperty(), countryCode);
+
+ SmsServerResponseDto serverResponse = new SmsServerResponseDto();
+ serverResponse.setType("success");
+ SMSResponseDto dto = new SMSResponseDto();
+ dto.setStatus(serverResponse.getType());
+ dto.setMessage("Sms Request Sent");
+
+ when(restTemplate.getForEntity(sms.toUriString(), String.class))
+ .thenReturn(new ResponseEntity<>(serverResponse.toString(), HttpStatus.OK));
+
+ when(restTemplate.postForEntity(Mockito.anyString(), Mockito.eq(Mockito.any()), Object.class))
+ .thenReturn(new ResponseEntity<>(serverResponse, HttpStatus.OK));
+
+ // assertThat(service.sendSms("8987876473", "your otp is 4646"),
+ // is(dto));
+
+ }
+
+ @Test(expected = InvalidNumberException.class)
+ public void invalidContactNumberTest() {
+ service.sendSms("jsbchb", "hello your otp is 45373");
+ }
+
+ @Test(expected = InvalidNumberException.class)
+ public void contactNumberMinimumThresholdTest() {
+ service.sendSms("78978976", "hello your otp is 45373");
+ }
+
+ @Test(expected = InvalidNumberException.class)
+ public void contactNumberMaximumThresholdTest() {
+ service.sendSms("7897897458673484376", "hello your otp is 45373");
+ }
+
+ @Test
+ public void validGateWayTest() {
+ service.sendSms("1234567890", "hello your otp is 45373");
+ }
+
+}
\ No newline at end of file
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/test/resources/application.properties b/kernel/kernel-smsserviceprovider-msg91/src/test/resources/application.properties
new file mode 100644
index 00000000000..024e621d1e2
--- /dev/null
+++ b/kernel/kernel-smsserviceprovider-msg91/src/test/resources/application.properties
@@ -0,0 +1,19 @@
+mosip.kernel.sms.enabled=true
+mosip.kernel.sms.country.code=91
+mosip.kernel.sms.number.length=10
+
+
+#----------msg91 gateway---------------
+mosip.kernel.sms.api=http://api.msg91.com/api/v2/sendsms
+mosip.kernel.sms.authkey=282572AcvONzDY0SlY5d11eb1a
+mosip.kernel.sms.route=4
+mosip.kernel.sms.sender=MOSMSG
+
+
+
+auth.server.validate.url=https://dev.mosip.io/authmanager/v1.0/authorize/validateToken
+
+## To disable the logging (spring boot)
+logging.level.org.springframework=OFF
+logging.level.root=OFF
+spring.main.banner-mode=off
diff --git a/kernel/kernel-virusscanner-clamav/.sts4-cache/classpath-data.json b/kernel/kernel-virusscanner-clamav/.sts4-cache/classpath-data.json
new file mode 100644
index 00000000000..759b1f6d1a3
--- /dev/null
+++ b/kernel/kernel-virusscanner-clamav/.sts4-cache/classpath-data.json
@@ -0,0 +1 @@
+{"name":"kernel-virusscanner-clamav","classpathEntries":[{"kind":"binary","path":"C:\\Program Files\\Java\\jdk1.8.0_231\\jre\\lib\\resources.jar","javadocContainerUrl":"https://docs.oracle.com/javase/1/docs/api/","isSystem":true,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Program Files\\Java\\jdk1.8.0_231\\jre\\lib\\rt.jar","javadocContainerUrl":"https://docs.oracle.com/javase/1/docs/api/","isSystem":true,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Program Files\\Java\\jdk1.8.0_231\\jre\\lib\\jsse.jar","javadocContainerUrl":"https://docs.oracle.com/javase/1/docs/api/","isSystem":true,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Program Files\\Java\\jdk1.8.0_231\\jre\\lib\\jce.jar","javadocContainerUrl":"https://docs.oracle.com/javase/1/docs/api/","isSystem":true,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Program Files\\Java\\jdk1.8.0_231\\jre\\lib\\charsets.jar","javadocContainerUrl":"https://docs.oracle.com/javase/1/docs/api/","isSystem":true,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Program Files\\Java\\jdk1.8.0_231\\jre\\lib\\jfr.jar","javadocContainerUrl":"https://docs.oracle.com/javase/1/docs/api/","isSystem":true,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"source","path":"B:\\mosipgit\\commons\\kernel\\kernel-core\\src\\main\\java","outputFolder":"B:\\mosipgit\\commons\\kernel\\kernel-core\\target\\classes","javadocContainerUrl":"file:/B:/mosipgit/commons/kernel/kernel-core/target/site/apidocs","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":true},{"kind":"binary","path":"C:\\Users\\M1044287\\.m2\\repository\\xyz\\capybara\\clamav-client\\1.0.4\\clamav-client-1.0.4.jar","sourceContainerUrl":"file:/C:/Users/M1044287/.m2/repository/xyz/capybara/clamav-client/1.0.4/clamav-client-1.0.4-sources.jar","javadocContainerUrl":"file:/C:/Users/M1044287/.m2/repository/xyz/capybara/clamav-client/1.0.4/clamav-client-1.0.4-javadoc.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\M1044287\\.m2\\repository\\org\\slf4j\\jul-to-slf4j\\1.7.25\\jul-to-slf4j-1.7.25.jar","sourceContainerUrl":"file:/C:/Users/M1044287/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25-sources.jar","javadocContainerUrl":"file:/C:/Users/M1044287/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25-javadoc.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\M1044287\\.m2\\repository\\org\\slf4j\\slf4j-api\\1.7.25\\slf4j-api-1.7.25.jar","sourceContainerUrl":"file:/C:/Users/M1044287/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25-sources.jar","javadocContainerUrl":"file:/C:/Users/M1044287/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25-javadoc.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\M1044287\\.m2\\repository\\org\\slf4j\\jcl-over-slf4j\\1.7.25\\jcl-over-slf4j-1.7.25.jar","sourceContainerUrl":"file:/C:/Users/M1044287/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25-sources.jar","javadocContainerUrl":"file:/C:/Users/M1044287/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25-javadoc.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"source","path":"B:\\mosipgit\\commons\\kernel\\kernel-virusscanner-clamav\\src\\main\\java","outputFolder":"B:\\mosipgit\\commons\\kernel\\kernel-virusscanner-clamav\\target\\classes","javadocContainerUrl":"file:/B:/mosipgit/commons/kernel/kernel-virusscanner-clamav/target/site/apidocs","isSystem":false,"isOwn":true,"isTest":false,"isJavaContent":true},{"kind":"source","path":"B:\\mosipgit\\commons\\kernel\\kernel-virusscanner-clamav\\src\\test\\java","outputFolder":"B:\\mosipgit\\commons\\kernel\\kernel-virusscanner-clamav\\target\\test-classes","javadocContainerUrl":"file:/B:/mosipgit/commons/kernel/kernel-virusscanner-clamav/target/site/apidocs","isSystem":false,"isOwn":true,"isTest":true,"isJavaContent":true},{"kind":"source","path":"B:\\mosipgit\\commons\\kernel\\kernel-virusscanner-clamav\\src\\main\\resources","outputFolder":"B:\\mosipgit\\commons\\kernel\\kernel-virusscanner-clamav\\target\\classes","isSystem":false,"isOwn":true,"isTest":false,"isJavaContent":false},{"kind":"source","path":"B:\\mosipgit\\commons\\kernel\\kernel-virusscanner-clamav\\src\\test\\resources","outputFolder":"B:\\mosipgit\\commons\\kernel\\kernel-virusscanner-clamav\\target\\test-classes","isSystem":false,"isOwn":true,"isTest":true,"isJavaContent":false},{"kind":"source","path":"B:\\mosipgit\\commons\\kernel\\kernel-virusscanner-clamav\\src\\test\\java","outputFolder":"B:\\mosipgit\\commons\\kernel\\kernel-virusscanner-clamav\\target\\test-classes","javadocContainerUrl":"file:/B:/mosipgit/commons/kernel/kernel-virusscanner-clamav/target/site/apidocs","isSystem":false,"isOwn":true,"isTest":false,"isJavaContent":false}]}
\ No newline at end of file
diff --git a/kernel/kernel-virusscanner-clamav/README.md b/kernel/kernel-virusscanner-clamav/README.md
new file mode 100644
index 00000000000..6d1d2d65ff9
--- /dev/null
+++ b/kernel/kernel-virusscanner-clamav/README.md
@@ -0,0 +1,56 @@
+## kernel-virusscanner-clamav
+
+
+[Background & Design](../../docs/design/kernel/kernel-virusscanner.md)
+
+
+[API Documentation]
+
+ ```
+ mvn javadoc:javadoc
+
+ ```
+
+
+ **Maven Dependency**
+
+ ```
+
+ io.mosip.kernel
+ kernel-templatemanager-velocity
+ ${project.version}
+
+ ```
+
+ **Application Properties**
+
+ ```
+mosip.kernel.virus-scanner.host=104.211.209.102
+mosip.kernel.virus-scanner.port=3310
+ ```
+
+
+**Usage Sample**
+
+
+ ```
+ @Autowired
+ VirusScanner virusScannerImpl;
+
+ boolean isClean = false;
+
+ try {
+ isClean = virusScannerImpl.scanFile("filepath");
+ } catch (VirusScanFailedException e) {
+ ....
+ }
+
+ ```
+
+
+
+
+
+
+
+
diff --git a/kernel/kernel-virusscanner-clamav/pom.xml b/kernel/kernel-virusscanner-clamav/pom.xml
new file mode 100644
index 00000000000..a12c6e9571a
--- /dev/null
+++ b/kernel/kernel-virusscanner-clamav/pom.xml
@@ -0,0 +1,34 @@
+
+ 4.0.0
+ io.mosip.kernel
+
+ io.mosip.kernel
+ kernel-ref-parent
+ 1.1.4
+
+
+ kernel-virusscanner-clamav
+ 1.1.4
+
+ 1.1.4
+ 11
+ 11
+ 3.8.0
+
+
+
+
+ io.mosip.kernel
+ kernel-core
+ ${kernel.core.version}
+
+
+ xyz.capybara
+ clamav-client
+ 1.0.4
+
+
+
+
diff --git a/kernel/kernel-virusscanner-clamav/src/main/java/io/mosip/kernel/virusscanner/clamav/constant/VirusScannerErrorCodes.java b/kernel/kernel-virusscanner-clamav/src/main/java/io/mosip/kernel/virusscanner/clamav/constant/VirusScannerErrorCodes.java
new file mode 100644
index 00000000000..74fad8211e5
--- /dev/null
+++ b/kernel/kernel-virusscanner-clamav/src/main/java/io/mosip/kernel/virusscanner/clamav/constant/VirusScannerErrorCodes.java
@@ -0,0 +1,19 @@
+package io.mosip.kernel.virusscanner.clamav.constant;
+
+/**
+ * Internal Packet virus scan error codes.
+ *
+ */
+public class VirusScannerErrorCodes {
+ private static final String IIS_EPP_EPV_PREFIX = "IIS_";
+
+ private VirusScannerErrorCodes() {
+ throw new IllegalStateException("Utility class");
+ }
+
+ private static final String IIS_EPP_EPV_PREFIX_GEN_MODULE = IIS_EPP_EPV_PREFIX + "GEN_";
+ public static final String IIS_EPP_EPV_SERVICE_NOT_ACCESSIBLE = IIS_EPP_EPV_PREFIX_GEN_MODULE
+ + "ANTIVIRUS_SERVICE_NOT_ACCESSIBLE";
+ public static final String IIS_EPP_EPV_FILE_NOT_PRESENT = IIS_EPP_EPV_PREFIX_GEN_MODULE
+ + "FILE_NOT_PRESENT_FOR_SCAN";
+}
diff --git a/kernel/kernel-virusscanner-clamav/src/main/java/io/mosip/kernel/virusscanner/clamav/impl/VirusScannerImpl.java b/kernel/kernel-virusscanner-clamav/src/main/java/io/mosip/kernel/virusscanner/clamav/impl/VirusScannerImpl.java
new file mode 100644
index 00000000000..960b675e558
--- /dev/null
+++ b/kernel/kernel-virusscanner-clamav/src/main/java/io/mosip/kernel/virusscanner/clamav/impl/VirusScannerImpl.java
@@ -0,0 +1,224 @@
+package io.mosip.kernel.virusscanner.clamav.impl;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import io.mosip.kernel.core.virusscanner.exception.VirusScannerException;
+import io.mosip.kernel.core.virusscanner.spi.VirusScanner;
+import io.mosip.kernel.virusscanner.clamav.constant.VirusScannerErrorCodes;
+import xyz.capybara.clamav.ClamavClient;
+import xyz.capybara.clamav.commands.scan.result.ScanResult;
+import xyz.capybara.clamav.commands.scan.result.ScanResult.Status;
+import xyz.capybara.clamav.exceptions.ClamavException;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The implementation Class for VirusScannerService.
+ *
+ * @author Mukul Puspam
+ * @author Pranav Kumar
+ */
+@Component
+public class VirusScannerImpl implements VirusScanner {
+
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory.getLogger(VirusScannerImpl.class);
+
+ /** The host. */
+ @Value("${mosip.kernel.virus-scanner.host}")
+ private String host;
+
+ /** The port. */
+ @Value("${mosip.kernel.virus-scanner.port}")
+ private int port;
+
+ /** The clamav client. */
+ protected ClamavClient clamavClient;
+
+ /** The Constant LOGDISPLAY. */
+ private static final String LOGDISPLAY = "{} - {}";
+
+ /** The Constant ANTIVIRUS_SERVICE_NOT_ACCESSIBLE. */
+ private static final String ANTIVIRUS_SERVICE_NOT_ACCESSIBLE = "The anti virus service is not accessible";
+
+ /** The Constant FILE_NOT_PRESENT. */
+ private static final String FILE_NOT_PRESENT = "The file not found for for scanning";
+
+ /**
+ * Creates the connection to client.
+ */
+ public void createConnection() {
+ if (this.clamavClient == null)
+ this.clamavClient = new ClamavClient(host, port);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.mosip.idissuance.virus.scanner.service.VirusScannerService#scanFile(java.
+ * lang.Object)
+ */
+ @Override
+ public Boolean scanFile(String fileName) {
+ Boolean result = Boolean.FALSE;
+ createConnection();
+ File file = new File(fileName);
+ InputStream is = null;
+ try {
+ is = new FileInputStream(file);
+ } catch (FileNotFoundException e1) {
+ throw new VirusScannerException(VirusScannerErrorCodes.IIS_EPP_EPV_FILE_NOT_PRESENT, FILE_NOT_PRESENT, e1);
+ }
+ try {
+ ScanResult scanResult = this.clamavClient.scan(is);
+ if (scanResult.getStatus() == Status.OK) {
+ result = Boolean.TRUE;
+ } else {
+ Map> listOfVirus = scanResult.getFoundViruses();
+ LOGGER.warn("Virus Found in file " + fileName + ": ", listOfVirus);
+ }
+ } catch (ClamavException e) {
+ throw new VirusScannerException(VirusScannerErrorCodes.IIS_EPP_EPV_SERVICE_NOT_ACCESSIBLE,
+ ANTIVIRUS_SERVICE_NOT_ACCESSIBLE, e);
+ }
+
+ return result;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see io.mosip.kernel.core.virusscanner.spi.VirusScanner#scanFile(java.io.
+ * InputStream)
+ */
+ @Override
+ public Boolean scanFile(InputStream is) {
+ Boolean result = Boolean.FALSE;
+ createConnection();
+ try {
+ ScanResult scanResult = this.clamavClient.scan(is);
+ if (scanResult.getStatus() == Status.OK) {
+ result = Boolean.TRUE;
+ } else {
+ Map> listOfVirus = scanResult.getFoundViruses();
+ LOGGER.warn("Virus Found in file : " + listOfVirus);
+ }
+ } catch (ClamavException e) {
+ throw new VirusScannerException(VirusScannerErrorCodes.IIS_EPP_EPV_SERVICE_NOT_ACCESSIBLE,
+ ANTIVIRUS_SERVICE_NOT_ACCESSIBLE, e);
+ }
+ return result;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.mosip.idissuance.virus.scanner.service.VirusScannerService#scanFolder(
+ * java.lang.Object)
+ */
+ @Override
+ public Boolean scanFolder(String folderPath) {
+
+ Boolean result = Boolean.TRUE;
+ createConnection();
+ File folder = new File(folderPath);
+ File[] files = folder.listFiles();
+ for (File file : files) {
+ try {
+ ScanResult scanResult = this.clamavClient.scan(new FileInputStream(file));
+ if (scanResult.getStatus() != Status.OK) {
+ result = Boolean.FALSE;
+ break;
+ }
+ } catch (FileNotFoundException e) {
+ throw new VirusScannerException(VirusScannerErrorCodes.IIS_EPP_EPV_FILE_NOT_PRESENT, FILE_NOT_PRESENT,
+ e);
+ } catch (ClamavException e) {
+ throw new VirusScannerException(VirusScannerErrorCodes.IIS_EPP_EPV_SERVICE_NOT_ACCESSIBLE,
+ ANTIVIRUS_SERVICE_NOT_ACCESSIBLE, e);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * This Method is used to scan byte array
+ *
+ * @param docArray array
+ *
+ * @return a true if file is virus free and false if file is infected
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+
+ @Override
+ public Boolean scanDocument(byte[] docArray) throws IOException {
+ Boolean result = Boolean.FALSE;
+ InputStream docInputStream = new ByteArrayInputStream(docArray);
+
+ createConnection();
+ try {
+
+ ScanResult scanResult = this.clamavClient.scan(docInputStream);
+ if (scanResult.getStatus() == Status.OK) {
+ result = Boolean.TRUE;
+ } else {
+ Map> listOfVirus = scanResult.getFoundViruses();
+ LOGGER.warn("Virus Found in file " + docInputStream + ": ", listOfVirus);
+ }
+ } catch (ClamavException e) {
+ LOGGER.error(LOGDISPLAY, e.getMessage());
+ throw new VirusScannerException(VirusScannerErrorCodes.IIS_EPP_EPV_SERVICE_NOT_ACCESSIBLE,
+ ANTIVIRUS_SERVICE_NOT_ACCESSIBLE, e);
+ } finally {
+
+ docInputStream.close();
+ }
+
+ return result;
+ }
+
+ /**
+ * This Method is used to scan File
+ *
+ * @param doc object
+ *
+ * @return a true if file is virus free and false if file is infected
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @Override
+ public Boolean scanDocument(File doc) throws IOException {
+ Boolean result = Boolean.FALSE;
+
+ createConnection();
+ try (FileInputStream docInputStream = new FileInputStream(doc)) {
+
+ ScanResult scanResult = this.clamavClient.scan(docInputStream);
+ if (scanResult.getStatus() == Status.OK) {
+ result = Boolean.TRUE;
+ } else {
+ Map> listOfVirus = scanResult.getFoundViruses();
+ LOGGER.warn("Virus Found in file " + doc + ": ", listOfVirus);
+ }
+ } catch (ClamavException e) {
+ LOGGER.error(LOGDISPLAY, e.getMessage());
+ throw new VirusScannerException(VirusScannerErrorCodes.IIS_EPP_EPV_SERVICE_NOT_ACCESSIBLE,
+ ANTIVIRUS_SERVICE_NOT_ACCESSIBLE, e);
+ }
+
+ return result;
+ }
+
+}
diff --git a/kernel/kernel-virusscanner-clamav/src/main/resources/META-INF/spring.factories b/kernel/kernel-virusscanner-clamav/src/main/resources/META-INF/spring.factories
new file mode 100644
index 00000000000..c82644efe89
--- /dev/null
+++ b/kernel/kernel-virusscanner-clamav/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,2 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.mosip.kernel.virusscanner.clamav.impl.VirusScannerImpl
\ No newline at end of file
diff --git a/kernel/kernel-virusscanner-clamav/src/main/resources/logback.xml b/kernel/kernel-virusscanner-clamav/src/main/resources/logback.xml
new file mode 100644
index 00000000000..7285a15d201
--- /dev/null
+++ b/kernel/kernel-virusscanner-clamav/src/main/resources/logback.xml
@@ -0,0 +1,10 @@
+
+
+
+ %d [%t] %p [%C{1}].%M.%L : %m%n
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kernel/kernel-virusscanner-clamav/src/test/java/io/mosip/kernel/virusscanner/clamav/test/VirusScannerExceptionTest.java b/kernel/kernel-virusscanner-clamav/src/test/java/io/mosip/kernel/virusscanner/clamav/test/VirusScannerExceptionTest.java
new file mode 100644
index 00000000000..dc5cd2b647f
--- /dev/null
+++ b/kernel/kernel-virusscanner-clamav/src/test/java/io/mosip/kernel/virusscanner/clamav/test/VirusScannerExceptionTest.java
@@ -0,0 +1,85 @@
+package io.mosip.kernel.virusscanner.clamav.test;
+
+import static org.mockito.ArgumentMatchers.any;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import io.mosip.kernel.core.virusscanner.exception.VirusScannerException;
+import io.mosip.kernel.core.virusscanner.spi.VirusScanner;
+import io.mosip.kernel.virusscanner.clamav.impl.VirusScannerImpl;
+import xyz.capybara.clamav.ClamavClient;
+import xyz.capybara.clamav.exceptions.ClamavException;
+
+/**
+ *
+ * @author Mukul Puspam
+ *
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class VirusScannerExceptionTest {
+
+ private final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
+
+ @Mock
+ ClamavClient clamavClient;
+
+ @InjectMocks
+ private VirusScanner virusScannerService = new VirusScannerImpl() {
+ @Override
+ public void createConnection() {
+ this.clamavClient = clamavClient;
+ }
+ };
+
+ private File file;
+ private File folder;
+ private File doc;
+ private byte[] byteArray;
+
+ @Before
+ public void setup() throws Exception {
+ ClassLoader classLoader = getClass().getClassLoader();
+ file = new File(classLoader.getResource("files/0000.zip").getFile());
+ folder = new File(classLoader.getResource("files").getFile());
+ doc = new File(classLoader.getResource("files/test1.docx").getFile());
+ byteArray = new byte[(int) doc.length()];
+ }
+
+ @Test(expected = VirusScannerException.class)
+ public void serviceUnavailableForScanFileTest() throws ClamavException, FileNotFoundException {
+ Mockito.doThrow(ClamavException.class).when(clamavClient).scan(any(FileInputStream.class));
+ virusScannerService.scanFile(file.getAbsolutePath());
+ }
+
+ @Test(expected = VirusScannerException.class)
+ public void serviceUnavailableForScanFolderTest() throws ClamavException {
+ Mockito.doThrow(ClamavException.class).when(clamavClient).scan(any(FileInputStream.class));
+ virusScannerService.scanFolder(folder.getAbsolutePath());
+ }
+
+ @Test(expected = VirusScannerException.class)
+ public void serviceUnavailableForScanDocTest() throws ClamavException, IOException {
+ Mockito.doThrow(ClamavException.class).when(clamavClient).scan(any(InputStream.class));
+ virusScannerService.scanDocument(byteArray);
+ }
+
+ @Test(expected = VirusScannerException.class)
+ public void serviceUnavailableForScanDocumentTest() throws ClamavException, IOException {
+ Mockito.doThrow(ClamavException.class).when(clamavClient).scan(any(FileInputStream.class));
+ virusScannerService.scanDocument(doc);
+ }
+}
diff --git a/kernel/kernel-virusscanner-clamav/src/test/java/io/mosip/kernel/virusscanner/clamav/test/VirusScannerServiceTest.java b/kernel/kernel-virusscanner-clamav/src/test/java/io/mosip/kernel/virusscanner/clamav/test/VirusScannerServiceTest.java
new file mode 100644
index 00000000000..117e7adcd15
--- /dev/null
+++ b/kernel/kernel-virusscanner-clamav/src/test/java/io/mosip/kernel/virusscanner/clamav/test/VirusScannerServiceTest.java
@@ -0,0 +1,143 @@
+package io.mosip.kernel.virusscanner.clamav.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.ArgumentMatchers.any;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.test.context.TestPropertySource;
+
+import io.mosip.kernel.core.virusscanner.spi.VirusScanner;
+import io.mosip.kernel.virusscanner.clamav.impl.VirusScannerImpl;
+import xyz.capybara.clamav.ClamavClient;
+import xyz.capybara.clamav.commands.scan.result.ScanResult;
+import xyz.capybara.clamav.commands.scan.result.ScanResult.Status;
+import xyz.capybara.clamav.exceptions.ClamavException;
+
+/**
+ *
+ * @author Mukul Puspam
+ *
+ */
+@RunWith(MockitoJUnitRunner.class)
+@TestPropertySource({ "classpath:application.properties" })
+public class VirusScannerServiceTest {
+
+ private final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
+
+ @Mock
+ ClamavClient clamavClient;
+
+ @InjectMocks
+ private VirusScanner virusScanner = new VirusScannerImpl() {
+ @Override
+ public void createConnection() {
+ this.clamavClient = clamavClient;
+ }
+ };
+
+ private File file;
+ private File folder;
+ private ScanResult virusFound;
+ private ScanResult virusNotFound;
+ private File doc;
+ private byte[] byteArray;
+ private InputStream is;
+
+ @Before
+ public void setup() throws FileNotFoundException {
+ ClassLoader classLoader = getClass().getClassLoader();
+ file = new File(classLoader.getResource("files/0000.zip").getFile());
+ is = new FileInputStream(file);
+ folder = new File(classLoader.getResource("files").getFile());
+ virusNotFound = new ScanResult(Status.OK);
+ virusFound = new ScanResult(Status.VIRUS_FOUND);
+ doc = new File(classLoader.getResource("files/test1.docx").getFile());
+ byteArray = new byte[(int) doc.length()];
+ }
+
+ @Test
+ public void infectedFileCheck() throws ClamavException {
+ Mockito.when(clamavClient.scan(any(FileInputStream.class))).thenReturn(virusFound);
+ Boolean result = virusScanner.scanFile(file.getAbsolutePath());
+ assertEquals(Boolean.FALSE, result);
+ }
+
+ @Test
+ public void infectedFileCheckForInputStream() throws ClamavException {
+ Mockito.when(clamavClient.scan(any(InputStream.class))).thenReturn(virusFound);
+ Boolean result = virusScanner.scanFile(is);
+ assertEquals(Boolean.FALSE, result);
+ }
+
+ @Test
+ public void nonInfectedFileCheck() throws ClamavException {
+ Mockito.when(clamavClient.scan(any(FileInputStream.class))).thenReturn(virusNotFound);
+ Boolean result = virusScanner.scanFile(file.getAbsolutePath());
+ assertEquals(Boolean.TRUE, result);
+ }
+
+ @Test
+ public void nonInfectedFileCheckForInputStream() throws ClamavException {
+ Mockito.when(clamavClient.scan(any(InputStream.class))).thenReturn(virusNotFound);
+ Boolean result = virusScanner.scanFile(is);
+ assertEquals(Boolean.TRUE, result);
+ }
+
+ @Test
+ public void infectedFolderCheck() throws ClamavException {
+ Mockito.when(clamavClient.scan(any(FileInputStream.class))).thenReturn(virusFound);
+ Boolean result = virusScanner.scanFolder(folder.getAbsolutePath());
+ assertEquals(Boolean.FALSE, result);
+ }
+
+ @Test
+ public void nonInfectedFolderCheck() throws ClamavException {
+ Mockito.when(clamavClient.scan(any(FileInputStream.class))).thenReturn(virusNotFound);
+ Boolean result = virusScanner.scanFolder(folder.getAbsolutePath());
+ assertEquals(Boolean.TRUE, result);
+
+ }
+
+ @Test
+ public void nonInfectedDocCheck() throws ClamavException, IOException {
+ Mockito.when(clamavClient.scan(any(InputStream.class))).thenReturn(virusNotFound);
+ Boolean result = virusScanner.scanDocument(byteArray);
+ assertEquals(Boolean.TRUE, result);
+
+ }
+
+ @Test
+ public void InfectedDocCheck() throws ClamavException, IOException {
+ Mockito.when(clamavClient.scan(any(InputStream.class))).thenReturn(virusFound);
+ Boolean result = virusScanner.scanDocument(byteArray);
+ assertEquals(Boolean.FALSE, result);
+ }
+
+ @Test
+ public void nonInfectedDocumentCheck() throws ClamavException, IOException {
+ Mockito.when(clamavClient.scan(any(FileInputStream.class))).thenReturn(virusNotFound);
+ Boolean result = virusScanner.scanDocument(doc);
+ assertEquals(Boolean.TRUE, result);
+ }
+
+ @Test
+ public void InfectedDocumentCheck() throws ClamavException, IOException {
+ Mockito.when(clamavClient.scan(any(FileInputStream.class))).thenReturn(virusFound);
+ Boolean result = virusScanner.scanDocument(doc);
+ assertEquals(Boolean.FALSE, result);
+ }
+}
diff --git a/kernel/kernel-virusscanner-clamav/src/test/resources/application.properties b/kernel/kernel-virusscanner-clamav/src/test/resources/application.properties
new file mode 100644
index 00000000000..d10f5681946
--- /dev/null
+++ b/kernel/kernel-virusscanner-clamav/src/test/resources/application.properties
@@ -0,0 +1,7 @@
+mosip.kernel.virus-scanner.host=104.211.209.102
+mosip.kernel.virus-scanner.port=3310
+
+## To disable the logging (spring boot)
+logging.level.org.springframework=OFF
+logging.level.root=OFF
+spring.main.banner-mode=off
diff --git a/kernel/kernel-virusscanner-clamav/src/test/resources/files/0000.zip b/kernel/kernel-virusscanner-clamav/src/test/resources/files/0000.zip
new file mode 100644
index 00000000000..15cb0ecb3e2
Binary files /dev/null and b/kernel/kernel-virusscanner-clamav/src/test/resources/files/0000.zip differ
diff --git a/kernel/kernel-virusscanner-clamav/src/test/resources/files/test1.docx b/kernel/kernel-virusscanner-clamav/src/test/resources/files/test1.docx
new file mode 100644
index 00000000000..50ec42ef153
Binary files /dev/null and b/kernel/kernel-virusscanner-clamav/src/test/resources/files/test1.docx differ
diff --git a/kernel/kernel-virusscanner-clamav/src/test/resources/logback.xml b/kernel/kernel-virusscanner-clamav/src/test/resources/logback.xml
new file mode 100644
index 00000000000..7285a15d201
--- /dev/null
+++ b/kernel/kernel-virusscanner-clamav/src/test/resources/logback.xml
@@ -0,0 +1,10 @@
+
+
+
+ %d [%t] %p [%C{1}].%M.%L : %m%n
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kernel/pom.xml b/kernel/pom.xml
index f6d7d3bf138..a31e06fcda4 100644
--- a/kernel/pom.xml
+++ b/kernel/pom.xml
@@ -5,7 +5,7 @@
4.0.0
io.mosip.kernel
kernel-ref-parent
- 1.1.2
+ 1.1.4
pom
kernel
Parent project of MOSIP Kernel for Philippines
@@ -65,7 +65,7 @@
3.0.2
3.1.0
2.9
- 0.8.1
+ 0.8.4
3.7.0.1746
3.2.0
2.3
@@ -122,7 +122,7 @@
20180813
- 1.1.2
+ 1.1.4
3.6.1
@@ -167,6 +167,8 @@
kernel-ref-idobjectvalidator
+ kernel-virusscanner-clamav
+ kernel-smsserviceprovider-msg91
@@ -211,14 +213,14 @@
-
- org.apache.maven.plugins
- maven-compiler-plugin
- ${maven.compiler.version}
-
-
- ${maven.compiler.target}
-
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ ${maven.compiler.version}
+
+
+ ${maven.compiler.target}
+
org.jacoco
diff --git a/keycloak/Dockerfile b/keycloak/Dockerfile
new file mode 100644
index 00000000000..82859c9b65f
--- /dev/null
+++ b/keycloak/Dockerfile
@@ -0,0 +1,2 @@
+FROM jboss/keycloak:11.0.3
+COPY --chown=jboss:root ./theme/ /opt/jboss/keycloak/themes
diff --git a/keycloak/theme/mosip/account/resources/css/account.css b/keycloak/theme/mosip/account/resources/css/account.css
new file mode 100644
index 00000000000..3878e43ac85
--- /dev/null
+++ b/keycloak/theme/mosip/account/resources/css/account.css
@@ -0,0 +1,277 @@
+html {
+ height: 100%;
+}
+
+body {
+ background-color: #F9F9F9;
+ margin: 0;
+ padding: 0;
+ height: 100%;
+}
+
+header .navbar {
+ margin-bottom: 0;
+ min-height: inherit;
+}
+
+.header .container {
+ position: relative;
+}
+
+.navbar-title {
+ background-image: url('../img/logo.png');
+ height: 25px;
+ background-repeat: no-repeat;
+ width: 123px;
+ margin: 3px 10px 5px;
+ text-indent: -99999px;
+}
+
+.navbar-pf .navbar-utility {
+ right: 20px;
+ top: -34px;
+ font-size: 12px;
+}
+
+.navbar-pf .navbar-utility > li > a {
+ color: #fff !important;
+ padding-bottom: 12px;
+ padding-top: 11px;
+ border-left: medium none;
+}
+
+.container {
+ height: 100%;
+}
+
+.content-area {
+ background-color: #fff;
+ border-color: #CECECE;
+ border-style: solid;
+ border-width: 0 1px;
+ height: 100%;
+ padding: 0 30px;
+}
+
+.margin-bottom {
+ margin-bottom: 10px;
+}
+
+/* Sidebar */
+
+.bs-sidebar {
+ background-color: #f9f9f9;
+ padding-top: 44px;
+ padding-right: 0;
+ padding-left: 0;
+ z-index: 20;
+}
+.bs-sidebar ul {
+ list-style: none;
+ padding-left: 12px;
+}
+
+.bs-sidebar ul li {
+ margin-bottom: 0.5em;
+ margin-left: -1em;
+}
+.bs-sidebar ul li a {
+ font-size: 14px;
+ padding-left: 25px;
+ color: #4d5258;
+ line-height: 28px;
+ display: block;
+ border-width: 1px 0 1px 1px;
+ border-style: solid;
+ border-color: #f9f9f9;
+}
+.bs-sidebar ul li a:hover,
+.bs-sidebar ul li a:focus {
+ text-decoration: none;
+ color: #777777;
+ border-right: 2px solid #aaa;
+}
+.bs-sidebar ul li.active a {
+ background-color: #c7e5f0;
+ border-color: #56bae0;
+ font-weight: bold;
+ background-image: url(../img/icon-sidebar-active.png);
+ background-repeat: no-repeat;
+ background-position: right center;
+}
+
+.bs-sidebar ul li.active a:hover {
+ border-right: none;
+}
+
+
+.content-area h2 {
+ font-family: "Open Sans", sans-serif;
+ font-weight: 100;
+ font-size: 24px;
+ margin-bottom: 25px;
+ margin-top: 25px;
+}
+
+.subtitle {
+ text-align: right;
+ margin-top: 30px;
+ color: #909090;
+}
+
+.required {
+ color: #CB2915;
+}
+
+
+.alert {
+ margin-top: 30px;
+ margin-bottom: 0;
+}
+
+.feedback-aligner .alert {
+ background-position: 1.27273em center;
+ background-repeat: no-repeat;
+ border-radius: 2px;
+ border-width: 1px;
+ color: #4D5258;
+ display: inline-block;
+ font-size: 1.1em;
+ line-height: 1.4em;
+ margin: 0;
+ padding: 0.909091em 3.63636em;
+ position: relative;
+ text-align: left;
+}
+.alert.alert-success {
+ background-color: #E4F1E1;
+ border-color: #4B9E39;
+}
+.alert.alert-error {
+ background-color: #F8E7E7;
+ border-color: #B91415;
+}
+.alert.alert-warning {
+ background-color: #FEF1E9;
+ border-color: #F17528;
+}
+.alert.alert-info {
+ background-color: #E4F3FA;
+ border-color: #5994B2;
+}
+
+.form-horizontal {
+ border-top: 1px solid #E9E8E8;
+ padding-top: 23px;
+}
+
+.form-horizontal .control-label {
+ color: #909090;
+ line-height: 1.4em;
+ padding-top: 5px;
+ position: relative;
+ text-align: right;
+ width: 100%;
+}
+
+.form-group {
+ position: relative;
+}
+
+.control-label + .required {
+ position: absolute;
+ right: -2px;
+ top: 0;
+}
+
+#kc-form-buttons {
+ text-align: right;
+ margin-top: 10px;
+}
+
+#kc-form-buttons .btn-primary {
+ float: right;
+ margin-left: 8px;
+}
+
+/* Authenticator page */
+
+ol {
+ padding-left: 40px;
+}
+
+ol li {
+ font-size: 13px;
+ margin-bottom: 10px;
+ position: relative;
+}
+
+ol li img {
+ margin-top: 15px;
+ margin-bottom: 5px;
+ border: 1px solid #eee;
+}
+
+hr + .form-horizontal {
+ border: none;
+ padding-top: 0;
+}
+
+.kc-dropdown{
+ position: relative;
+}
+.kc-dropdown > a{
+ display:block;
+ padding: 11px 10px 12px;
+ line-height: 12px;
+ font-size: 12px;
+ color: #fff !important;
+ text-decoration: none;
+}
+.kc-dropdown > a::after{
+ content: "\2c5";
+ margin-left: 4px;
+}
+.kc-dropdown:hover > a{
+ background-color: rgba(0,0,0,0.2);
+}
+.kc-dropdown ul li a{
+ padding: 1px 11px;
+ font-size: 12px;
+ color: #000 !important;
+ border: 1px solid #fff;
+ text-decoration: none;
+ display:block;
+ line-height: 20px;
+}
+.kc-dropdown ul li a:hover{
+ color: #4d5258;
+ background-color: #d4edfa;
+ border-color: #b3d3e7;
+}
+.kc-dropdown ul{
+ position: absolute;
+ z-index: 2000;
+ list-style:none;
+ display:none;
+ padding: 5px 0px;
+ margin: 0px;
+ background-color: #fff !important;
+ border: 1px solid #b6b6b6;
+ border-radius: 1px;
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+ background-clip: padding-box;
+ min-width: 100px;
+}
+.kc-dropdown:hover ul{
+ display:block;
+}
+
+
+#kc-totp-secret-key {
+ border: 1px solid #eee;
+ font-size: 16px;
+ padding: 10px;
+ margin: 50px 0;
+}
\ No newline at end of file
diff --git a/keycloak/theme/mosip/account/resources/img/favicon.ico b/keycloak/theme/mosip/account/resources/img/favicon.ico
new file mode 100644
index 00000000000..48188dedaae
Binary files /dev/null and b/keycloak/theme/mosip/account/resources/img/favicon.ico differ
diff --git a/keycloak/theme/mosip/account/resources/img/icon-sidebar-active.png b/keycloak/theme/mosip/account/resources/img/icon-sidebar-active.png
new file mode 100644
index 00000000000..e7b9b082836
Binary files /dev/null and b/keycloak/theme/mosip/account/resources/img/icon-sidebar-active.png differ
diff --git a/keycloak/theme/mosip/account/resources/img/keycloak-logo.png b/keycloak/theme/mosip/account/resources/img/keycloak-logo.png
new file mode 100644
index 00000000000..955574855d4
Binary files /dev/null and b/keycloak/theme/mosip/account/resources/img/keycloak-logo.png differ
diff --git a/keycloak/theme/mosip/account/resources/img/logo.png b/keycloak/theme/mosip/account/resources/img/logo.png
new file mode 100644
index 00000000000..a698c548ce5
Binary files /dev/null and b/keycloak/theme/mosip/account/resources/img/logo.png differ
diff --git a/keycloak/theme/mosip/account/theme.properties b/keycloak/theme/mosip/account/theme.properties
new file mode 100644
index 00000000000..a4f97191912
--- /dev/null
+++ b/keycloak/theme/mosip/account/theme.properties
@@ -0,0 +1,13 @@
+parent=base
+import=common/keycloak
+
+styles=node_modules/patternfly/dist/css/patternfly.min.css node_modules/patternfly/dist/css/patternfly-additions.min.css css/account.css
+
+##### css classes for form buttons
+# main class used for all buttons
+kcButtonClass=btn
+# classes defining priority of the button - primary or default (there is typically only one priority button for the form)
+kcButtonPrimaryClass=btn-primary
+kcButtonDefaultClass=btn-default
+# classes defining size of the button
+kcButtonLargeClass=btn-lg
diff --git a/keycloak/theme/mosip/admin/resources/css/styles.css b/keycloak/theme/mosip/admin/resources/css/styles.css
new file mode 100644
index 00000000000..3f6b7b8239e
--- /dev/null
+++ b/keycloak/theme/mosip/admin/resources/css/styles.css
@@ -0,0 +1,486 @@
+html,body {
+ height: 100%;
+}
+
+form {
+ margin-top: 20px;
+}
+
+table {
+ margin-top: 20px;
+}
+
+.required {
+ color: #f00;
+}
+
+.tooltip-inner {
+ min-width: 200px;
+}
+
+.margin-top {
+ margin-top: 20px;
+}
+
+.no-margin-top {
+ margin-top: 0px !important;
+}
+
+table {
+ max-width: 100%;
+}
+
+td.clip {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ max-width: 0;
+}
+
+th.w-10 {
+ width: 10%;
+}
+
+th.w-15 {
+ width: 15%;
+}
+
+th.w-20 {
+ width: 20%;
+}
+
+
+th.w-25 {
+ width: 25%;
+}
+
+th.w-30 {
+ width: 30%;
+}
+
+
+th.w-35 {
+ width: 35%;
+}
+
+th.w-40 {
+ width: 40%;
+}
+
+/*********** Loading ***********/
+
+.loading {
+ background-color: #f5f5f5;
+ border: 1px solid #eee;
+ position: absolute;
+ bottom: 0px;
+ left: 0px;
+ padding: 2px 200px 2px 5px;
+}
+
+/*********** Feedback ***********/
+
+.feedback-aligner {
+ position: fixed;
+ top: 15px;
+ text-align: center;
+ width: 100%;
+ height: 0;
+ z-index: 100;
+}
+.feedback-aligner .alert {
+ border-radius: 2px;
+ border-width: 1px;
+ display: inline-block;
+ position: relative;
+}
+
+/*********** On-Off Switch ***********/
+
+.onoffswitch {
+ -moz-user-select: none;
+ height: 26px;
+ position: relative;
+ width: 62px;
+}
+.onoffswitch .onoffswitch-checkbox {
+ display: none;
+}
+.onoffswitch .onoffswitch-label {
+ border: 1px solid #bbb;
+ border-radius: 2px;
+ cursor: pointer;
+ display: block;
+ overflow: hidden;
+ width: 62px;
+}
+.onoffswitch .onoffswitch-inner {
+ display: block;
+ margin-left: -100%;
+ transition: margin 0.3s ease-in 0s;
+ width: 200%;
+}
+.onoffswitch .onoffswitch-inner > span {
+ -moz-box-sizing: border-box;
+ color: white;
+ float: left;
+ font-size: 11px;
+ font-family: "Open Sans", sans-serif;
+ font-weight: bold;
+ height: 24px;
+ line-height: 24px;
+ padding: 0;
+ width: 50%;
+}
+.onoffswitch .onoffswitch-switch {
+ background-image: linear-gradient(top, #fafafa 0%, #ededed 100%);
+ background-image: -o-linear-gradient(top, #fafafa 0%, #ededed 100%);
+ background-image: -moz-linear-gradient(top, #fafafa 0%, #ededed 100%);
+ background-image: -webkit-linear-gradient(top, #fafafa 0%, #ededed 100%);
+ background-image: -ms-linear-gradient(top, #fafafa 0%, #ededed 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fafafa), color-stop(1, 0, #ededed));
+ border: 1px solid #aaa;
+ border-radius: 2px;
+ bottom: 0;
+ margin: 0;
+ position: absolute;
+ right: 39px;
+ top: 0;
+ transition: all 0.3s ease-in 0s;
+ -webkit-transition: all 0.3s ease-in 0s;
+ width: 23px;
+}
+.onoffswitch .onoffswitch-inner .onoffswitch-active {
+ background-image: linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+ background-image: -o-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+ background-image: -moz-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+ background-image: -webkit-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+ background-image: -ms-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #00a9ec), color-stop(1, 0, #009bd3));
+ color: #FFFFFF;
+ padding-left: 10px;
+}
+.onoffswitch-checkbox:disabled + .onoffswitch-label .onoffswitch-inner .onoffswitch-active,
+.onoffswitch-checkbox:disabled + .onoffswitch-label .onoffswitch-inner .onoffswitch-inactive {
+ background-image: none;
+ background-color: #e5e5e5;
+ color: #9d9fa1;
+}
+.onoffswitch .onoffswitch-inner .onoffswitch-inactive {
+ background: linear-gradient(#fefefe, #e8e8e8) repeat scroll 0 0 transparent;
+ color: #4d5258;
+ padding-right: 10px;
+ text-align: right;
+}
+.onoffswitch .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
+ margin-left: 0;
+}
+.onoffswitch .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
+ right: 0;
+}
+
+
+/*********** Select 2 ***********/
+
+.select2-container {
+ width: 100%;
+}
+
+.select2-container-multi .select2-choices .select2-search-field {
+ height: 26px;
+}
+
+/*********** html select ********/
+.overflow-select {
+ overflow: auto;
+}
+
+
+/*********** New Menu ***********/
+
+
+.sidebar-pf-left{
+ background: #292e34;
+}
+
+.sidebar-pf .nav-pills > li a i, .sidebar-pf .nav-pills > li a span{
+ color: #72767b;
+ display: inline-block;
+ margin-right: 10px;
+}
+.sidebar-pf .nav-pills > li > a{
+ color: #dbdada;
+ padding: 0px 20px 0 30px!important;
+ line-height: 30px;
+ border-left-width: 12px;
+ border-left-style: solid;
+ border-left-color: #292e34;
+ margin-left: -6px;
+}
+
+.sidebar-pf .nav-pills > li > a:hover{
+ background: #393f44;
+ border-color:#292e34;
+ border-left-color: #393f44;
+ color: #fff;
+}
+
+.sidebar-pf .nav-pills > li > a:after{
+ display: none!important;
+}
+
+
+.sidebar-pf .nav-pills > li.active > a {
+ color: #fff;
+ background: #393f44!important;
+ border-bottom: 1px solid #000!important;
+ border-top: 1px solid #000!important;
+ border-left-color: #39a5dc!important;
+}
+
+.sidebar-pf .nav-pills > li.active a i, .sidebar-pf .nav-pills > li.active a span{
+ color: #39a5dc;
+}
+
+/*********** Realm selector ***********/
+
+.realm-selector{
+ color: #fff;
+ margin: 0 -20px;
+ position: relative;
+}
+
+.realm-dropmenu{
+ display: none;
+ cursor: pointer;
+ position: absolute;
+ top: 60px;
+ left: 0;
+ right: 0;
+ z-index: 999;
+ background: #fff;
+}
+
+.realm-selector:hover .realm-dropmenu{
+ display: block;
+}
+
+.realm-add{
+ padding: 10px;
+}
+
+.realm-selector h2{
+ font-size: 16px;
+ line-height: 60px;
+ padding: 0 20px;
+ margin: 0;
+ border-bottom: 1px solid #d5d5d6;
+}
+
+.realm-selector h2 i{
+ display: inline-block;
+ float: right;
+ line-height: 60px;
+}
+
+
+.realm-selector ul{
+ padding-left: 0;
+ margin: 0;
+ list-style: none;
+ max-height: 200px;
+ overflow-y:auto;
+}
+
+
+.realm-selector ul li a{
+ line-height: 60px;
+ padding: 0 20px;
+ border-bottom: 1px solid #d5d5d6;
+ line-height: 39px;
+ display: block;
+ font-size: 14px;
+}
+
+
+/*********** Overwrites header defaults ***********/
+
+.navbar-pf{
+ border-top: none!important;
+}
+
+.navbar-pf .navbar-brand {
+ padding: 0;
+ height: 56px;
+ line-height: 56px;
+ background-position: center center;
+ background-image: url('../img/keyclok-logo.png');
+ background-size: 148px 30px;
+ background-repeat: no-repeat;
+ width: 148px;
+}
+
+.navbar-pf .navbar-utility .dropdown-toggle {
+ padding: 23px !important;
+}
+
+.clickable {
+ cursor: pointer;
+}
+
+h1 i {
+ color: #999999;
+ font-size: 18px;
+ margin-left: 10px;
+}
+
+/* Action cell */
+.kc-action-cell {
+ background-color: #eeeeee;
+ background-image: linear-gradient(to bottom, #fafafa 0%, #ededed 100%);
+ background-repeat: repeat-x;
+
+ text-align: center;
+ vertical-align: middle;
+
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+
+ cursor:pointer;
+}
+
+.kc-action-cell:hover {
+ background-color: #eeeeee;
+ background-image: none;
+}
+
+.kc-sorter span {
+ margin-left: 10px;
+}
+
+
+/* Time selector */
+
+.time-selector input {
+ display: inline-block;
+ width: 120px;
+ padding-right: 0;
+ margin-right: 0;
+}
+
+.time-selector select {
+ display: inline-block;
+ width: 80px;
+ margin-left: 0;
+ padding-left: 0;
+}
+
+.ace_editor {
+ height: 600px;
+ width: 100%;
+}
+
+.kc-button-input-file input {
+ float: left;
+ width: 73%;
+}
+
+.kc-button-input-file label {
+ float: left;
+ margin-left: 2%;
+ width: 25%;
+}
+
+table.kc-authz-table-expanded {
+ margin-top: 0px !important;
+}
+
+.no-gutter > [class*='col-'] {
+ padding-right:0!important;
+ padding-left:0!important;
+}
+
+.password-conceal {
+ font-family: 'text-security-disc';
+ font-size: 14px;
+}
+
+/* Deactivation styles for user-group membership tree models */
+
+div[tree-model] li .deactivate {
+ color: #4a5053;
+ opacity: 0.4;
+}
+
+div[tree-model] li .deactivate_selected {
+ background-color: #dcdcdc;
+ font-weight: bold;
+ padding: 1px 5px;
+}
+
+/* search highlighting */
+
+div[tree-model] li .highlight {
+ background-color: #aaddff;
+}
+
+/* Manage credentials */
+table.credentials-table {
+ margin-top: 0;
+ margin-bottom: 20px;
+}
+
+table.credentials-table td.kc-action-cell {
+ vertical-align: middle;
+}
+
+table.credentials-table input[type='text'] {
+ width: 100%;
+}
+
+td.credential-label-cell {
+ padding: 5px !important;
+}
+
+td.credential-data-cell {
+ padding: 0 !important;
+}
+
+td.credential-data-cell a {
+ margin-left: 5px;
+ line-height: 2.5em;
+ cursor: pointer;
+}
+
+td.credential-action-cell {
+ padding: 0px !important;
+}
+
+td.credential-action-cell div.kc-action-cell {
+ width: 100%;
+ height: 36px;
+ line-height: 34px;
+}
+
+td.credential-action-cell.expanded div.kc-action-cell {
+ border-bottom: 1px solid #d1d1d1;
+}
+
+table.credential-data-table {
+ margin-top: 0;
+}
+
+table.credential-data-table tr:first-child td {
+ border-top: 0;
+}
+
+table.credential-data-table td:first-child {
+ width: 150px;
+}
+
+table.credential-data-table td.key {
+ text-align: right;
+ font-weight: bold;
+}
+
diff --git a/keycloak/theme/mosip/admin/resources/img/favicon.ico b/keycloak/theme/mosip/admin/resources/img/favicon.ico
new file mode 100644
index 00000000000..48188dedaae
Binary files /dev/null and b/keycloak/theme/mosip/admin/resources/img/favicon.ico differ
diff --git a/keycloak/theme/mosip/admin/resources/img/keyclok-logo.png b/keycloak/theme/mosip/admin/resources/img/keyclok-logo.png
new file mode 100644
index 00000000000..ca53f0a04ba
Binary files /dev/null and b/keycloak/theme/mosip/admin/resources/img/keyclok-logo.png differ
diff --git a/keycloak/theme/mosip/admin/resources/img/keyclok-logo.svg b/keycloak/theme/mosip/admin/resources/img/keyclok-logo.svg
new file mode 100644
index 00000000000..05fa87b8a0c
--- /dev/null
+++ b/keycloak/theme/mosip/admin/resources/img/keyclok-logo.svg
@@ -0,0 +1,194 @@
+
+
+
diff --git a/keycloak/theme/mosip/admin/resources/img/select-arrow.png b/keycloak/theme/mosip/admin/resources/img/select-arrow.png
new file mode 100644
index 00000000000..a865a6fa732
Binary files /dev/null and b/keycloak/theme/mosip/admin/resources/img/select-arrow.png differ
diff --git a/keycloak/theme/mosip/admin/theme.properties b/keycloak/theme/mosip/admin/theme.properties
new file mode 100644
index 00000000000..e245ed695fb
--- /dev/null
+++ b/keycloak/theme/mosip/admin/theme.properties
@@ -0,0 +1,2 @@
+parent=base
+styles=node_modules/patternfly/dist/css/patternfly.min.css node_modules/patternfly/dist/css/patternfly-additions.min.css node_modules/select2/select2.css css/styles.css lib/angular/treeview/css/angular.treeview.css node_modules/text-security/text-security.css
\ No newline at end of file
diff --git a/keycloak/theme/mosip/email/theme.properties b/keycloak/theme/mosip/email/theme.properties
new file mode 100644
index 00000000000..f1dbb7215d4
--- /dev/null
+++ b/keycloak/theme/mosip/email/theme.properties
@@ -0,0 +1 @@
+parent=base
\ No newline at end of file
diff --git a/keycloak/theme/mosip/login/resources/css/login.css b/keycloak/theme/mosip/login/resources/css/login.css
new file mode 100644
index 00000000000..13b33f018a6
--- /dev/null
+++ b/keycloak/theme/mosip/login/resources/css/login.css
@@ -0,0 +1,581 @@
+.login-pf body {
+ background: #ffffff;
+ background-size: cover;
+ height: 100%;
+}
+
+@media (min-width: 768px) {
+ .login-pf-page .login-pf-header {
+ margin-bottom: 10px;
+ }
+}
+.login-pf-page .login-pf-header h1 {
+ text-align: center;
+ font-weight: 700;
+ color: #ff2199;
+}
+.login-pf-page .login-pf-header h1 {
+ font-size: 16px;
+}
+@media (min-width: 768px) {
+ .login-pf-page .login-pf-header h1 {
+ font-size: 24px;
+ }
+}
+
+input:-internal-autofill-selected {
+ appearance: menulist-button;
+ background-color: white !important;
+ background-image: none !important;
+ color: -internal-light-dark(black, white) !important;
+}
+
+.login-pf-page .btn-primary{
+ line-height: 36px !important;
+ border-radius: 4px !important;
+ background: rgba(230,58,116,1) !important;
+ border: none !important;
+}
+.login-pf-page .form-control {
+ height: 50px;
+ border: 0px;
+ border-bottom: 1px solid;
+ font-size: 21px;
+}
+
+.alert-error {
+ background-color: #ffffff;
+ border-color: #cc0000;
+ color: #333333;
+}
+
+#kc-locale ul {
+ display: none;
+ position: absolute;
+ background-color: #fff;
+ list-style: none;
+ right: 0;
+ top: 20px;
+ min-width: 100px;
+ padding: 2px 0;
+ border: solid 1px #bbb;
+}
+
+#kc-locale:hover ul {
+ display: block;
+ margin: 0;
+}
+
+#kc-locale ul li a {
+ display: block;
+ padding: 5px 14px;
+ color: #000 !important;
+ text-decoration: none;
+ line-height: 20px;
+}
+
+#kc-locale ul li a:hover {
+ color: #4d5258;
+ background-color: #d4edfa;
+}
+
+#kc-locale-dropdown a {
+ color: #4d5258;
+ background: 0 0;
+ padding: 0 15px 0 0;
+ font-weight: 300;
+}
+
+#kc-locale-dropdown a:hover {
+ text-decoration: none;
+}
+
+a#kc-current-locale-link {
+ display: block;
+ padding: 0 5px;
+}
+
+/* a#kc-current-locale-link:hover {
+ background-color: rgba(0,0,0,0.2);
+} */
+
+a#kc-current-locale-link::after {
+ content: "\2c5";
+ margin-left: 4px;
+}
+
+.login-pf .container {
+ padding-top: 40px;
+}
+
+.login-pf a:hover {
+ color: #0099d3;
+}
+
+#kc-logo {
+ width: 100%;
+}
+
+#kc-logo-wrapper {
+ background-image: url(../img/mosiplogo.png);
+ background-repeat: no-repeat;
+ height: 63px;
+ width: 300px;
+ margin: 62px auto 0;
+}
+
+div.kc-logo-text {
+ background-image: url(../img/mosiplogo.png);
+ background-repeat: no-repeat;
+ height: 131px;
+ width: 300px;
+ margin: -1em 30em;
+}
+
+div.kc-logo-text span {
+ display: none;
+}
+.g-recaptcha {
+ transform:scale(0.77);
+ transform-origin:0 0;
+}
+#kc-header {
+ color: #ededed;
+ overflow: visible;
+ white-space: nowrap;
+}
+
+#kc-header-wrapper {
+ font-size: 29px;
+ text-transform: uppercase;
+ letter-spacing: 3px;
+ line-height: 1.2em;
+ padding: 62px 10px 20px;
+ white-space: normal;
+}
+
+#kc-content {
+ width: 100%;
+}
+
+#kc-attempted-username{
+ font-size: 20px;
+ font-family:inherit;
+ font-weight: normal;
+ padding-right:10px;
+}
+
+#kc-username{
+ text-align: center;
+}
+
+#kc-webauthn-settings-form{
+ padding-top:8px;
+}
+
+/* #kc-content-wrapper {
+ overflow-y: hidden;
+} */
+
+#kc-info {
+ padding-bottom: 200px;
+ margin-bottom: -200px;
+}
+
+#kc-info-wrapper {
+ font-size: 13px;
+}
+
+#kc-form-options span {
+ display: block;
+}
+
+#kc-form-options .checkbox {
+ margin-top: 0;
+ color: #72767b;
+}
+
+#kc-terms-text {
+ margin-bottom: 20px;
+}
+
+#kc-registration {
+ margin-bottom: 15px;
+}
+
+/* TOTP */
+
+.subtitle {
+ text-align: right;
+ margin-top: 30px;
+ color: #909090;
+}
+
+.required {
+ color: #CB2915;
+}
+
+ol#kc-totp-settings {
+ margin: 0;
+ padding-left: 20px;
+}
+
+ul#kc-totp-supported-apps {
+ margin-bottom: 10px;
+}
+
+#kc-totp-secret-qr-code {
+ max-width:150px;
+ max-height:150px;
+}
+
+#kc-totp-secret-key {
+ background-color: #fff;
+ color: #333333;
+ font-size: 16px;
+ padding: 10px 0;
+}
+
+/* OAuth */
+
+#kc-oauth h3 {
+ margin-top: 0;
+}
+
+#kc-oauth ul {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+}
+
+#kc-oauth ul li {
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
+ font-size: 12px;
+ padding: 10px 0;
+}
+
+#kc-oauth ul li:first-of-type {
+ border-top: 0;
+}
+
+#kc-oauth .kc-role {
+ display: inline-block;
+ width: 50%;
+}
+
+/* Code */
+#kc-code textarea {
+ width: 100%;
+ height: 8em;
+}
+
+/* Social */
+
+#kc-social-providers ul {
+ padding: 0;
+}
+
+#kc-social-providers li {
+ display: block;
+}
+
+#kc-social-providers li:first-of-type {
+ margin-top: 0;
+}
+
+.kc-login-tooltip{
+ position:relative;
+ display: inline-block;
+}
+
+.kc-login-tooltip .kc-tooltip-text{
+ top:-3px;
+ left:160%;
+ background-color: black;
+ visibility: hidden;
+ color: #fff;
+
+ min-width:130px;
+ text-align: center;
+ border-radius: 2px;
+ box-shadow:0 1px 8px rgba(0,0,0,0.6);
+ padding: 5px;
+
+ position: absolute;
+ opacity:0;
+ transition:opacity 0.5s;
+}
+
+/* Show tooltip */
+.kc-login-tooltip:hover .kc-tooltip-text {
+ visibility: visible;
+ opacity:0.7;
+}
+
+/* Arrow for tooltip */
+.kc-login-tooltip .kc-tooltip-text::after {
+ content: " ";
+ position: absolute;
+ top: 15px;
+ right: 100%;
+ margin-top: -5px;
+ border-width: 5px;
+ border-style: solid;
+ border-color: transparent black transparent transparent;
+}
+
+.zocial,
+a.zocial {
+ width: 100%;
+ font-weight: normal;
+ font-size: 14px;
+ text-shadow: none;
+ border: 0;
+ background: #f5f5f5;
+ color: #72767b;
+ border-radius: 0;
+ white-space: normal;
+}
+.zocial:before {
+ border-right: 0;
+ margin-right: 0;
+}
+.zocial span:before {
+ padding: 7px 10px;
+ font-size: 14px;
+}
+.zocial:hover {
+ background: #ededed !important;
+}
+
+.zocial.facebook,
+.zocial.github,
+.zocial.google,
+.zocial.microsoft,
+.zocial.stackoverflow,
+.zocial.linkedin,
+.zocial.twitter {
+ background-image: none;
+ border: 0;
+
+ box-shadow: none;
+ text-shadow: none;
+}
+
+/* Copy of zocial windows classes to be used for microsoft's social provider button */
+.zocial.microsoft:before{ content: "\f15d"; }
+.zocial.stackoverflow:before{ color: inherit; }
+
+
+@media (min-width: 768px) {
+ #kc-container-wrapper {
+ position: absolute;
+ width: 100%;
+ }
+
+ .login-pf .container {
+ padding-right: 80px;
+ }
+
+ #kc-locale {
+ position: relative;
+ text-align: right;
+ z-index: 9999;
+ }
+}
+
+@media (max-width: 767px) {
+
+ .login-pf body {
+ background: white;
+ }
+
+ #kc-header {
+ padding-left: 15px;
+ padding-right: 15px;
+ float: none;
+ text-align: left;
+ }
+
+ #kc-header-wrapper {
+ font-size: 16px;
+ font-weight: bold;
+ padding: 20px 60px 0 0;
+ color: #72767b;
+ letter-spacing: 0;
+ }
+
+ div.kc-logo-text {
+ margin: 0;
+ width: 150px;
+ height: 32px;
+ background-size: 100%;
+ }
+
+ #kc-form {
+ float: none;
+ }
+
+ #kc-info-wrapper {
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
+ margin-top: 15px;
+ padding-top: 15px;
+ padding-left: 0px;
+ padding-right: 15px;
+ }
+
+ #kc-social-providers li {
+ display: block;
+ margin-right: 5px;
+ }
+
+ .login-pf .container {
+ padding-top: 15px;
+ padding-bottom: 15px;
+ }
+
+ #kc-locale {
+ position: absolute;
+ width: 200px;
+ top: 20px;
+ right: 20px;
+ text-align: right;
+ z-index: 9999;
+ }
+
+ #kc-logo-wrapper {
+ background-size: 100px 21px;
+ height: 21px;
+ width: 100px;
+ margin: 20px 0 0 20px;
+ }
+
+}
+
+@media (min-height: 646px) {
+ #kc-container-wrapper {
+ bottom: 12%;
+ }
+}
+
+@media (max-height: 645px) {
+ #kc-container-wrapper {
+ padding-top: 50px;
+ top: 20%;
+ }
+}
+
+.card-pf form.form-actions .btn {
+ float: right;
+ margin-left: 10px;
+}
+
+#kc-form-buttons {
+ margin-top: 40px;
+}
+
+.login-pf-page .login-pf-brand {
+ margin-top: 20px;
+ max-width: 360px;
+ width: 40%;
+}
+
+.card-pf {
+ background: #fff;
+ margin: 0 auto;
+ padding: 0 20px;
+ max-width: 500px;
+ border-top: 0;
+ box-shadow: 0 0 0;
+}
+
+/*tablet*/
+@media (max-width: 840px) {
+ .login-pf-page .card-pf{
+ max-width: none;
+ margin-left: 20px;
+ margin-right: 20px;
+ padding: 20px 20px 30px 20px;
+ }
+}
+@media (max-width: 767px) {
+ .login-pf-page .card-pf{
+ max-width: none;
+ margin-left: 0;
+ margin-right: 0;
+ padding-top: 0;
+ }
+ .card-pf.login-pf-accounts{
+ max-width: none;
+ }
+}
+
+.login-pf-page .login-pf-signup {
+ font-size: 15px;
+ color: #72767b;
+}
+#kc-content-wrapper .row {
+ margin-left: 0;
+ margin-right: 0;
+}
+
+@media (min-width: 768px) {
+ .login-pf-page .login-pf-social-section:first-of-type {
+ padding-right: 39px;
+ border-right: 1px solid #d1d1d1;
+ margin-right: -1px;
+ }
+ .login-pf-page .login-pf-social-section:last-of-type {
+ padding-left: 40px;
+ }
+ .login-pf-page .login-pf-social-section .login-pf-social-link:last-of-type {
+ margin-bottom: 0;
+ }
+}
+
+.login-pf-page .login-pf-social-link {
+ margin-bottom: 25px;
+}
+.login-pf-page .login-pf-social-link a {
+ padding: 2px 0;
+}
+
+.login-pf-page.login-pf-page-accounts {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.login-pf-page .btn-primary {
+ margin-top: 10px;
+ line-height: 36px !important;
+ border-radius: 4px !important;
+ background: rgba(230,58,116,1) !important;
+ border: none !important;
+}
+
+.login-pf-page .list-view-pf .list-group-item {
+ border-bottom: 1px solid #ededed;
+}
+
+.login-pf-page .list-view-pf-description {
+ width: 100%;
+}
+
+.login-pf-page .card-pf{
+ margin-bottom: 10px;
+}
+
+#kc-form-login div.form-group:last-of-type,
+#kc-register-form div.form-group:last-of-type,
+#kc-update-profile-form div.form-group:last-of-type {
+ margin-bottom: 0px;
+}
+
+#kc-back {
+ margin-top: 5px;
+}
+
+form#kc-select-back-form div.login-pf-social-section {
+ padding-left: 0px;
+ border-left: 0px;
+}
diff --git a/keycloak/theme/mosip/login/resources/img/favicon.ico b/keycloak/theme/mosip/login/resources/img/favicon.ico
new file mode 100644
index 00000000000..48188dedaae
Binary files /dev/null and b/keycloak/theme/mosip/login/resources/img/favicon.ico differ
diff --git a/keycloak/theme/mosip/login/resources/img/feedback-error-arrow-down.png b/keycloak/theme/mosip/login/resources/img/feedback-error-arrow-down.png
new file mode 100644
index 00000000000..6f2d9d2aeb1
Binary files /dev/null and b/keycloak/theme/mosip/login/resources/img/feedback-error-arrow-down.png differ
diff --git a/keycloak/theme/mosip/login/resources/img/feedback-error-sign.png b/keycloak/theme/mosip/login/resources/img/feedback-error-sign.png
new file mode 100644
index 00000000000..0dd500445d7
Binary files /dev/null and b/keycloak/theme/mosip/login/resources/img/feedback-error-sign.png differ
diff --git a/keycloak/theme/mosip/login/resources/img/feedback-success-arrow-down.png b/keycloak/theme/mosip/login/resources/img/feedback-success-arrow-down.png
new file mode 100644
index 00000000000..03cc0c45dcc
Binary files /dev/null and b/keycloak/theme/mosip/login/resources/img/feedback-success-arrow-down.png differ
diff --git a/keycloak/theme/mosip/login/resources/img/feedback-success-sign.png b/keycloak/theme/mosip/login/resources/img/feedback-success-sign.png
new file mode 100644
index 00000000000..640bd71cab7
Binary files /dev/null and b/keycloak/theme/mosip/login/resources/img/feedback-success-sign.png differ
diff --git a/keycloak/theme/mosip/login/resources/img/feedback-warning-arrow-down.png b/keycloak/theme/mosip/login/resources/img/feedback-warning-arrow-down.png
new file mode 100644
index 00000000000..6f2d9d2aeb1
Binary files /dev/null and b/keycloak/theme/mosip/login/resources/img/feedback-warning-arrow-down.png differ
diff --git a/keycloak/theme/mosip/login/resources/img/feedback-warning-sign.png b/keycloak/theme/mosip/login/resources/img/feedback-warning-sign.png
new file mode 100644
index 00000000000..f9392a356fd
Binary files /dev/null and b/keycloak/theme/mosip/login/resources/img/feedback-warning-sign.png differ
diff --git a/keycloak/theme/mosip/login/resources/img/keycloak-bg.png b/keycloak/theme/mosip/login/resources/img/keycloak-bg.png
new file mode 100644
index 00000000000..4004db4420f
Binary files /dev/null and b/keycloak/theme/mosip/login/resources/img/keycloak-bg.png differ
diff --git a/keycloak/theme/mosip/login/resources/img/keycloak-logo-text.png b/keycloak/theme/mosip/login/resources/img/keycloak-logo-text.png
new file mode 100644
index 00000000000..63f3b9f87de
Binary files /dev/null and b/keycloak/theme/mosip/login/resources/img/keycloak-logo-text.png differ
diff --git a/keycloak/theme/mosip/login/resources/img/keycloak-logo.png b/keycloak/theme/mosip/login/resources/img/keycloak-logo.png
new file mode 100644
index 00000000000..ffa5b0bf9e0
Binary files /dev/null and b/keycloak/theme/mosip/login/resources/img/keycloak-logo.png differ
diff --git a/keycloak/theme/mosip/login/resources/img/mosiplogo.png b/keycloak/theme/mosip/login/resources/img/mosiplogo.png
new file mode 100644
index 00000000000..321ba3df51e
Binary files /dev/null and b/keycloak/theme/mosip/login/resources/img/mosiplogo.png differ
diff --git a/keycloak/theme/mosip/login/theme.properties b/keycloak/theme/mosip/login/theme.properties
new file mode 100644
index 00000000000..d266b1e1075
--- /dev/null
+++ b/keycloak/theme/mosip/login/theme.properties
@@ -0,0 +1,94 @@
+parent=base
+import=common/keycloak
+
+styles=node_modules/patternfly/dist/css/patternfly.min.css node_modules/patternfly/dist/css/patternfly-additions.min.css lib/zocial/zocial.css css/login.css
+meta=viewport==width=device-width,initial-scale=1
+
+kcHtmlClass=login-pf
+kcLoginClass=login-pf-page
+
+kcLogoLink=http://www.keycloak.org
+
+kcLogoClass=login-pf-brand
+
+kcContainerClass=container-fluid
+kcContentClass=col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3
+kcContentWrapperClass=row
+
+kcHeaderClass=login-pf-page-header
+kcFeedbackAreaClass=col-md-12
+kcLocaleClass=col-xs-12 col-sm-1
+kcAlertIconClasserror=pficon pficon-error-circle-o
+
+kcFormAreaClass=col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2
+kcFormCardClass=card-pf
+kcFormCardAccountClass=login-pf-accounts
+kcFormSocialAccountClass=login-pf-social-section
+kcFormSocialAccountContentClass=col-xs-12 col-sm-6
+kcFormSocialAccountListClass=login-pf-social list-unstyled login-pf-social-all
+kcFormSocialAccountDoubleListClass=login-pf-social-double-col
+kcFormSocialAccountListLinkClass=login-pf-social-link
+kcFormHeaderClass=login-pf-header
+
+kcFeedbackErrorIcon=pficon pficon-error-circle-o
+kcFeedbackWarningIcon=pficon pficon-warning-triangle-o
+kcFeedbackSuccessIcon=pficon pficon-ok
+kcFeedbackInfoIcon=pficon pficon-info
+
+kcResetFlowIcon=pficon pficon-arrow fa-2x
+kcWebAuthnKeyIcon=pficon pficon-key
+
+kcFormClass=form-horizontal
+kcFormGroupClass=form-group
+kcFormGroupErrorClass=has-error
+kcLabelClass=control-label
+kcLabelWrapperClass=col-xs-12 col-sm-12 col-md-12 col-lg-12
+kcInputClass=form-control
+kcInputWrapperClass=col-xs-12 col-sm-12 col-md-12 col-lg-12
+kcFormOptionsClass=col-xs-12 col-sm-12 col-md-12 col-lg-12
+kcFormButtonsClass=col-xs-12 col-sm-12 col-md-12 col-lg-12
+kcFormSettingClass=login-pf-settings
+kcTextareaClass=form-control
+kcSignUpClass=login-pf-signup
+
+
+kcInfoAreaClass=col-xs-12 col-sm-4 col-md-4 col-lg-5 details
+
+##### css classes for form buttons
+# main class used for all buttons
+kcButtonClass=btn
+# classes defining priority of the button - primary or default (there is typically only one priority button for the form)
+kcButtonPrimaryClass=btn-primary
+kcButtonDefaultClass=btn-default
+# classes defining size of the button
+kcButtonLargeClass=btn-lg
+kcButtonBlockClass=btn-block
+
+##### css classes for input
+kcInputLargeClass=input-lg
+
+##### css classes for form accessability
+kcSrOnlyClass=sr-only
+
+##### css classes for select-authenticator form
+kcSelectAuthListClass=list-group list-view-pf
+kcSelectAuthListItemClass=list-group-item list-view-pf-stacked
+kcSelectAuthListItemInfoClass=list-view-pf-main-info
+kcSelectAuthListItemLeftClass=list-view-pf-left
+kcSelectAuthListItemBodyClass=list-view-pf-body
+kcSelectAuthListItemDescriptionClass=list-view-pf-description
+kcSelectAuthListItemHeadingClass=list-group-item-heading
+kcSelectAuthListItemHelpTextClass=list-group-item-text
+
+##### css classes for the authenticators
+kcAuthenticatorDefaultClass=fa list-view-pf-icon-lg
+kcAuthenticatorPasswordClass=fa fa-unlock list-view-pf-icon-lg
+kcAuthenticatorOTPClass=fa fa-mobile list-view-pf-icon-lg
+kcAuthenticatorWebAuthnClass=fa fa-key list-view-pf-icon-lg
+kcAuthenticatorWebAuthnPasswordlessClass=fa fa-key list-view-pf-icon-lg
+
+##### css classes for the OTP Login Form
+kcSelectOTPListClass=card-pf card-pf-view card-pf-view-select card-pf-view-single-select
+kcSelectOTPListItemClass=card-pf-body card-pf-top-element
+kcAuthenticatorOtpCircleClass=fa fa-mobile card-pf-icon-circle
+kcSelectOTPItemHeadingClass=card-pf-title text-center
\ No newline at end of file
diff --git a/keycloak/theme/mosip/welcome/index.ftl b/keycloak/theme/mosip/welcome/index.ftl
new file mode 100644
index 00000000000..34983c363b6
--- /dev/null
+++ b/keycloak/theme/mosip/welcome/index.ftl
@@ -0,0 +1,132 @@
+
+
+
+
+
+ Welcome to ${productNameFull}
+
+
+
+
+
+
+
+ <#if properties.styles?has_content>
+ <#list properties.styles?split(' ') as style>
+
+ #list>
+ #if>
+
+
+
+
+
+
+
+
+
+
+ <#if successMessage?has_content>
+