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

Critical code review PR - Last sprint handover checklist of 0.10.0 release #147

Draft
wants to merge 159 commits into
base: master
Choose a base branch
from

Conversation

vishwa-vyom
Copy link
Member

This PR is created just to add the review comments as part of the critical code review task of last sprint handover checklist for release of 0.10.0 version.

** THIS PR SHOULD NOT BE MERGED **

vharsh and others added 30 commits June 17, 2024 10:22
Earlier `/issuance/.well-known/openid-credential-issuer?version=v123`
 would return the latest versioned issuer metadata earlier if it was
 not valid, now returns an error.

Signed-off-by: Harsh Vardhan <[email protected]>
[DSD-5526] Update init_db.sh namespace and chart version
[INJICERT-236] throw error when unsupported wellknown version requested
[INJICERT-37] rename certify database name
[DSD-5618] Update init_values.yaml
* [INJICERT-248] use well known config from spring from separate JSON file

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-248] fixup JSON formatting of well-known config

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-248] Fixup formatting & resource URL

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-248] add missing config for mock-identity

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-248] parse metadata when mediatype is text/plain

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-248] rename openid4vci well known file

Signed-off-by: Harsh Vardhan <[email protected]>

---------

Signed-off-by: Harsh Vardhan <[email protected]>
[MOSIP-34749] removed platform related DB's reference
Signed-off-by: Praful Rakhade <[email protected]>
[DSD-5853] updated Dockerfile
Signed-off-by: Nandhukumar <[email protected]>
Signed-off-by: Rakshitha650 <[email protected]>
[MOSIP-34818]Updated values.yaml
Signed-off-by: Nandhukumar <[email protected]>
Signed-off-by: Nandhukumar <[email protected]>
Signed-off-by: Nandhukumar <[email protected]>
Signed-off-by: Nandhukumar <[email protected]>
Signed-off-by: Nandhukumar <[email protected]>
Signed-off-by: Nandhukumar <[email protected]>
Signed-off-by: Nandhukumar <[email protected]>
MOSIP-33742 | Created component based API test rig for Inji-certify
Copy link
Member Author

@vishwa-vyom vishwa-vyom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vharsh @Piyush7034 I have reviewed the certify-core sub project in the PR and added comments.
Doing it in parts to handover to the dev team to parallelly work on the fixes.

certify-core/pom.xml Outdated Show resolved Hide resolved
private String errorCode;

