Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INJICERT-695] add docker-compose setup for MDL #163

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docker-compose/docker-compose-injistack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ docker-compose-injistack/
## Mock Certify Plugin Setup
You have two options for the certify plugin:

#### Loading plugin for issuance

setup active_profile_env value of the certify service in [docker-compose.yaml](./docker-compose.yaml) as per use case.

For,

| active_profile_env | use case |
|-----------------------|-------------------------------|
| default, mock-mdl | Mobile driving license |
| default, csvdp-farmer | Farmer credential (default) |

Note: Refer the relevant config file based on use case to connect to the required environment

### Option 1: Use Existing Mock Plugin
- Supported versions: 0.3.0 and above
- Download the snapshot JAR from:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mosip.certify.discovery.issuer-id=${mosipbox.public.url}${server.servlet.path}
mosip.certify.authorization.url=https://esignet-mock.dev1.mosip.net

##--------------change this later---------------------------------
mosip.certify.supported.jwt-proof-alg={'RS256','PS256'}
mosip.certify.supported.jwt-proof-alg={'RS256','PS256', 'ES256'}
mosip.certify.plugin-mode=DataProvider


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

## ------------------------------------------- Plugin enable properties ------------------------------------------------------------
mosip.certify.integration.scan-base-package=io.mosip.certify.mock.integration
mosip.certify.integration.audit-plugin=LoggerAuditService
mosip.certify.integration.vci-plugin=MDocMockVCIssuancePlugin
mosip.certify.plugin-mode=VCIssuance

##commons
mosip.certify.data-provider-plugin.issuer.vc-sign-algo=Ed25519Signature2018
mosip.certify.data-provider-plugin.issuer-public-key-uri=

## ------------------------------------------- Plugin specific usecase properties ------------------------------------------------------------
mosip.certify.cache.secure.individual-id=false
mosip.certify.cache.store.individual-id=false
mosip.certify.cache.security.algorithm-name=AES/ECB/PKCS5Padding
#TODO:Onboard issuer key and certificate data here format - "$base64EncodedPrivateKey||$base64EncodedCertificate"
mosip.certify.mock.mdoc.issuer-key-cert=
mosip.certify.mock.vciplugin.mdoc.issuer-key-cert=${mosip.certify.mock.mdoc.issuer-key-cert}

## ------------------------------------------- Host values of connected services ------------------------------------------------------------
#TODO: Add esignet host and api public host
mosip.esignet.mock.host=
mosip.injicertify.mock.host=localhost:8090/
mosip.api.public.host=

## ------------------------------------------- UseCase specific default overriding properties ------------------------------------------------------------
mosip.certify.domain.url=https://${mosip.injicertify.mock.host}
mosip.certify.identifier=${mosip.certify.domain.url}
mosip.certify.authorization.url=https://${mosip.esignet.mock.host}
mosip.certify.database.name=inji_certify_mock


mosip.certify.key-values={\
'vd11' : { \
'credential_issuer': '${mosip.certify.identifier}', \
'credential_endpoint': '${mosip.certify.domain.url}${server.servlet.path}/issuance/vd11/credential', \
'credentials_supported': {\
{\
'format': 'mso_mdoc',\
'id': 'DrivingLicenseCredential', \
'scope' : 'sample_vc_mdoc',\
'cryptographic_suites_supported': {'ES256'},\
'proof_types_supported': {'jwt'},\
'claims': {\
'org.iso.18013.5.1': {'given_name': {'display': {{'name': 'Given Name','locale': 'en'}}},'family_name': {'display': {{'name': 'Family Name','locale': 'en'}}},'issue_date': {'display': {{'name': 'Issue Date','locale': 'en'}}},'expiry_date': {'display': {{'name': 'Expiry Date','locale': 'en'}}},'birth_date': {'display': {{'name': 'Birth Date','locale': 'en'}}},'issuing_country': {'display': {{'name': 'Issuing Country','locale': 'en'}}},'document_number': {'display': {{'name': 'Document Number','locale': 'en'}}}}},\
'display': {{'name': 'Mobile Driving License', \
'locale': 'en', \
'background_image': { 'uri': 'https://${mosip.api.public.host}/inji/mosip-logo.png' }, \
'logo': {'url': 'https://${mosip.api.public.host}/inji/mosip-logo.png','alt_text': 'a square logo of MOSIP'},\
'background_color': '#5F8A8B',\
'text_color': '#7C4616'}},\
'order' : {'org.iso.18013.5.1~family_name','org.iso.18013.5.1~given_name','org.iso.18013.5.1~document_number','org.iso.18013.5.1~issuing_country','org.iso.18013.5.1~issue_date','org.iso.18013.5.1~expiry_date','org.iso.18013.5.1~birth_date'}\
}\
}\
},\
'vd12' : {\
'credential_issuer': '${mosip.certify.identifier}', \
'authorization_servers': {'${mosip.certify.authorization.url}'}, \
'credential_endpoint': '${mosip.certify.domain.url}${server.servlet.path}/issuance/vd12/credential', \
'display': {{'name': 'Mock Mobile Driving License', 'locale': 'en'}},\
'credentials_supported' : { \
"DrivingLicenseCredential":{\
'format': 'mso_mdoc',\
'doctype': 'org.iso.18013.5.1.mDL',\
'scope' : 'sample_vc_mdoc',\
'cryptographic_binding_methods_supported': {'cose_key'},\
'credential_signing_alg_values_supported': {'ES256'},\
'proof_types_supported': {'jwt': {'proof_signing_alg_values_supported': {'ES256'}}},\
'claims': {\
'org.iso.18013.5.1': {'given_name': {'display': {{'name': 'Given Name','locale': 'en'}}},'family_name': {'display': {{'name': 'Family Name','locale': 'en'}}},'issue_date': {'display': {{'name': 'Issue Date','locale': 'en'}}},'expiry_date': {'display': {{'name': 'Expiry Date','locale': 'en'}}},'birth_date': {'display': {{'name': 'Birth Date','locale': 'en'}}},'issuing_country': {'display': {{'name': 'Issuing Country','locale': 'en'}}},'document_number': {'display': {{'name': 'Document Number','locale': 'en'}}}}},\
'display': {{'name': 'Mobile Driving License', \
'locale': 'en', \
'background_image': { 'uri': 'https://${mosip.api.public.host}/inji/mosip-logo.png' }, \
'logo': {'url': 'https://${mosip.api.public.host}/inji/mosip-logo.png','alt_text': 'a square logo of MOSIP'},\
'background_color': '#5F8A8B',\
'text_color': '#7C4616'}},\
'order' : {'org.iso.18013.5.1~family_name','org.iso.18013.5.1~given_name','org.iso.18013.5.1~document_number','org.iso.18013.5.1~issuing_country','org.iso.18013.5.1~issue_date','org.iso.18013.5.1~expiry_date','org.iso.18013.5.1~birth_date'}\
}}\
},\
'latest' : {\
'credential_issuer': '${mosip.certify.identifier}', \
'authorization_servers': {'${mosip.certify.authorization.url}'}, \
'credential_endpoint': '${mosip.certify.domain.url}${server.servlet.path}/issuance/credential', \
'display': {{'name': 'Mock Mobile Driving License', 'locale': 'en'}},\
'credential_configurations_supported' : { \
"DrivingLicenseCredential":{\
'format': 'mso_mdoc',\
'doctype': 'org.iso.18013.5.1.mDL',\
'scope' : 'sample_vc_mdoc',\
'cryptographic_binding_methods_supported': {'cose_key'},\
'credential_signing_alg_values_supported': {'ES256'},\
'proof_types_supported': {'jwt': {'proof_signing_alg_values_supported': {'ES256'}}},\
'claims': {\
'org.iso.18013.5.1': {'given_name': {'display': {{'name': 'Given Name','locale': 'en'}}},'family_name': {'display': {{'name': 'Family Name','locale': 'en'}}},'issue_date': {'display': {{'name': 'Issue Date','locale': 'en'}}},'expiry_date': {'display': {{'name': 'Expiry Date','locale': 'en'}}},'birth_date': {'display': {{'name': 'Birth Date','locale': 'en'}}},'issuing_country': {'display': {{'name': 'Issuing Country','locale': 'en'}}},'document_number': {'display': {{'name': 'Document Number','locale': 'en'}}}}},\
'display': {{'name': 'Mobile Driving License', \
'locale': 'en', \
'background_image': { 'uri': 'https://${mosip.api.public.host}/inji/mosip-logo.png' }, \
'logo': {'url': 'https://${mosip.api.public.host}/inji/mosip-logo.png','alt_text': 'a square logo of MOSIP'},\
'background_color': '#5F8A8B',\
'text_color': '#7C4616'}},\
'order' : {'org.iso.18013.5.1~family_name','org.iso.18013.5.1~given_name','org.iso.18013.5.1~document_number','org.iso.18013.5.1~issuing_country','org.iso.18013.5.1~issue_date','org.iso.18013.5.1~expiry_date','org.iso.18013.5.1~birth_date'}\
}}\
}\
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,31 @@
"qr_code_type": "EmbeddedVC",
"enabled": "true",
"wellknown_endpoint": "http://certify:8090/v1/certify/issuance/.well-known/openid-credential-issuer"
},
{
"credential_issuer": "MockMdl",
"protocol": "OpenId4VCI",
"display": [
{
"name": "Mobile Driving License",
"logo": {
"url": "https://api.collab.mosip.net/inji/mosip-logo.png",
"alt_text": "mosip-logo"
},
"title": "Mobile Driving License",
"description": "Download Mobile Driving License",
"language": "en"
}
],
"client_id": "mpartner-mock-testing",
"redirect_uri": "io.mosip.residentapp.inji://oauthredirect",
"token_endpoint": "http://localhost:8099/v1/mimoto/get-token/MockMdl",
"authorization_audience": "https://esignet-mock.dev1.mosip.net/v1/esignet/oauth/v2/token",
"proxy_token_endpoint": "https://esignet-mock.dev1.mosip.net/v1/esignet/oauth/v2/token",
"client_alias": "mpartner-mock-testing",
"qr_code_type": "EmbeddedVC",
"enabled": "true",
"wellknown_endpoint": "http://certify:8090/v1/certify/issuance/.well-known/openid-credential-issuer"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
volumes:
- ./config/certify-default.properties:/home/mosip/config/certify-default.properties
- ./config/certify-csvdp-farmer.properties:/home/mosip/config/certify-csvdp-farmer.properties
- ./config/certify-mock-mdl.properties:/home/mosip/config/certify-mock-mdl.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
Expand Down
Loading