eSignet component system

Hi Team,

I cloned eSignet backend service source code from the github as per the documentation and mockIdentitySystemApplication source code as well. Tried to run that application in local but facing the bean creation issue.

Thanks in advance

Dear @narayana_prakash,

Thank you for reaching out, Letā€™s look into your query and ask one of our experts to respond to it here.

Best Regards
Team MOSIP

Dear @keshavs

Thanks for your response. Please share the documentation to set up the esignet in local.

Hi @keshavs

Here is the steps u need to follow to setup esignet into your local
========Esignet-setup=============
The project requires JDK 11.

First You need to build the Esignet with this commant. Make sure you have both jkd-11 and maven set up in enviroment path

1-> mvn clean install -Dgpg.skip=true

after the build get succes you have to configure the postgress database from application-local-properties file

spring.datasource.url=jdbc:postgresql://localhost:5432/mosip_esignet
spring.datasource.username=postgres
spring.datasource.password=postgres

Configure this properties base on your postgres credentials i.e portNo, username and password

==========DataBase SetUp==========================

  1. Create database ā€˜mosip_esignetā€™.

  2. Run all the scripts provided under db_scripts/mosip_esignet/ddl folder.

  3. Run the below insert statements in mosip_esignet database:

    INSERT INTO KEY_POLICY_DEF(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES (ā€˜ROOTā€™, 1095, 50, ā€˜NAā€™, true, ā€˜mosipadminā€™, now());

    INSERT INTO KEY_POLICY_DEF(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES (ā€˜OIDC_SERVICEā€™, 1095, 50, ā€˜NAā€™, true, ā€˜mosipadminā€™, now());

    INSERT INTO KEY_POLICY_DEF(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES (ā€˜OIDC_PARTNERā€™, 1095, 50, ā€˜NAā€™, true, ā€˜mosipadminā€™, now());

    INSERT INTO KEY_POLICY_DEF(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES (ā€˜BINDING_SERVICEā€™, 1095, 50, ā€˜NAā€™, true, ā€˜mosipadminā€™, now());

    INSERT INTO KEY_POLICY_DEF(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES (ā€˜MOCK_BINDING_SERVICEā€™, 1095, 50, ā€˜NAā€™, true, ā€˜mosipadminā€™, now());

    INSERT CLIENT_DETAIL
    (id, ā€œnameā€, rp_id, logo_uri, redirect_uris, claims, acr_values, public_key, grant_types, auth_methods, status, cr_dtimes, upd_dtimes)
    VALUES(ā€˜healthservicesā€™, ā€˜{ā€œtamā€:ā€œą®šąÆą®•ą®¾ą®¤ą®¾ą®° ą®šąÆ‡ą®µąÆˆā€,ā€œaraā€:ā€œŁ„Ł„Ų®ŲÆŁ…Ų§ŲŖ Ų§Ł„ŲµŲ­ŁŠŲ©ā€,ā€œ@noneā€:ā€œHealth Default Serviceā€,ā€œkanā€:ā€œą²†ą²°ą³‹ą²—ą³ą²Æ ą²øą³‡ą²µą³†ā€,ā€œhinā€:ā€œą¤øą„ą¤µą¤¾ą¤øą„ą¤„ą„ą¤Æ ą¤øą„‡ą¤µą¤¾ā€,ā€œengā€:ā€œHealth Serviceā€}ā€™, ā€˜mpartner-default-idp-relyparty-newā€™, ā€˜https://healthservices.dev3.mosip.net/images/doctor_logo.pngā€™, ā€˜[ā€œhttp://localhost:5000/userprofileā€,ā€œhttp://localhost:5000/registrationā€,ā€œhttps://healthservices.dev.mosip.net/userprofileā€]ā€™, ā€˜[ā€œnameā€,ā€œemailā€,ā€œgenderā€,ā€œphone_numberā€,ā€œbirthdateā€,ā€œpictureā€]ā€™, ā€˜[ā€œmosip:idp:acr:static-codeā€,ā€œmosip:idp:acr:generated-codeā€,ā€œmosip:idp:acr:biometricsā€,ā€œmosip:idp:acr:passwordā€,ā€œmosip:idp:acr:linked-walletā€]ā€™, ā€˜{ā€œktyā€:ā€œRSAā€,ā€œkidā€:ā€œ1bbdc9de-c24f-4801-b6b3-691ac07641afā€,ā€œuseā€:ā€œsigā€,ā€œalgā€:ā€œRS256ā€,ā€œnā€:ā€œwXGQA574CU-WTWPILd4S3_1sJf0Yof0kwMeNctXc1thQo70Ljfn9f4igpRe7f8qNs_W6dLuLWemFhGJBQBQ7vvickECKNJfo_EzSD_yyPCg7k_AGbTWTkuoObHrpilwJGyKVSkOIujH_FqHIVkwkVXjWc25Lsb8Gq4nAHNQEqqgaYPLEi5evCR6S0FzcXTPuRh9zH-cM0Onjv4orrfYpEr61HcRp5MXL55b7yBoIYlXD8NfalcgdrWzp4VZHvQ8yT9G5eaf27XUn6ZBeBf7VnELcKFTyw1pK2wqoOxRBc8Y1wO6rEy8PlCU6wD-mbIzcjG1wUfnbgvJOM4A5G41quQā€,ā€œeā€:ā€œAQABā€}ā€™, ā€˜[ā€œauthorization_codeā€]ā€™, ā€˜[ā€œprivate_key_jwtā€]ā€™, ā€˜ACTIVEā€™, ā€˜2023-05-19 11:07:12.951ā€™, ā€˜2023-07-13 06:40:34.569ā€™);

Please follow this step and let me know if found any issue

@kaifk468 Thanks for your response.

eSignet backend service which is running in locally with mock identity. While creating the identity using mock identity api in postman ,Facing the below error .Please assist me on that

Api ā†’ http://localhost:8082/v1/mock-identity-system/identity

Pre request script ā†’ eval(pm.globals.get(ā€˜pmlib_codeā€™))

// Set headers for JWT
var header = {
ā€œalgā€: ā€œRS256ā€
};

//sign token
const private_key_jwk = {
ā€œpā€: ā€œ0-40ISxXDmC8SVrudg1e7vQskyWlohadm83RAkUyH6S4h1aTPrNwLVn9WANnyRTqupD1Fr8mYZ7f9nZ2MkMj45UV8uiIjQZr3crMq0YGkzt_LvwhLduWOJ_z9_9zZNHckXei4G8QQFJQYb3TNdGsVVSwff68SSoen8oqvkbkAJsā€,
ā€œktyā€: ā€œRSAā€,
ā€œqā€: ā€œ6as88odcbP2MDT9lkahK2z4QIH25zsa_UdLgAtLwDVpekXfJNOQvuqNY1Gw3Jws6uPDLGcEK42MyeOdCFqklFTvDJlJXMFvgWrmGbCUMvJL-rFyO-kCTGnFBX60ozdJbjfBt3E3QYx3G907Ziuu9o0azey1DJtq_zKwearE-xTsā€,
ā€œdā€: ā€œBgdeiCZbr5qZ4haShg9uQinZRYPSUTYc_58YgvQ0WkPKm5fINOgOJPvimdKYBt8OtIWbhojTyn0TKrGPPAqFZCnGY16HkCUN31MbluD2wxYz6SPpZ1zsmP8PbQUVozjEFeLpiTN6nubw_skS_9GGrl1CPb25wTPlZtI3uQ5IiPL_YD5j_w5_J7tejAaRbhlJj48ZDa4CR8BkaUi2QaQmLoyiO_1O-U-Nf17-t1C6zFFKKHQx2lNltE1xFQoHB4WuBA2GnP5LgNFJSLv0p95gQK37nP0TTcuiZVlvFcmbGI_ilWlxRKJUD3mZR6nz25X4SapUWswnrnm7JtUA_UGVGwā€,
ā€œeā€: ā€œAQABā€,
ā€œuseā€: ā€œsigā€,
ā€œkidā€: ā€œ1bbdc9de-c24f-4801-b6b3-691ac07641afā€,
ā€œqiā€: ā€œpmL_G7T4OF_pr2RCzkkupi1dCbwRX39bMEIs3uirvkoPR5CENvuvsXQ0Oias3taxzLa4nG5JVXHkyOIX8UsK1NFrzZPRKbfNX3h5EAnl3I7cZMtoYJLnawUqaNTukOmDChPlKx1fVjUwsyNn5HSAnmBiaOmm_RHo36tPhgaPUtEā€,
ā€œdpā€: ā€œe3b2X60ZOoMYrhOPgK7hc4xEu6TfDcLnJvGMpinxvYWVCyNgvNKEs6cNdMznFbpd1TrFze6mSZDpIQh6a2W57sfX9Z-Kjb4D8T5IZi9xfSzYN2MjYTfgGDT3SK9FZqLsQMLV3LJXYWGS-p5AAcaZA01HVN-miWlEVgrNQ_TAt6kā€,
ā€œdqā€: ā€œYg-BqUoTCI4y6xBS4JieqXlXLTt18YfInF8BsU2yffgRvbxmTPMB8LJCQgsT7iexQhGTOkCgACMN-F0ciAP90vZchEWD34B_G7PF7LZzrOOHSvAg9HaLBUrII424lP-VenCOuihRrna9m-WUN8-MquutwKCTEMg2O39z2FR_wicā€,
ā€œnā€: ā€œwXGQA574CU-WTWPILd4S3_1sJf0Yof0kwMeNctXc1thQo70Ljfn9f4igpRe7f8qNs_W6dLuLWemFhGJBQBQ7vvickECKNJfo_EzSD_yyPCg7k_AGbTWTkuoObHrpilwJGyKVSkOIujH_FqHIVkwkVXjWc25Lsb8Gq4nAHNQEqqgaYPLEi5evCR6S0FzcXTPuRh9zH-cM0Onjv4orrfYpEr61HcRp5MXL55b7yBoIYlXD8NfalcgdrWzp4VZHvQ8yT9G5eaf27XUn6ZBeBf7VnELcKFTyw1pK2wqoOxRBc8Y1wO6rEy8PlCU6wD-mbIzcjG1wUfnbgvJOM4A5G41quQā€
}

const signed_jwt = pmlib.clientAssertPrivateKey(private_key_jwk, pm.environment.get(ā€˜clientIdā€™), pm.environment.get(ā€˜audā€™), exp = 60, ā€œRS256ā€);

pm.collectionVariables.set(ā€œclient_assertionā€,signed_jwt);

Error : There was an error in evaluating the Pre-request Script:ReferenceError: pmlib is not defined

There were some parsing library missing in your postman
Downloard this collection : postman-util-lib/postman/PostmanUtilityLibv2.postman_collection.json at master Ā· joolfe/postman-util-lib Ā· GitHub

and execute both the request api i.e lib install and lib use example

1 Like

Thanks @kaifk468. Now itā€™s working.

1 Like

Feel free to let us know if you find any issue further
Thanks

1 Like

@kaifk468 I have run and done the mock Api check using e-Signet Collection Mock IDA collection.
Here how can we test the real data using this e-Signet Collection MOSIP IDA collection?
If we hit the authorization/send-otp api ,That response comes in JSON file from eSignet service.
Response ā†’ {
ā€œresponseTimeā€: ā€œ2024-09-17T10:29:28.830Zā€,
ā€œresponseā€: {
ā€œtransactionIdā€: ā€œXVnPozkI8UuLxFBxKSSESHrwIUtezMFW4mCi1CugdtQā€,
ā€œmaskedEmailā€: ā€œXXdXXaXXhXXkX@gmail.comā€,
ā€œmaskedMobileā€: ā€œXXXXXXX357934ā€
},
ā€œerrorsā€:
}

How will work in real time?

Hi @narayana_prakash

check this section for more details.

Thanks
MOSIP team

Okay @Anusha_sunkadh.

Thanks
Narayana Prakash.k

Hi @kaifk468 How to run the Inji backend service code in local. Please the documentation, required files and which tag used to clone from github .

Thanks,
Narayana prakash.k

Dear @narayana_prakash ,

Please create another post for the Inji query.

Best Regards
Team MOSIP

Okay @keshavs

Thanks
Narayana Prakash.k