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-434] add preliminary VC 2.0 & VC 1.1 support via DataProvider plugin & VCFormatter + VCSigner #93

Merged
merged 21 commits into from
Oct 17, 2024

Conversation

vharsh
Copy link
Member

@vharsh vharsh commented Sep 23, 2024

Implements Draft Spec: https://www.w3.org/TR/vc-data-model-2.0/

High level technical changes:

  1. Introduce a new plugin family type, the newer one can create the VC given data via a DataProviderPlugin interface's implementation.
  2. Introduce VC Formatting via VCFormatter interface, initially implemented using Velocity Templating Engine & maintaining a record of related VC Templates w.r.t VC context & credentialType.
  3. Introduce VC Signing via VCSigner interface, initially implemented using the embedded keymanager library.
  4. Maintain backwards compatibility with older VCIssuancePlugin.
  5. [TODO] VC Signing algorithm can get tweaked with a configuration change as per use-case.
  6. [TODO] Pubic Key management(for verification) needs to be improved.

End user visible changes

  1. "The End user" can now get a VC 2.0 with newer features, as configured by the administrator.
  2. "The Administrator/Implementor" can in future delegate the VC Signing to Certify and just provide relevant credentialSubject data or implement it end-to-end if they choose to implement the VCIssuance interface, i.e. more flexibility for the Administrator.
  3. VC Verification is possible by verifying the signatures using a library such as vc-verifier

@vharsh vharsh changed the title [INJICERT-434] add preliminary version VC Data Model 2.0 support via DataProvider plugin [INJICERT-434] add preliminary version VC Data Model 2.0 support via DataProvider plugin & VCFormatter + VCSigner Sep 23, 2024
@vharsh vharsh changed the title [INJICERT-434] add preliminary version VC Data Model 2.0 support via DataProvider plugin & VCFormatter + VCSigner [INJICERT-434] add preliminary VC 2.0 support via DataProvider plugin & VCFormatter + VCSigner Sep 23, 2024
@vharsh vharsh force-pushed the injicert-434 branch 2 times, most recently from 7f61379 to 8f88ed5 Compare September 30, 2024 07:39
@vharsh vharsh marked this pull request as ready for review October 14, 2024 15:54
Copy link
Contributor

@jainhitesh9998 jainhitesh9998 left a comment

Choose a reason for hiding this comment

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

apart from this, add the mosip headers as well to the code

vharsh and others added 18 commits October 17, 2024 20:39
Co-Authored by: Piyush7034 <[email protected]>
Signed-off-by: Harsh Vardhan <[email protected]>
* Velocity Engine 1.7 used for templating
* Embedded mosip/keymanager used for key signing with RSASignature2018
* older issuance plugin(VCIssuancePlugin) compatibility is maintained w
  hack assuming VC2.0 is always generated by
  DataProvider+VCFormatter+VCSigner

Co-Authored by: Piyush7034 <[email protected]>

Signed-off-by: Harsh Vardhan <[email protected]>
Co-Authored by: Hitesh Jain <[email protected]>

Signed-off-by: Harsh Vardhan <[email protected]>
Co-Authored by: Hitesh Jain <[email protected]>

Signed-off-by: Harsh Vardhan <[email protected]>
* add config to point the VCI b/w VCIssuancePlugin & DataProviderPlugin

Signed-off-by: Harsh Vardhan <[email protected]>
Two use-cases are possible now:

* CertifyPlugin: Uses DataProviderPlugin + VCFormatter + VCSigner to
  generate the credential by itself. With this, DataProviderPlugin will
  share the Credential data and formatting & signing will be done by
  Certify.

* PluginIssuer: Uses VCIssuancePlugin, which will generate the
  credential all by itself and Certify will just deliver the Credential
  over the OpenID4VCI.

Signed-off-by: Harsh Vardhan <[email protected]>
Signed-off-by: Harsh Vardhan <[email protected]>
@jainhitesh9998 jainhitesh9998 merged commit e87f210 into mosip:develop Oct 17, 2024
10 checks passed
@vharsh vharsh changed the title [INJICERT-434] add preliminary VC 2.0 support via DataProvider plugin & VCFormatter + VCSigner [INJICERT-434] add preliminary VC 2.0 & VC 1.1 support via DataProvider plugin & VCFormatter + VCSigner Oct 18, 2024
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.

3 participants