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
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 @svahsek
Thanks for your response. Please share the documentation to set up the esignet in local.
Hi @svahsek
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==========================
Create database ‘mosip_esignet’.
Run all the scripts provided under db_scripts/mosip_esignet/ddl folder.
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
Thanks @kaifk468. Now it’s working.
Feel free to let us know if you find any issue further
Thanks
@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?
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
Okay @svahsek
Thanks
Narayana Prakash.k