Skip to content

Commit

Permalink
merge conflicts resolved
Browse files Browse the repository at this point in the history
[INJICERT-657] use local CSV file for docker compose demo

Signed-off-by: Harsh <[email protected]>
  • Loading branch information
vharsh authored and Piyush7034 committed Dec 17, 2024
1 parent c8ceacf commit 3d6f63a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 54 deletions.
81 changes: 34 additions & 47 deletions docker-compose/docker-compose-injistack/certify_init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -81,57 +81,13 @@ CREATE TABLE certify.credential_template(
CONSTRAINT pk_template PRIMARY KEY (context, credential_type)
);

INSERT INTO certify.credential_template (context, credential_type, template, cr_dtimes, upd_dtimes) VALUES ('https://vharsh.github.io/DID/mock-context.json,https://www.w3.org/2018/credentials/v1', 'MockVerifiableCredential,VerifiableCredential', '{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://vharsh.github.io/DID/mock-context.json"],
"issuer": "${issuer}",
"type": ["VerifiableCredential", "MockVerifiableCredential"],
"issuanceDate": "${validFrom}",
"expirationDate": "${validUntil}",
"credentialSubject": {
"gender": ${gender},
"postalCode": ${postalCode},
"fullName": ${fullName},
"dateOfBirth": "${dateOfBirth}",
"province": ${province},
"phone": "${phone}",
"addressLine1": ${addressLine1},
"region": ${region},
"vcVer": "${vcVer}",
"UIN": ${UIN},
"email": "${email}",
"face": "${face}"
}
}', '2024-10-22 17:08:17.826851', NULL);
INSERT INTO certify.credential_template (context, credential_type, template, cr_dtimes, upd_dtimes) VALUES ('https://vharsh.github.io/DID/mock-context.json,https://www.w3.org/ns/credentials/v2', 'MockVerifiableCredential,VerifiableCredential', '{
"@context": [
"https://www.w3.org/ns/credentials/v2", "https://vharsh.github.io/DID/mock-context.json"],
"issuer": "${issuer}",
"type": ["VerifiableCredential", "MockVerifiableCredential"],
"validFrom": "${validFrom}",
"validUntil": "${validUntil}",
"credentialSubject": {
"gender": ${gender},
"postalCode": ${postalCode},
"fullName": ${fullName},
"dateOfBirth": "${dateOfBirth}",
"province": ${province},
"phone": "${phone}",
"addressLine1": ${addressLine1},
"region": ${region},
"vcVer": "${vcVer}",
"UIN": ${UIN},
"email": "${email}",
"face": "${face}"
}
}', '2024-10-22 17:08:17.826851', NULL);
INSERT INTO certify.credential_template (context, credential_type, template, cr_dtimes, upd_dtimes) VALUES ('https://www.w3.org/2018/credentials/v1', 'FarmerCredential,VerifiableCredential', '{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://piyush7034.github.io/my-files/farmer.json"
"https://piyush7034.github.io/my-files/farmer.json",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"issuer": "${issuer}",
"issuer": "${_issuer}",
"type": [
"VerifiableCredential",
"FarmerCredential"
Expand All @@ -157,6 +113,37 @@ INSERT INTO certify.credential_template (context, credential_type, template, cr_
}
', '2024-10-24 12:32:38.065994', NULL);

INSERT INTO certify.template_data (context, credential_type, template, cr_dtimes, upd_dtimes) VALUES ('https://www.w3.org/ns/credentials/v2', 'FarmerCredential,VerifiableCredential', '{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://vharsh.github.io/DID/farmer.json",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"issuer": "${_issuer}",
"type": [
"VerifiableCredential",
"FarmerCredential"
],
"validFrom": "${validFrom}",
"validUntil": "${validUntil}",
"credentialSubject": {
"name": "${name}",
"dateOfBirth": "${dateOfBirth}",
"highestEducation": "${highestEducation}",
"maritalStatus": "${maritalStatus}",
"typeOfHouse": "${typeOfHouse}",
"numberOfDependents": "${numberOfDependents}",
"phoneNumber": "${phoneNumber}",
"works": "${works}",
"landArea": "${landArea}",
"landOwnershipType": "${landOwnershipType}",
"primaryCropType": "${primaryCropType}",
"secondaryCropType": "${secondaryCropType}",
"face": "${face}",
"farmerID": "${farmerID}"
}
}
', '2024-10-24 12:32:38.065994', NULL);

INSERT INTO certify.key_policy_def(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES('ROOT', 2920, 1125, 'NA', true, 'mosipadmin', now());
INSERT INTO certify.key_policy_def(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES('CERTIFY_SERVICE', 1095, 60, 'NA', true, 'mosipadmin', now());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ mosip.certify.mock.authenticator.get-identity-url=http://mock-identity-system:80
mosip.certify.cache.security.algorithm-name=AES/ECB/PKCS5Padding
mosip.certify.cache.secure.individual-id=false
mosip.certify.cache.store.individual-id=true
mosip.certify.rendering-templates=insurance-svg-template.json
mosip.certify.identifier=http://localhost:8090

mosip.certify.data-provider-plugin.issuer-uri=did:web:vharsh.github.io:DID:harsh
Expand All @@ -22,7 +21,7 @@ mosip.certify.data-provider-plugin.issuer.vc-sign-algo=Ed25519Signature2020
## CSV specific config
mosip.certify.mock.data-provider.csv.identifier-column=id
mosip.certify.mock.data-provider.csv.data-columns=id,fullName,mobileNumber,dateOfBirth,gender,state,district,villageOrTown,postalCode,landArea,landOwnershipType,primaryCropType,secondaryCropType,face,farmerID
mosip.certify.mock.data-provider.csv-registry-uri=https://raw.githubusercontent.com/mosip/inji-config/refs/heads/develop/farmer_registry.csv
mosip.certify.mock.data-provider.csv-registry-uri=/home/mosip/config/farmer_identity_data.csv
mosip.certify.data-provider-plugin.rendering-template-id=
mosip.certify.key-values={\
'vd12' : {\
Expand Down Expand Up @@ -97,4 +96,4 @@ mosip.certify.key-values={\
'background_image': { 'uri': 'https://sunbird.org/images/sunbird-logo-new.png' }, \
'text_color': '#7C4616'}},\
'order' : {'farmerID','fullName','mobileNumber','dateOfBirth','gender','state','district','villageOrTown','postalCode','landArea','landOwnershipType','primaryCropType','secondaryCropType'}\
}}}}
}}}}
9 changes: 5 additions & 4 deletions docker-compose/docker-compose-injistack/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
- "5433:5432"

certify:
image: mosipdev/inji-certify:develop
image: mosipqa/inji-certify:release-0.10.x
user: root
ports:
- 8090:8090
Expand All @@ -30,6 +30,8 @@ services:
- ./config/certify-csvdp-farmer.properties:/home/mosip/config/certify-csvdp-farmer.properties
- ./data/CERTIFY_PKCS12:/home/mosip/CERTIFY_PKCS12
- ./loader_path/certify/:/home/mosip/additional_jars/
# modify the below file to change the identity fields in the VC
- ./config/farmer_identity_data.csv:/home/mosip/config/farmer_identity_data.csv
networks:
- network
depends_on:
Expand All @@ -39,7 +41,7 @@ services:
container_name: nginx
image: nginx:alpine
ports:
- '8080:80'
- '80:80'
volumes:
- ./config/mimoto-issuers-config.json:/config/server/mimoto-issuers-config.json
- ./config/mimoto-trusted-verifiers.json:/config/server/mimoto-trusted-verifiers.json
Expand All @@ -49,10 +51,9 @@ services:
- mimoto-service
networks:
- network

mimoto-service:
container_name: 'Mimoto-Service'
image: 'mosipid/mimoto:0.14.0'
image: mosipid/mimoto:0.14.0
user: root
ports:
- '8099:8099'
Expand Down

0 comments on commit 3d6f63a

Please sign in to comment.