Update Identity Mapping file in Configuration

As part of the migration process, we will be updating the latest version of the identity-mapping.json file (1.2.0.1) from the mosip-config. This update involves modifying the mapping values to align with the id schema of the respective country.

To guide you through the updating process, please refer to the following information:

In the provided sample identity-mapping.json, the focus will be solely on modifying the mapper values to match the id schema of the country.

{
   "identity":{
      "IDSchemaVersion":{
         "value":"IDSchemaVersion"
      },
      "name":{
         "value":"fullName"
      },
      "gender":{
         "value":"gender"
      },
      "dob":{
         "value":"dateOfBirth"
      },
      "age":{
         "value":"age"
      },
      "introducerRID":{
         "value":"introducerRID"
      },
      "introducerUIN":{
         "value":"introducerUIN"
      },
      "introducerVID":{
         "value":"introducerVID"
      },
      "introducerName":{
         "value":"introducerName"
      },
      "phone":{
         "value":"phone"
      },
      "phoneNumber":{
         "value":"phone"
      },
      "email":{
         "value":"email"
      },
      "emailId":{
         "value":"email"
      },
      "uin":{
         "value":"UIN"
      },
      "vid":{
         "value":"VID"
      },
      "individualBiometrics":{
         "value":"individualBiometrics"
      },
      "introducerBiometrics":{
         "value":"introducerBiometrics"
      },
      "individualAuthBiometrics":{
         "value":"individualAuthBiometrics"
      },
      "officerBiometricFileName":{
         "value":"officerBiometricFileName"
      },
      "supervisorBiometricFileName":{
         "value":"supervisorBiometricFileName"
      },
      "residenceStatus":{
         "value":"residenceStatus"
      },
      "preferredLanguage":{
         "value":"preferredLang"
      },
      "locationHierarchyForProfiling":{
         "value":"zone,postalCode"
      },
      "addressLine1":{
         "value":"addressLine1"
      },
      "addressLine2":{
         "value":"addressLine2"
      },
      "addressLine3":{
         "value":"addressLine3"
      },
      "location1":{
         "value":"city"
      },
      "location2":{
         "value":"region"
      },
      "location3":{
         "value":"province"
      },
      "postalCode":{
         "value":"postalCode"
      },
      "location4":{
         "value":"zone"
      },
      "fullAddress":{
         "value":"addressLine1,addressLine2,addressLine3,city,region,province,postalCode"
      },
      "bestTwoFingers":{
         "value":"bestTwoFingers"
      },
      "birthdate":{
         "value":"dateOfBirth"
      },
      "picture":{
         "value":"face"
      },
      "phone_number":{
         "value":"phone"
      },
      "address":{
         "value":"addressLine1,addressLine2,addressLine3,city,region,province,postalCode"
      },
      "individual_id":{
         "value":"individual_id"
      },
      "street_address":{
         "value":"addressLine1,addressLine2,addressLine3"
      },
      "locality":{
         "value":"city"
      },
      "region":{
         "value":"region"
      },
      "postal_code":{
         "value":"postalCode"
      },
      "country":{
         "value":"province"
      }
   },
   "metaInfo":{
      "value":"metaInfo"
   },
   "audits":{
      "value":"audits"
   },
   "documents":{
      "poa":{
         "value":"proofOfAddress"
      },
      "poi":{
         "value":"proofOfIdentity"
      },
      "por":{
         "value":"proofOfRelationship"
      },
      "pob":{
         "value":"proofOfDateOfBirth"
      },
      "poe":{
         "value":"proofOfException"
      }
   },
   "attributeUpdateCountLimit":{
      "fullName":2,
      "gender":1,
      "dob":1,
      "age":1
   }
}

According to the identity-mapping.json file mentioned above, we need to verify if a value is present in the country's ID schema. If the value exists, we can retain it as is. Otherwise, we should update the value in the identity-mapping.json file.

To illustrate, let's consider a few examples:

  • The fullName field is not included in the ID schema. Instead, it consists of firstName, middleName, and lastName. Therefore, we should replace the fullName with firstName, middleName, and lastName in the identity-mapping.json file.

  • Similarly, the introducerUIN field is not present in the schema, but instead, it has introducerCredentialID. Hence, we need to substitute introducerUIN with introducerCredentialID in the mapping.json file.

  • Additionally, since addressLine1 is not part of the schema, we should replace its value with presentAddressLine1, which is present.

  • Lastly, the phone field is not found in the schema, but mobileno is present. Thus, we need to replace phone with mobileno in the mapping.json file.

  • Our task is to compare each field value in the identity-mapping.json file with the ID schema and update it with the appropriate value based on the schema.

Sample Country’s ID schema

Last updated

Was this helpful?