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

feat: add support for Linked Verifiable Presentations #92

Merged
merged 74 commits into from
Nov 25, 2024

Conversation

nanderstabel
Copy link
Collaborator

@nanderstabel nanderstabel commented Jun 26, 2024

Description of change

Adds (dynamic) Linked Verifiable Presentation support to UniCore

Links to any relevant issues

How the change has been tested

The updated Postman Collection can be used to test this added functionality manually:

make sure did web and domain linkage are enabled (and preferred) in the config (or .env) file:

did_methods:
  did_web:
    preferred: true
    enabled: true
 # make sure did:iota:rms is not enabled
  did_iota_rms:
    enabled: false

domain_linkage_enabled: true

Since local IP addresses are not valid identifiers for the DID Web method, the easiest way of testing this is by setting the UNICORE__URL env var to http://localhost:3033.

Also, when spinning up the docker container, make sure to build from source and not use the published image on DockerHub (compose.yaml):

  ssi-agent:
    # image: impiercetechnologies/ssi-agent:837870c
    build:
      context: ../..
      dockerfile: ./agent_application/docker/Dockerfile

Issuance:

  1. execute /Issuance/Thuiswinkel Waarborg Credential
  2. execute /Issuance/offers_send

These first steps ensure that the Issuer, creates the Credential and Offer and sends the Offer to the Holder (via the target_url)

Holder:
4. execute GET Holder/offers (the collection will automatically set the RECEIVED_OFFER_ID env var)
5. execute Holder/offers_accept
6. execute GET Holder/credentials (the collection will automatically set the HOLDER_CREDENTIAL_ID env var)
7. execute POST Holder/presentations
8. execute GET Holder/presentations (the collection will automatically set the PRESENTATION_ID env var)

Identity:
9. execute Identity/linked-vp

To check whether the linked VP was successfully added, execute .well-known/did:web. You should see that two services are added to the Document, one of them has the LinkedVerifiablePresentation type. The serviceEndpoint should be pointing at the endpoint where the Linked VP is hosted

This branch can also be validated against this branch in UniMe: impierce/identity-wallet#256 (or against ci/release-0.7)

Since UNICORE__URL is set to http://localhost:3033, you can only test this against UniMe running on desktop.

After 'scanning' the Credential Offer UniMe should prompt something like this:
image

Definition of Done checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have successfully tested this change in a docker environment

@nanderstabel nanderstabel changed the base branch from dev to beta November 19, 2024 14:17
.env.example Outdated Show resolved Hide resolved
agent_holder/src/presentation/README.md Show resolved Hide resolved
agent_api_rest/src/holder/mod.rs Show resolved Hide resolved
agent_api_rest/src/holder/mod.rs Outdated Show resolved Hide resolved
agent_identity/src/state.rs Show resolved Hide resolved
agent_holder/src/offer/error.rs Outdated Show resolved Hide resolved
agent_identity/src/document/README.md Show resolved Hide resolved
agent_identity/src/service/README.md Show resolved Hide resolved
agent_holder/src/presentation/aggregate.rs Show resolved Hide resolved
agent_identity/src/service/aggregate.rs Show resolved Hide resolved
@nanderstabel nanderstabel changed the title feat: add support for linked verifiable presentations feat: add support for Linked Verifiable Presentations Nov 25, 2024
@nanderstabel nanderstabel merged commit 029f1bf into beta Nov 25, 2024
3 checks passed
@nanderstabel nanderstabel deleted the feat/linked-vp branch November 25, 2024 15:18
Copy link

🎉 This PR is included in version 1.0.0-beta.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added A new feature that requires a minor release. released on @beta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants