VC Implementation
Objective: VC - (verifiable credentials)
Description: Add VCI issuer ID in Registry for both groups and individual pages
test cases:
- Should be able to successfully setup encryption page
- Should be able to successfully setup VCI issuer in configuration in its settings
- Should be able to successfully print VCI ID in individual and groups pages.
-
Created spp_encryption module based on g2p_encryption module to supply an encryption type name JWCrpyto in the Encryption Providers page
-
Created spp_openid_vci module based on g2p_openid_vci module to do the following -- Get the Verifiable Credential of the Registry -- Create a QR Code based on the Verifiable Credential -- Create an ID Card for the Registry with the embedded QR Code -- Created a wizard for Registry to select which VCI Issuer to use -- Automatically fill-up the field Auth Allowed Issuers of VCI Issuers
-
Created spp_openid_vci_individual module based on spp_openid_vci, this module is specific for Individual Registry -- this module added a button named
Issue Cardin the Individual Registry form page. -- modify VCI Issuer to change the default credential format for Individual Registry -- modify VCI Issuer to change the default credential type for Individual Registry -
Created spp_openid_vci_group module based on spp_openid_vci, this module is specific for Group Registry -- this module added a button named
Issue Cardin the Group Registry form page. -- modify VCI Issuer to change the default credential format for Group Registry -- modify VCI Issuer to change the default credential type for Group Registry
Need to replace the ID Card text to OpenSPP Logo
@reichie020212 Dev unable to install module
Findings: Returned to dev
testing blocked because it is uninstallable in ACF DEV
CC: @dasunhegoda
Findings: Returned to dev
i cannot activate the VCI modules
Note: below are the steps on how to replicate the issue on local
- Create a new fresh database
- install g2p_openid_vci_rest_api
- uninstall g2p_openid_vci
- restart odoo server
- install again g2p_openid_vci_rest_api
KeyError: 'odoo.addons.g2p_openid_vci_rest_api.schemas.openid_vci.CredentialBaseResponse shows when trying to install the module g2p_openid_vci_rest_api.
Still unable to find the cause of issue, it seems that we need help from openg2p devs since this is their module
Found a fix or workaround to fix this issue
If we encounter the error KeyError: 'odoo.addons.g2p_openid_vci_rest_api.schemas.openid_vci.CredentialBaseResponse when installing g2p_openid_vci_rest_api module or any module that have dependency to this module, we need to uninstall first the extendable module then proceed in installing the module you want to install.
PR has been approved, but issue status is "in review". What's the next step?
Findings: Returned to dev
An odoo error appears when attempting to issue a card.
Steps to replicate:
- Prepare an spmis instance in runboat
- login as admin
- Install module spp_openid_vci_individual
- Go to settings and click Activate the developer mode
- Go to Settings -> User & Companies -> Users.
- Enter the record Administrator.
- Go to Access Rights tab and check the Crypto Admin Role
- Refresh the page. You should now be able to see the Encryption Providers Menu on top of the page. Click that menu.
- Enter the Default encryption provider record.
- In Type field, select the JWCrypto then Click the button Create Jwcrpyto Key then Save.
- Go to VCI Issuer menu and create a record.
- Fillup only the following: Name, Scope, Issuer Type, Supported Format, Encryption Provider, and Auth Subject ID Type
- Upon saving, other fields will be automatically fill-up.
- Go to Registry -> Individuals and create a record.
- Make sure the the Individual have an ID type with the same ID Type selected in Auth Subject ID Type
- Click the Issue Card button in the top-middle of the page.
- Select the Issuer that was created earlier then click Confirm.
- Notice upon clicking confirm, an odoo error appears
Attached below is the odoo error odoo error text.txt
@anthonymarkQA , retest after the merge of missing modules that was done earlier this week
Findings: Returned to dev.
Similar issue, upon clicking confirm. an odoo error appears, but this time it has a different odoo error message odoo.error.text 2nd.txt
upon checking, the API that is needed to send request is returning a 500 error with below response
{'detail': 'Internal Server Error'}
here is the API http://openspp-openspp-modules-17-0-adf9c3e640dc.runboatk8.newlogic-demo.com/api/v1/vci/.well-known/openid-credential-issuer/Name
so i think this is a runboat issue, is there any instance we can test aside from runboat?
I will improve the code on this ticket since an appropriate error message should be displayed if the API is not working
Findings: Returned to dev
An odoo error appears when attempting to issue a card.
Steps to replicate:
- Prepare an spmis instance in runboat
- login as admin
- Install module spp_openid_vci_individual
- Go to settings and click Activate the developer mode
- Go to Settings -> User & Companies -> Users.
- Enter the record Administrator.
- Go to Access Rights tab and check the Crypto Admin Role
- Refresh the page. You should now be able to see the Encryption Providers Menu on top of the page. Click that menu.
- Enter the Default encryption provider record.
- In Type field, select the JWCrypto then Click the button Create Jwcrpyto Key then Save.
- Go to VCI Issuer menu and create a record.
- Fillup only the following: Name, Scope, Issuer Type, Supported Format, Encryption Provider, and Auth Subject ID Type
- Upon saving, other fields will be automatically fill-up.
- Go to Registry -> Individuals and create a record.
- Make sure the the Individual have an ID type with the same ID Type selected in Auth Subject ID Type
- Click the Issue Card button in the top-middle of the page.
- Select the Issuer that was created earlier then click Confirm.
- Upon clicking confirm, an odoo error appears:
Access Error
Failed to get credential issuer data. Status code: 500
cc: @reichie020212
already reported to @kneckinator the issue, it seems this is a runboat issue since the runboat cannot access its own API endpoint, but when tested to acf-dev instance, it is working
Since we have issues testing this on runboat, it was agreed to test this on qa spmis instance and then merge the final ticket for the error message once all else is working as expected.
Findings: Return to dev Instance: https://qa-sp-mis.newlogic.net/web?debug=1#cids=1&menu_id=219&action=333&model=res.partner&view_type=form&id=666 An odoo error appears when attempting to issue a card.
Steps to replicate:
- Prepare an spmis instance in runboat
- login as admin
- Install module spp_openid_vci_individual
- Go to settings and click Activate the developer mode
- Go to Settings -> User & Companies -> Users.
- Enter the record Administrator.
- Go to Access Rights tab and check the Crypto Admin Role
- Refresh the page. You should now be able to see the Encryption Providers Menu on top of the page. Click that menu.
- Enter the Default encryption provider record.
- In Type field, select the JWCrypto then Click the button Create Jwcrpyto Key then Save.
- Go to VCI Issuer menu and create a record.
- Fillup only the following: Name, Scope, Issuer Type, Supported Format, Encryption Provider, and Auth Subject ID Type
- Upon saving, other fields will be automatically fill-up.
- Go to Registry -> Individuals and create a record.
- Make sure the the Individual have an ID type with the same ID Type selected in Auth Subject ID Type
- Click the Issue Card button in the top-middle of the page.
- Select the Issuer that was created earlier then click Confirm.
- Upon clicking confirm, an odoo error appears:
Odoo Error
Error:
RPC_ERROR Odoo Server Error Traceback (most recent call last): File "/opt/odoo/odoo/http.py", line 1783, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) File "/opt/odoo/odoo/service/model.py", line 133, in retrying result = func() File "/opt/odoo/odoo/http.py", line 1810, in _serve_ir_http response = self.dispatcher.dispatch(rule.endpoint, args) File "/opt/odoo/odoo/http.py", line 2014, in dispatch result = self.request.registry['ir.http']._dispatch(endpoint) File "/opt/odoo/addons/extendable/models/ir_http.py", line 20, in _dispatch return super()._dispatch(endpoint) File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch result = endpoint(**request.params) File "/opt/odoo/odoo/http.py", line 759, in route_wrapper result = endpoint(self, *args, **params_ok) File "/opt/odoo/addons/web/controllers/dataset.py", line 28, in call_button action = self._call_kw(model, method, args, kwargs) File "/opt/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/opt/odoo/odoo/api.py", line 468, in call_kw result = _call_kw_multi(method, model, args, kwargs) File "/opt/odoo/odoo/api.py", line 453, in _call_kw_multi result = method(recs, *args, **kwargs) File "/opt/odoo/addons/spp_openid_vci/wizard/vci_issuer_selection.py", line 12, in issue_card return self.partner_id._issue_vc_qr(self.issuer_id) File "/opt/odoo/addons/spp_openid_vci/models/res_partner.py", line 113, in _issue_vc_qr result = self._issue_vc(vci_issuer) File "/opt/odoo/addons/spp_openid_vci/models/res_partner.py", line 48, in _issue_vc issuer_data = credential_issuer_response.json() File "/usr/lib/python3/dist-packages/requests/models.py", line 900, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/lib/python3.10/dist-packages/simplejson/init.py", line 514, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.10/dist-packages/simplejson/decoder.py", line 386, in decode obj, end = self.raw_decode(s) File "/usr/local/lib/python3.10/dist-packages/simplejson/decoder.py", line 416, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0) The above server error caused the following client error: RPC_ERROR: Odoo Server Error RPC_ERROR at makeErrorFromResponse (https://qa-sp-mis.newlogic.net/web/assets/60a0582/web.assets_web.min.js:2894:163) at XMLHttpRequest.
(https://qa-sp-mis.newlogic.net/web/assets/60a0582/web.assets_web.min.js:2898:13)
Issue with Runboat has been addressed. A PR to persist this can be found at https://github.com/OpenSPP/runboat/pull/7
Findings: QA PASSED
Steps:
- Prepare an spmis instance in runboat
- login as admin
- Install module spp_openid_vci_individual
- Go to settings and click Activate the developer mode
- Go to Settings -> User & Companies -> Users.
- Enter the record Administrator.
- Go to Access Rights tab and check the Crypto Admin Role
- Refresh the page. You should now be able to see the Encryption Providers Menu on top of the page. Click that menu.
- Enter the Default encryption provider record.
- In Type field, select the JWCrypto then Click the button Create Jwcrpyto Key then Save.
- Go to VCI Issuer menu and create a record.
- Fillup only the following: Name, Scope, Issuer Type, Supported Format, Encryption Provider, and Auth Subject ID Type
- Upon saving, other fields will be automatically fill-up.
- Go to Registry -> Individuals and create a record.
- Make sure the the Individual have an ID type with the same ID Type selected in Auth Subject ID Type
- Add Birthdate, Gender, and Address then save
- Click the Issue Card button in the top-middle of the page.
- Select the Issuer that was created earlier then click Confirm.
- Verify that an ID in PDF format is automatically downloaded.