Auth demo UI - Setup

 

ID-Auth demo application setup guide

 Part -1 To configure and build the partner management tool

 

Step 1

  Download the zip file of the Partner-management tool using the link given below
note: download the appropriate branch needed(Here used is 1.2.0).

https://github.com/mosip/gist/tree/1.2.0

 Step 2:        

              Unzip and through the path → gist-1.2.0\partnermanagement\src\main\resources

open the  application.properties and do the below mentioned changes.

 

  1. Change the url of the relevant environment being used.

                                            

2. Update the key of the mosip-pms-client at the place of   mosip.authenticate.client.secretkey.

refer below.

3.         Update the key of the mosip-reproc-client at the place of  token.request.secretKey.

reference below.

     

  4. Create one user in keycloak or for the existing user -assign PARTNER_ADMIN, PMS_ADMIN And  POLICYMANAGER roles in keycloak.
and as per the picture change the username and password as per the user u have.

Save the property file.

5. Now Build the tool using the command given below and refer the picture for the build path.

mvn clean install -Dgpg.skip=true -Dmaven.test.skip=true 

 

6. After the successful build, A target folder is been generated.

Now run the jar using the command given below and refer the picture for the path.

java -jar partnermanagement-0.0.1-SNAPSHOT.jar

7. By running the jar, the below swagger url will be accessible to create the partner.

http://localhost:9091/v1/partnermanager/swagger-ui.html

Note: Keep the jar file running so that the swagger link be accessible.

 

Part-2 To Create Authentication and misp partner user in keycloak

 

Step 1: 

             Login to the keycloak --> users --> add users-->fill in the details and save.

Create two users one is for auth partner and other is for misp partner.

               Username example – 1. For auth partner - mpartner-auth-003 and

                                                         2. For misp partner - mpartner-misp-003.

 Step 2:

Set the password in the credentials option.
Note : Copy the password from the application.properties of the Partner management  tool

and use here.

Step 3:

For the created user assign the roles in the role mapping option as below.

  •    For the auth partner user, map the role – AUTH_PARTNER from the available roles.

  • For the misp partner user, map the role – MISP_PARTNER from the available roles.

 

 

Part-3 To create policy group and auth policy

Step 1:

              Create another user or use existing user and map the following roles :-

PARTNER_ADMIN, PMS_ADMIN And  POLICYMANAGER , with this user Login to the

partner management Portal.

step 2:

                Create policy group by clicking --> policy--> policy group--> create policy group.

Enter the policy group name , description and save.

            Reference picture below.

 

Step 3:                      

       To create auth policy--> click auth policy -->create auth policy-->

Enter the name and description--> select the policy group which is been created lately.

        Add the policies data, given below --> save and Activate. Refer the picture below.

{"authTokenType":"partner","allowedKycAttributes":[{"attributeName":"fullName"},{"attributeName":"gender"},{"attributeName":"bloodType"},{"attributeName":"dateOfBirth"},{"attributeName":"addressLine1"},{"attributeName":"addressLine2"},{"attributeName":"residenceStatus"},{"attributeName":"referenceIdentityNumber"},{"attributeName":"state"},{"attributeName":"city"},{"attributeName":"locality"},{"attributeName":"postalCode"},{"attributeName":"phone"},{"attributeName":"email"},{"attributeName":"photo"}],"kycLanguages":["eng"],"allowedAuthTypes":[{"authSubType":"FINGER","authType":"bio","mandatory":false},{"authSubType":"IRIS","authType":"bio","mandatory":false},{"authSubType":"FACE","authType":"bio","mandatory":false},{"authSubType":"","authType":"otp","mandatory":false},{"authSubType":"","authType":"otp-request","mandatory":false},{"authSubType":"","authType":"kyc","mandatory":false},{"authSubType":"","authType":"demo","mandatory":false}]}

Part-4 To Register AUTH and MISP partner

Step 1:

              To Register auth partner, Use the swagger (refer part 1-- > step 7)-->

configure partner/create partner → try it out--> copy and paste the below given body

and execute.

Note:  Edit the partner id, organization name, policy group and policy name as same as

You’ve created. Refer below.

{

"environmentVersion": "LTS",

"partnerModel": {

"partnerAddress": "Aurangabad",

"partnerContactNumber": "9999999999",

"partnerEmailId": "ganesh.taru1@infystrat.com",

"partnerId": "mpartner-auth-0003",

"partnerOrganizationName": "mpartner-auth-0003",

"partnerType": "AUTH",

"policyGroup": "mpolicy-auth-0003"},

“policyName": "mpolicy-auth-0003"

}

NOTE:- Remove the extra spaces in the request, before executing.

Step 2 :

               From the response, copy the partnerApiKey value for the upcoming use.

 Step 3 :

               To Register misp partner, Use the same swagger --> configure partner/create partner -->

try it out-->copy and paste the below given body and execute.

Note:  Edit the partner id, partner organization name, as same as you’ve created. Ref below.

{

"environmentVersion": "LTS",

"partnerModel": {

"partnerAddress": "Aurangabad",

"partnerContactNumber": "9999999999",

"partnerEmailId": "ganesh.taru2@infystrat.com",

"partnerId": "mpartner-misp-0003",

"partnerOrganizationName": "mpartner-misp-0003",

"partnerType": "MISP" ,

"policyGroup": "mpolicy-auth-21" }

Step 4 :

               From the response copy the partnerMispLicenseKey value for the upcoming use.

Step 5 : 

             After the partner creation,  .p12 file will be generated inside the temp folder. Find the temp folder

in the below mentioned path.

             C:\Users\hp\AppData\Local\Temp\IDA-localhost\mpartner-auth-0003 (Or Use windows + R and search %temp%)

                    

         Copy the certificates created and rename them as same as your partner id.

Step 6 : 

             Download the Id- Authentication demo application UI from the below given link.

Note: the download from the relevant branch needed.

https://github.com/mosip/authentication-demo-ui/tree/release-1.2.0/authentication-demo-

Step 7 : 

             Now place the renamed certificates into the keys folder of the Authentication-demo-UI. Refer below.

 Step 8 :

               In the application.properties of the Authentication-demo-UI edit the following fields and

save the file.

  •    Paste the partnerApiKey and partnerMispLicenseKey  which was generated  while creating partner.

  •        Add the mosip-regproc-client secret key.

  •     Change the partner id and organization name.

  •    Edit the environment url.

Reference picture below.

Step 9 :

                 Run the ID-Authentication-Demo-UI.bat .

 

 

             -----------END OF THE DOCUMENT------------