Steps to test MOSIP authentication

As part of this document, we would be providing the steps to run the authentication demo application and configuration of the API.

Prerequisites:

  • Postman with postman collection having APIs for authentication:

 

Steps

1. Run the Partner Demo Services

2. Install Postman and import the collection attached in the prerequisites.

3. Run the Mock Mds

4. Download the authentication demo UI from MOSIP’s GitHub and run it.

1. Running the Partner Demo Service

a. Download the Authentication Demo Service from the GitHub mentioned in the Prerequisites

b. extract and build it by using the command: maven clean install

c. Change the URL in the application.properties . This properties file can be copied from the resources folder of the authentication-demo-service source code:

d. Run the below command in the command prompt to start the Authentication Demo Service

NOTE: change the Denv.user and Denv.endpoint with the respective domain

Example: java -Denv.user=minibox2 -Denv.endpoint=https://minibox2.mosip.net -Denv.testLevel=smoke -Dspring.profiles.active=qa -jar authentication-demo-service-1.2.0-SNAPSHOT.jar

e. Authentication demo service is started

2. Install the postman and import the collection attached in the prerequisites

a. Run the collection and it will create the IDA-DomainName folder inside the temp

Example:

3. Download the authentication demo UI from MOSIP’s GitHub and run it

a. Extract and build it by using the command: maven clean install

b. After the build is successful, the keys folder will be generated.

c. Paste  the below two certificates inside the keys folder as below:

Example: E:\MOSIP_CODEBASE\mosip-ref-impl\authentication-demo-ui\keys

Note:
1. Take rp-partner.p12 from temp---->replace this 647-partner.p12

2. Take partner certificate and unescaped \n and save as 647-partner.cer

3. Paste these certificates inside keys folder.

Take the partner certificate from below Swagger :

c.1.  Upload the partner certificate by using the Swagger link {{url}}/v1/partnermanager/partners/certificate/upload

c.2. Take the signed certificate from the response,

Example:

signedCertificateData": "-----BEGIN CERTIFICATE-----\nMIIDgzCCAmugAwIBAgIIqJQc1UUfL0UwDQYJKoZIhvcNAQELBQAwdjELMAkGA1UE\nBhMCSU4xCzAJBgNVBAgMAktBMRIwEAYDVQQHDAlCQU5HQUxPUkUxDTALBgNVBAoM\nBElJVEIxIDAeBgNVBAsMF01PU0lQLVRFQ0gtQ0VOVEVSIChQTVMpMRUwEwYDVQQD\nDAx3d3cubW9zaXAuaW8wHhcNMjEwODEwMTIxMTQ3WhcNMjIwODEwMTIxMTQ3WjBZ\nMQswCQYDVQQGEwJJTjELMAkGA1UECAwCS0ExDDAKBgNVBAoMAzY0NzEaMBgGA1UE\nCwwRSURBLVRFU1QtT1JHLVVOSVQxEzARBgNVBAMMClBBUlRORVItcnAwggEiMA0G\nCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCC3WI51xOnLI6Ex4EVPXiCawVvpbiw\nF7eC4qGR/6xPQLcspRrzY4I1WHh0TOAwGcSVwD1qCkQ9s2TjnTL/fsXkdAEvZWpy\nFzIJP7KKOiGlWLx+QW1P5I3sr18xHpjeo1MS7COiEsiOsIT7732HwmaiKp+PmN/o\nDUvMuXoG/Uhr0S4Dy8ICHxyzY4xRZ6kxg+kaosoDC01I3CKYGvgYaU9i5pT+6kY/\nFbxnSlHcfhAjTLCb0MIcIX3wBfmHE+bmc7dYCgeO7fICPx8boMiy6JBZBQat+oWf\nqphMpatFV8hAYs1zlTrEEQuTpSsGqoBynIVk4eh/pqeH8LcWJFQjvWnzAgMBAAGj\nMjAwMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFEovF3/Vk3XAN9vBGBmGGu6F\n3JfCMA0GCSqGSIb3DQEBCwUAA4IBAQAkE/dFXD/RLSGAHTF1B8DhC2yRSUFArH8h\nXIB/kqexcTXz+s25CNkuqoU3cd/cBQVK7k5mBX7qYdRnrPnpGW5gIeFZ0zdtDYg1\njHDG126JKr+Xf3is1i8n7EnjfuRkHErxj3mm59N3qC5smnMxt+1nhHv2JGOv2pes\nb6KwtDgO0OkEViyXu/9JwgYa8GMyOJkwjzsHBE6/Qa20d92ZYxVxVgRItoe+rNW5\nGlU5xJSii1MR25uQMhpGfOdEtrCvihV7Nr8B9Otv227tIpQZuCopNBMoZiZcHkNa\n0CMu6bmTcS75X0b8Ta6XXFZL2C8pG6mZLGUpGEUOeUL6oyWDPFn9\n-----END CERTIFICATE-----\n",

Take the above certificate and remove \n from the above certificate by

Save it as with partner id-partner.cer (example: 647-partner.cer) and paste it inside the key folder.

c.3. Take the rp-partner.p12 file from the temp folder (ex: rp-partner.p12) and rename it to 647-partner.p12

d. ID-Authentication-Demo-UI.bat

Modify the bat file according to the environment. place the Partner ID, API key, and license key.

Ex: java -Dida.request.captureFinger.deviceId=2 -Dida.request.captureIris.deviceId=1 -Dida.request.captureFace.deviceId=3 -Dmosip.base.url=https://minibox2.mosip.net -DmispLicenseKey=0HNCpivCqbW7ULCIwChsgogYc7f3K5zEjQHUb8DwUiFXR8VODb -DpartnerId=647 -DpartnerOrg=minibox2 -DpartnerApiKey=789502 -Dfinger.device.subid=1  -jar "./target/authentication-demo-ui-1.2.0-SNAPSHOT.jar"    

And run the mock MDS.

e. Run the bat file

Authentication Response Screenshots

a. OTP AUTH Request

a.1. OTP request

a.2. Enter the Proxy OTs as 11111

a.3. OTP Authentication:

b. Biometric Authentication

b.1. Face: Run the mock MDS and capture the face

b.2. Face Auth Success

b3. Fingerprint Auth

b4. Iris Capture

b5. Iris Auth Success

f) Mock MDS Link :

  NOTE: Run Mock MDS and perform the same operation for the biometrics.

Authentication Using API :

a)Run the Partner Demo Services

b) Run the collection for Performing AUTH for Demo

i)Regproc authentication:

 

ii)get the record from ID Repo for UIN

iii)create Auth request

 

 

iv)ID Auth Request

 

ii)OTP

 

 

 

 

 

 

 

iii)Bio Auth using API