public TemplateException() {
super(ErrorConstants.UNKNOWN_ERROR);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this error says unknown, if we are having a separate exception class, that needs to have some base error message. Also in what all cases this exception is planned to be thrown ?

Also If this is related to Credential template, then we can also rename this as CredentialTemplateException to be more specific.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, we don't have proper error codes like how Keymanager or other MOSIP modules have had it for long, this can be implemented.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok lets do it then, for now we need only a generic error message that given a overall idea of what kind of error this is

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This constructor is not used anywhere, we've only used it with template_with_id_not_found error code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contructor without param to be removed

…ch (#148)

* [INJICERT-499] added config docs for postgres dp plugin

Signed-off-by: Piyush7034 <[email protected]>

* Added upgrade sql scripts

Signed-off-by: Piyush7034 <[email protected]>

* Fixed template name

Signed-off-by: Piyush7034 <[email protected]>

* Fixed template name

Signed-off-by: Piyush7034 <[email protected]>

* Change in some configs w.r.t. data provider plugin

Signed-off-by: Piyush7034 <[email protected]>

---------

Signed-off-by: Piyush7034 <[email protected]>
Signed-off-by: Vishwa <[email protected]>
Copy link
Member Author

@vishwa-vyom vishwa-vyom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vharsh @Piyush7034 Part 2 review done, reviewed till service layer of certify-service

/**
* VCSigner can sign any VC provided a vcHash & Signer inputs
*/
public interface VCSigner {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any special reason for this to be part of certify-integration-api and not certify-service ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is spi folder in both certify-core and certify-integration-api. All the interfaces are placed in these folders. So, it was placed in certify-integration-api. This can be moved to service folder of the certify-service

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VCSigner and impl file to be moved to io.mosip.certify.vcsigners

Copy link
Member Author

@vishwa-vyom vishwa-vyom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vharsh @Piyush7034 Last set review done,
api test, test file and deployment script are not reviewed.

@Autowired
SvgTemplateService svgTemplateService;
@Value("${mosip.certify.vcformat.vc.expiry:true}")
boolean shouldHaveDates;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable name and config name does not match

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be a good time to consider this feature enhancement here? It wasn't discussed but implemented directly.

ref: #132

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need some changes in the config name, but largely ok.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets rename to mosip.certify.data-provider-plugin.vc-expiry-duration and use the java standard library for parsing.
Add the comments in the properties with the format and point to the ISO 8601

- SPRING_CONFIG_NAME=certify
- SPRING_CONFIG_LOCATION=/home/mosip/config/
- enable_certify_artifactory=false
- download_hsm_client=false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add a small note to readme file to add the below environment variable to configure ngrok
mosipbox_public_url=https://nearly-notable-longhorn.ngrok-free.app

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs to be updated later

listen 80;

location / {
root /config/server;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we have this config/server ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Piyush7034 to remove this and find out if that will work for him

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Piyush7034 Any update on this ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were issues while running docker on my machine. Thats why I couldn't remove

nandhu-kumar and others added 3 commits December 13, 2024 19:19
Signed-off-by: Nandhukumar <[email protected]>
Signed-off-by: Nandhukumar <[email protected]>
MOSIP-38340 | Sync injicertify develop and release-0.10x branch
vharsh and others added 14 commits December 17, 2024 18:26
* [INJICERT-657] rename Svg -> SVG and other minor changes

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-657] make mass renames, update DB

Changes:
* svg_template DB becomes template_registry & it's ID column becomes a
  String from UUID type

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-657] move proofgenerator package

Signed-off-by: Harsh Vardhan <[email protected]>

* Docker and script code changes

Signed-off-by: Piyush7034 <[email protected]>

* [INJICERT-657] rename Certify keys in KeyManager

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-657] rename Certify keys in KeyManager

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-657] move VCFormatter & VCSigner to certify-service

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-657] make Velocity template cacheable

Signed-off-by: Harsh Vardhan <[email protected]>

---------

Signed-off-by: Harsh Vardhan <[email protected]>
Signed-off-by: Piyush7034 <[email protected]>
Co-authored-by: Piyush7034 <[email protected]>
Signed-off-by: Vishwa <[email protected]>
[INJICERT-657] Added review changed related to rendering template names and docker
* [INJICERT-657] pass keyID from CertifyIssuanceImpl

Other changes:

* more renames, changes to scripts & SQL files

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-657] use local CSV file for docker compose demo

Signed-off-by: Harsh <[email protected]>

* [INJICERT-657] remove & rename files

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-657] add optional expiry of VC in template

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-657] move packages around

Signed-off-by: Harsh Vardhan <[email protected]>

---------

Signed-off-by: Harsh Vardhan <[email protected]>
Signed-off-by: Harsh <[email protected]>
Signed-off-by: Vishwa <[email protected]>
* [INJICERT-695] add mock mdoc VCI postman collection

Signed-off-by: KiruthikaJeyashankar <[email protected]>

* [INJICERT-695] modify property name of mdoc issuer key certificate

    mosip.certify.mock.vciplugin.issuer.key-cert changed to mosip.certify.mock.vciplugin.mdoc.issuer-key-cert

Signed-off-by: KiruthikaJeyashankar <[email protected]>

---------

Signed-off-by: KiruthikaJeyashankar <[email protected]>
Signed-off-by: Vishwa <[email protected]>
* [INJICERT-657] Added some deployment changes

Signed-off-by: Piyush7034 <[email protected]>

* [INJICERT-657] Change in extraEnvVars yaml value

Signed-off-by: Piyush7034 <[email protected]>

---------

Signed-off-by: Piyush7034 <[email protected]>
Signed-off-by: Vishwa <[email protected]>
Signed-off-by: KiruthikaJeyashankar <[email protected]>
Signed-off-by: Vishwa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.