Data mapper is used across MOSIP to facilitate mapping between DTO (Data Transfer Object) and entity.
Data Access Manager provides a DAO (Data Access Object) interface to do the following:
Provide an interface for connection to a Database
Provide an interface to support Database CRUD (Create, Read, Update, Delete) operation
Provide an interface to support a custom SQL
Provide an interface to call Database functions.
Sync Handler allows registration client to sync Master data, List of User, Roles and Respective Mappings and Configurations (Registration Client specific and Global Configs).
Sync Handler also allows Registration Client to push data from Client local database to Master Database.
As part of Master data Sync, the service receives a Machine ID and Timestamp, looks for a mapped Center ID to that Machine ID and responds to the Registration Client with the Center specific Master data for the following tables.
Registration Center Type
List of Registration Center
Template File Format
Template Type
Templates
Reason Category
List of Reasons
Document Category
Document Type
Mapping of Applicant Type-Document Category-Document Type (refer table "Valid Documents")
Machine Type
Machine Specifications
List of Machines
Device Types
Device Specifications
List of Devices
Location Hierarchy
List of Languages
List of Genders
Biometric Authentication Type
Biometric Attribute
Center-Machine Mapping
Center-Device Mapping
Center-Machine-Device Mapping
Center-Machine-User Mapping
Center-User Mapping
Sync Job Definition
The Sync Handler service only sends incremental changes based on the Timestamp received by the service.
For configuration, sync handler receives a request to sync configurations and will respond back with Registration Client specific and Global Configurations.
For User, Roles and Respective User-Role mappings, Sync handler receives Center ID and Timestamp and will respond to the Registration Client with Center specific incremental changes.
Upon receiving a request to generate Machine ID, the system generates Machine ID as per default Machine ID generation logic as mentioned below:
Machine ID should only be numeric
Machine ID generated should be of length of 5 digits
Each new Machine ID should be incremented by 1 for each new request
Machine ID generation should start from 10000
The number should not contain the restricted numbers defined by the ADMINs.
Responds with the Machine ID to the source.
Raises an alert in case of exceptions.
Upon receiving a request to generate Registration Center ID, the system generates it as per default Registration Center ID generation logic.
Refer below for the process:
Registration Center ID is generated as per the defined logic mentioned below:
Registration Center ID should only be numeric
Registration Center ID generated should be of length of 5 digits
Each new Registration Center ID should be incremented by 1 for each new request
Registration Center ID generation should start from 10000
The number should not contain the restricted numbers defined by the ADMIN
In case of exceptions, system triggers relevant error messages
Responds with the Registration Center ID to the source
Raises an alert in case of exceptions.
Upon receiving a request to generate RID with Machine ID and Center ID as input, the system generates it as per default RID generation logic.
Refer below for the process:
RID should be generated as per the defined logic mentioned below:
RID should only be numeric
First 5 Digit should be Registration Center ID
Next 5 Digits should be Machine ID
Next 5 Digits should be Running sequence
Last 14 Digits should be Timestamp
Total: 29 Digits
Responds with the RID to the source
Raises an alert in case of exceptions and triggers the messages.
Upon receiving a request to generate MISP ID, the system generates it as per default MISP ID generation logic.
Refer below for the process:
MISP ID should be generated as per the defined logic mentioned below:
MISP ID should only be numeric
MISP ID generated should be of length of 3 digits (Configurable)
MISP ID generation should start from 100
Each new MISP ID should be incremented by one for each new request
The number should not contain the restricted numbers defined by the ADMIN
Responds with the MISP ID to the source
Raises an alert in case of exceptions and triggers the messages.
Upon receiving a request to generate PRID with input parameters, the system generates PRID as per default PRID generation logic.
Refer below for the process:
PRID generated should contain number of digits as configured by the ADMIN
PRID is generated as per the defined logic mentioned below:
The number should not contain any alphanumeric characters
The number should not contain any repeating numbers for 2 or more than 2 digits
The number should not contain any sequential number for 3 or more than 3 digits
The numbers should not be generated sequentially
The number should not have repeated block of numbers for 2 or more than 2 digits
The number should not contain the restricted numbers defined by the ADMIN
The last digit in the number should be reserved for a checksum
The number should not contain '0' or '1' as the first digit
Responds with the PRID to the source
Raises an alert in case of exceptions.
Upon receiving a request to generate VID, the system generates PRID as per default PRID generation logic.
Refer below for the process:
VID should be generated as per the defined logic mentioned below:
Responds with the VID to the source
Raises an alert in case of exceptions.
VID generation policy
VID generated should contain the number of digits as configured.
Validates if the VID is generated as per the defined logic mentioned below:
The number should not contain any alphanumeric characters
The number should not contain any repeating numbers for 2 or more than 2 digits
The number should not contain any sequential number for 3 or more than 3 digits
The numbers should not be generated sequentially
The number should not have repeated block of numbers for 2 or more than 2 digits
The number should not contain the restricted numbers defined by the ADMIN
The last digit in the number should be reserved for a checksum
The number should not contain '0' or '1' as the first digit.
Expired VID should not be sent in response.
Upon receiving a request to generate Token ID (with input parameters (TSP ID, UIN), the system generates token ID as per default Token ID generation logic
Refer below for the process:
Token ID should be generated based on the below logic using received UIN and Partner ID
Token ID = SHA256( SHA256(UIN + SALT) + Partner ID + SALT
Validate if all mandatory input parameters have been received as listed below for each specific request
UIN - Mandatory
Partner ID - Mandatory
Raise an exception if input parameter is missing. Refer messages section
Token ID length should be of 36 digits
Upon receiving a request to generate partner ID, the system generates it as per default partner ID generation logic.
Refer below for the process:
Partner ID is only be numeric
Partner ID generated is be of length of 4 digits
Partner ID length is be configurable
Each new Partner ID should be incremented by 1 for each new request
Partner ID generation is start from 1000
In case of exceptions, system triggers relevant error messages.
Upon receiving a request to generate License Key, the system generates it as per default License Key generation logic and responds with the License Key to the source
License Key is generated as per the defined logic mentioned below:
License Key Generation follows a random generation pattern
License Key is alphanumeric
License Key generated is of length of 8 digits
License Key is mapped to expiry (Expiry to be configured by admin).
In case of exceptions, system triggers relevant error messages
Upon receiving a request to validate the UIN, the system validates the UIN against the defined policy
Refer below for the process:
Validates if the UIN is of configured length.
Validates the UIN by verifying the checksum
Validates if the UIN received as per the UIN generation logic
Responds to the source with an appropriate message
Raises an alert in case of exceptions.
Upon receiving a request to validate the PRID, the system validates the PRID against the defined policy
Refer below for the process:
Validates if the received PRID contains number of digits as configured by the ADMIN
Validates the PRID received as per the PRID generation logic
Responds to the source with an appropriate message
Raises an alert in case of exceptions.
Upon receiving a request to validate the VID with input parameters (UIN), the system validates the VID against the defined VID policy
Refer below for the process:
Validates if the VID is of configured length.
Validates the VID by verifying the checksum
Validates if the VID received as per the VID generation logic
Responds to the source with an appropriate message and raises an alert in case of exceptions.
RID is generated in the following manner:
First 5 Digit: Registration Center ID
Next 5 Digits: Machine ID
Next 5 Digits: Running sequence
Last 14 Digits: Timestamp
Total: 29 Digits
RID Validation performs pattern validation on RID and provides three methods to validate RID.
Receive a RID, check whether RID is of configured length or not and respond with whether RID is valid or invalid
Receive a RID along with Registration Center ID and Machine ID. Check whether RID is of configured length or not and whether Registration Center ID and Machine ID are attached to the RID or not. Respond with whether RID is valid or invalid
Receive a RID along with Registration Center ID, Machine ID, Sequence Length and Timestamp Length. Check whether RID is proper or not as per the input received. Respond with whether RID is valid or invalid.
The system receives a request to check status of a Partner with an input parameter (Partner ID)
Checks the length of the Partner ID
Checks the status of the Partner ID
Responds to the source according to the conditions mentioned below:
If the length of Partner ID is not of the configured length, respond with message "INVALID"
If the Partner ID is Inactive, respond with message "INACTIVE"
If the Partner ID is of configured length and is Active, respond with "ACTIVE"
Throws an error if an input parameter is empty
In case of exceptions, system triggers relevant error messages.
The system receives a request to check status of the License Key with an input parameter (License Key)
Checks the length of the License Key
Fetches the status of the License Key
Throw an error if an input parameter is empty
Responds to the source according to the conditions mentioned below:
If the length of License Key is not 8 digits, respond with message "INVALID"
If the License Key is expired as per the expiry period configured, respond with message "EXPIRED"
If the status of License Key is "SUSPENDED", respond with message "SUSPENDED"
If the status of License Key is "BLOCKED", respond with message "BLOCKED"
If the status of License Key is "ACTIVE", respond with message "ACTIVE"
License Key should be mapped to expiry (Expiry to be configured by admin).
In case of exceptions, system triggers relevant error messages.