Demographic data normalization is the process of applying rules for formatting of the demographic data (such as the address) into a common format before demographic data matching is verified during the demographic authentication in IDA. For example, for address lines, the '1st Street' can be replaced with '1 st' and 'C/o' can be removed from both the input and database data before the match is verified. These rules will be different for different languages, and may be configured/implemented differently.
The ID-Authentication Demographic data normalization mentioned here is specific to the Demo-SDK reference implementation of the Kernel Demographic API. It takes the below configuration to apply the name and address normalization rules.
For any other custom implementation of the normalization, the Demo-SDK needs to be implemented accordingly.
The below configuration is used to define the separator for normalizing regex (pattern) and the replacement word. The default is set to '='.
ida.norm.sep==
The format for configuring the name/address normalization rules for any language is given below:
ida.demo.<name/address/common>.normalization.regex.<languageCode/any>[<sequential index starting from 0>]=<reqular expression>${ida.norm.sep}<replacement string>
If replacement string is not specified, the regular expression will be replaced with empty string.
Note: It is recommended that the sequence is not broken in the middle otherwise all normalization properties will not be read for the particular type.
For non-english languages, the non-english words needs to be converted into UTF-16 and then copied to the configuration. For example, convert the Unicode characters to UTF-16.
Before conversion: ida.demo.address.normalization.regex.hin[0]=पहली${ida.norm.sep}पहला
After conversion: ida.demo.address.normalization.regex.hin[0]=\u092a\u0939\u0932\u0940${ida.norm.sep}\u092a\u0939\u0932\u093e
OTP Request Service is used by Authentication/e-KYC Partners to generate OTP for an individual's UIN/VID. The generated OTP is stored in IDA DB for validation during OTP Authentication.
The documentation here will guide you through the prerequisites required for the developer' setup.
Below are a list of tools required in ID Repository Services:
JDK 11
Any IDE (like Eclipse, IntelliJ IDEA)
Apache Maven (zip folder)
pgAdmin
Postman
Git
Notepad++ (optional)
lombok.jar (file)
settings.xml (document)
Follow the steps below to set up ID Repository Services on your local system:
1. Download lombok.jar
and settings.xml
from here.
2. Unzip Apache Maven and move the unzipped folder in C:\Program Files
and settings.xml
to "conf" folder C:\Program Files\apache-maven-3.8.4\conf
.
3. Install Eclipse, open the lombok.jar
file and wait for some time until it completes the scan for Eclipse IDE and then click Install/Update
.
4. Check the Eclipse installation folder C:\Users\userName\eclipse\jee-2021-12\eclipse
to see if the lombok.jar
is added. By doing this, you don't have to add the dependency of lombok
in your pom.xml
file separately as it is auto-configured by Eclipse.
5. Configure the JDK (Standard VM) with your Eclipse by traversing through Preferences → Java → Installed JREs
.
For the code setup, clone the repository and follow the guidelines mentioned in the Code Contributions.
Open the project folder where pom.xml
is present.
Open command prompt from the same folder.
Run the command mvn clean install -Dgpg.skip=true
to build the project and wait for the build to complete successfully.
After building of a project, open Eclipse and select Import Projects → Maven → Existing Maven Projects → Next → Browse to project directory → Finish
.
After successful importing of project, update the project by right-click on Project → Maven → Update Project
.
1. For the environment setup, you need an external JAR that is available here with different versions. (E.g.: You can download kernel-auth-adapter.jar
and add to project Libraries → Classpath → Add External JARs → Select Downloaded JAR → Add → Apply and Close
).
2. Clone mosip-config repository.
3. Create an empty folder inside the mosip-config
with sandbox-local
name and then copy and paste all config files inside sandbox-local
folder except .gitignore, README and LICENSE
.
4. As ID Authentication is using two properties files, id-authentication-default
and application-default
, you will have to configure them according to your environment. The same files are available here for reference.
Properties to be updated:
application-default.properties
mosip.mosip.resident.client.secret = <current_password>
.
db.dbuser.password=<password>
.
mosip.kernel.xsdstorage-uri=file:///home/user/Desktop/tspl/mosip-config/sandbox-local/
(i.e. sandbox-local
folder location).
Comment this out auth.server.admin.issuer.internal.uri
in application-default.properties
file because you already have this auth.server.admin.issuer.uri
, and hence there is no need of auth.server.admin.issuer.internal.uri
.
mosip.identity.mapping-file=<Path_to_identity_mapping_json_file>
. (For Example: file:///home/user/Desktop/tspl/mosip-config/sandbox-local/identity-mapping.json
)
id-authentication-default.properties
......
......
5. To run the server, two files are required- kernel-config-server.jar and config-server-start.bat.
6. Put both the files in the same folder and change the location attribute to sandbox-local
folder in config-server-start.bat
file and also check the version of kernel-config-server.jar
towards the end of the command.
Example:
java -jar -Dspring.profiles.active=native -Dspring.cloud.config.server.native.search-locations=file:C:\Users\myDell\mosipProject\mosip-config\sandbox-local -Dspring.cloud.config.server.accept-empty=true -Dspring.cloud.config.server.git.force-pull=false -Dspring.cloud.config.server.git.cloneOnStart=false -Dspring.cloud.config.server.git.refreshRate=0 kernel-config-server-1.2.0-20201016.134941-57.jar
.
7. Run the server by opening the config-server-start.bat
file.
The server should now be up and running.
Below are the configurations to be done in Eclipse:
1. Open Eclipse and run the project for one time as Java application
, so that it will create a Java application which you can see in debug configurations and then change its name. (e.g.: project name with environment - "Auth-Otp-Service-Dev").
2. Open the arguments and pass this -Ddomain.url=dev.mosip.net -Dapplication.base.url=http://localhost:8090 -Dspring.profiles.active=default -Dspring.cloud.config.uri=http://localhost:51000/config -Dspring.cloud.config.label=master
in VM arguments.
3. Here, the domain URL represents the environment on which you are working (eg., it can be dev2.mosip.net
or qa3.mosip.net
).
4. Click Apply and then debug it (starts running).
For API documentation, refer here.
The services mentioned below are used by Authentication/e-KYC Partners.
Authentication service- used to authenticate an individual's UIN/VID using one ore more authentication types.
KYC Authentication service- used to request e-KYC for an individul's UIN/VID using one ore more authentication types.
The documentation here will guide you through the prerequisites required for the developer' setup.
Below are a list of tools required in ID Repository Services:
JDK 11
Any IDE (like Eclipse, IntelliJ IDEA)
Apache Maven (zip folder)
pgAdmin
Postman
Git
Notepad++ (optional)
lombok.jar (file)
settings.xml (document)
Follow the steps below to set up ID Repository Services on your local system:
2. Unzip Apache Maven and move the unzipped folder in C:\Program Files
and settings.xml
to "conf" folder C:\Program Files\apache-maven-3.8.4\conf
.
3. Install Eclipse, open the lombok.jar
file and wait for some time until it completes the scan for Eclipse IDE and then click Install/Update
.
4. Check the Eclipse installation folder C:\Users\userName\eclipse\jee-2021-12\eclipse
to see if the lombok.jar
is added. By doing this, you don't have to add the dependency of lombok
in your pom.xml
file separately as it is auto-configured by Eclipse.
5. Configure the JDK (Standard VM) with your Eclipse by traversing through Preferences → Java → Installed JREs
.
Open the project folder where pom.xml
is present.
Open command prompt from the same folder.
Run the command mvn clean install -Dgpg.skip=true
to build the project and wait for the build to complete successfully.
After building of a project, open Eclipse and select Import Projects → Maven → Existing Maven Projects → Next → Browse to project directory → Finish
.
After successful importing of project, update the project by right-click on Project → Maven → Update Project
.
3. Create an empty folder inside the mosip-config
with sandbox-local
name and then copy and paste all config files inside sandbox-local
folder except .gitignore, README and LICENSE
.
Properties to be updated:
application-default.properties
mosip.mosip.resident.client.secret = <current_password>
.
db.dbuser.password=<password>
.
mosip.kernel.xsdstorage-uri=file:///home/user/Desktop/tspl/mosip-config/sandbox-local/
(i.e. sandbox-local
folder location).
Comment this out auth.server.admin.issuer.internal.uri
in application-default.properties
file because you already have this auth.server.admin.issuer.uri
, and hence there is no need of auth.server.admin.issuer.internal.uri
.
mosip.identity.mapping-file=<Path_to_identity_mapping_json_file>
. (For Example: file:///home/user/Desktop/tspl/mosip-config/sandbox-local/identity-mapping.json
)
id-authentication-default.properties
......
......
6. Put both the files in the same folder and change the location attribute to sandbox-local
folder in config-server-start.bat
file and also check the version of kernel-config-server.jar
towards the end of the command.
Example:
java -jar -Dspring.profiles.active=native -Dspring.cloud.config.server.native.search-locations=file:C:\Users\myDell\mosipProject\mosip-config\sandbox-local -Dspring.cloud.config.server.accept-empty=true -Dspring.cloud.config.server.git.force-pull=false -Dspring.cloud.config.server.git.cloneOnStart=false -Dspring.cloud.config.server.git.refreshRate=0 kernel-config-server-1.2.0-20201016.134941-57.jar
.
7. Run the server by opening the config-server-start.bat
file.
The server should now be up and running.
Below are the configurations to be done in Eclipse:
1. Open Eclipse and run the project for one time as Java application
, so that it will create a Java application which you can see in debug configurations and then change its name. (e.g.: project name with environment - "Auth-Service-Dev").
2. Open the arguments and pass this -Ddomain.url=dev.mosip.net -Dapplication.base.url=http://localhost:8090 -Dspring.profiles.active=default -Dspring.cloud.config.uri=http://localhost:51000/config -Dspring.cloud.config.label=master
in VM arguments.
3. Here, the domain URL represents the environment on which you are working (eg., it can be dev2.mosip.net
or qa3.mosip.net
).
4. Click Apply and then debug it (starts running).
ID Authentication is built as an independent service that can be seeded with data for authentication by any system, including MOSIP. In the current design, we can have multiple IDA modules running from a single issuer.
The ID Authentication (IDA) module of MOSIP consists of the following services:
Authentication Services
OTP Service
Internal Services
To learn more about it, refer to the below video:
The services mentioned below are used by Authentication or e-KYC Partners.
Authentication Service: used to authenticate an individual's UIN/VID using one or more authentication types.
KYC Authentication Service: used to request e-KYC for an individual's UIN/VID using one or more authentication types.
OTP Request Service is used by Authentication/e-KYC Partners to generate OTP for an individual's UIN/VID. The generated OTP is stored in IDA DB for validation during OTP Authentication.
Internal Authentication Service - The authentication service used by internal MOSIP modules such as Resident Service, Registration Processor and Registration Client to authenticate individuals.
Internal OTP Service - used by Resident Service to generate OTP for an Individual for performing OTP Authentication.
Authentication Transaction History Service - used by Resident Service to retrieve a paginated list of authentication and OTP Request transactions for an individual.
IDA IDENTITY_CACHE
(K18) symmetric key to encrypt and decrypt the Zero-knowledge 10K random keys
IDA ROOT
master key(K15)), IDA module
master key(K16), IDA-SIGN
master key
Base keys CRED_SERVICE
(K22), IDA-FIR
(K21), INTERNAL
(K19), PARTNER
(K20)
Below is the sample authentication demo UI image.
The ID Authentication service now offers an Authentication Error Eventing feature. When an authentication related error occurs, a message will prompt to the user to retry after a few minutes. In the meantime, Kafka event will be triggered to publish the data to the designated topic, allowing subscribers to receive a message for further processing.
This feature can be utilized for different use cases such as on demand template extraction, report generations, to identify any fraudulent occurrence etc.
One such use case is on demand template extraction. In an instance where a user has successfully registered and obtained a valid UIN/VID but encounters an error during authentication due to unavailability of the entered UIN/VID in the IDA DB, this feature comes into play. This issue tends to occur particularly during periods of high registration and UIN generation volumes, where additional time is needed for data transmission from the ID Repo to the IDA DB. This authentication error eventing feature will help in capturing the errors related to this issue and event will be created. subscribers can capture this event and process them accordingly to enable the template extraction to proceed with the authentication/verification process.
This feature is designed to be a plugin feature in IDA, which can be configured based on the requirement. To enable the feature below property should be marked as True
:
mosip.ida.authentication.error.eventing.enabled=true
Once this property is enabled, related kafka property setup should be installed to utilize the feature.
Subscribers who will be subscribing to the event should be onboarded as authentication partners. To on board subscribers below steps needed to be followed:
Steps to onboard the subscribers:
Create a policygroup by the name mpolicygroup-default-tempextraction
The policy should be configured to not allow any authentication to be carryout but the partner except reading the kafka event. To attain this, allowedAuthTypes
should be marked as null
For example:
{"authTokenType":"partner","allowedKycAttributes":[{"attributeName":"fullName"},{"attributeName":"gender"}, {"attributeName":"residenceStatus"},{"attributeName":"dateOfBirth"},{"attributeName":"photo"}],"kycLanguages":["ara","eng"],"allowedAuthTypes":[]}
Publish the policygroup and policy
To know more about the developer setups, read:
1. Download lombok.jar
and settings.xml
from .
For the code setup, clone the repository and follow the guidelines mentioned in the .
1. For the environment setup, you need an external JAR that is available with different versions. (E.g.: You can download kernel-auth-adapter.jar
and add to project Libraries → Classpath → Add External JARs → Select Downloaded JAR → Add → Apply and Close
).
2. Clone .
4. As ID Authentication is using two properties files, id-authentication-default
and application-default
, you will have to configure them according to your environment. The same files are available for reference.
5. To run the server, two files are required- and .
For API documentation, refer .
uses the credential data of the individuals for performing authentication.
This credential is requested by upon any UIN insertion/update or VID creation.
The credential is created by Credential Service uploaded to service and the Datashare URL is sent to ID-Authentication using message.
WebSub invokes the credential-issuance callback in where the credential data is downloaded from Datashare and then stored in IDA DB.
ID Authentication needs the below to be generated during the deployment for usage in Authentication Service.
This is a reference application to demonstrate how authentication and KYC can be performed by .
Refer to the for more details.
For further guidance on this feature, you can refer
Refer this to onboard the subscribers as authentication partners. The name of the partner should be mpartner-default-tempextraction
Note: This feature is exclusively available in ID Authentication version 1.2.1.0 only. To configure the latest version of IDA and access this new feature, please refer to this link
Refer to .
Refer .
.
Internal Authentication Service: The authentication service used by internal MOSIP modules such as Resident Service, Registration Processor, and Registration Client to authenticate individuals.
Internal OTP Service: used by Resident Service to generate an OTP for an Individual for performing OTP Authentication.
Authentication Transaction History Service: used by Resident Service to retrieve a paginated list of authentication and OTP Request transactions for an individual.
The documentation here will guide you through the prerequisites required for the developer's setup.
Below is a list of tools required in ID Repository Services:
JDK 11
Any IDE (like Eclipse or IntelliJ IDEA)
Apache Maven (zip folder)
pgAdmin
Postman
Git
Notepad++ (optional)
lombok.jar (file)
settings.xml (document)
Follow the steps below to set up ID Repository Services on your local system:
1. Download lombok.jar
and settings.xml
from here.
2. Unzip Apache Maven and move the unzipped folder in C:\Program Files
and settings.xml
to "conf" folder C:\Program Files\apache-maven-3.8.4\conf
.
3. Install Eclipse, open the lombok.jar
file, wait for some time until it completes the scan for the Eclipse IDE, and then click Install/Update
.
4. Check the Eclipse installation folder C:\Users\userName\eclipse\jee-2021-12\eclipse
to see if the lombok.jar
is added. By doing this, you don't have to add the dependency of lombok
in your pom.xml
file separately, as it is auto-configured by Eclipse.
5. Configure the JDK (Standard VM) with your Eclipse by traversing through Preferences → Java → Installed JREs
.
For the code setup, clone the repository and follow the guidelines mentioned in the Code Contributions.
Open the project folder where pom.xml
is present.
Open the command prompt from the same folder.
Run the command mvn clean install -Dgpg.skip=true
to build the project and wait for the build to complete successfully.
After building a project, open Eclipse and select Import Projects → Maven → Existing Maven Projects → Next → Browse to project directory → Finish
.
After successfully importing of project, update the project by right-clicking on Project → Maven → Update Project
.
1. For the environment setup, you need an external JAR that is available here with different versions. (E.g.: You can download kernel-auth-adapter.jar
and add to the project Libraries → Classpath → Add External JARs → Select Downloaded JAR → Add → Apply and Close
).
2. Clone mosip-config repository.
3. Create an empty folder inside the mosip-config
with sandbox-local
name and then copy and paste all config files inside sandbox-local
folder except .gitignore, README and LICENSE
.
4. As ID Authentication is using two property files, id-authentication-default
and application-default
, you will have to configure them according to your environment. The same files are available here for reference.
Properties to be updated:
application-default.properties
mosip.mosip.resident.client.secret = <current_password>
.
db.dbuser.password=<password>
.
mosip.kernel.xsdstorage-uri=file:///home/user/Desktop/tspl/mosip-config/sandbox-local/
(i.e. sandbox-local
folder location).
Comment this out auth.server.admin.issuer.internal.uri
in application-default.properties
file because you already have this auth.server.admin.issuer.uri
, and hence there is no need for auth.server.admin.issuer.internal.uri
.
mosip.identity.mapping-file=<Path_to_identity_mapping_json_file>
. (For Example: file:///home/user/Desktop/tspl/mosip-config/sandbox-local/identity-mapping.json
)
id-authentication-default.properties
......
......
5. To run the server, two files are required- kernel-config-server.jar and config-server-start.bat.
6. Put both the files in the same folder and change the location attribute to sandbox-local
folder in config-server-start.bat
file and also check the version of kernel-config-server.jar
towards the end of the command.
Example:
java -jar -Dspring.profiles.active=native -Dspring.cloud.config.server.native.search-locations=file:C:\Users\myDell\mosipProject\mosip-config\sandbox-local -Dspring.cloud.config.server.accept-empty=true -Dspring.cloud.config.server.git.force-pull=false -Dspring.cloud.config.server.git.cloneOnStart=false -Dspring.cloud.config.server.git.refreshRate=0 kernel-config-server-1.2.0-20201016.134941-57.jar
.
7. Run the server by opening the config-server-start.bat
file.
The server should now be up and running.
Below are the configurations to be done in Eclipse:
1. Open Eclipse and run the project for one time as Java application
, so that it will create a Java application which you can see in debug configurations and then change its name. (e.g.: project name with the environment - "Auth-Internal-Service-Dev").
2. Open the arguments and pass this -Ddomain.url=dev.mosip.net -Dapplication.base.url=http://localhost:8090 -Dspring.profiles.active=default -Dspring.cloud.config.uri=http://localhost:51000/config -Dspring.cloud.config.label=master
in VM arguments.
3. Here, the domain URL represents the environment on which you are working (eg., it can be dev2.mosip.net
or qa3.mosip.net
).
4. Click Apply and then debug it (starts running).
For API documentation, refer here.