Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Add KCC prototype to PFI Exemplar #39

Merged
merged 7 commits into from
Aug 20, 2024
Merged

Add KCC prototype to PFI Exemplar #39

merged 7 commits into from
Aug 20, 2024

Conversation

acekyd
Copy link
Contributor

@acekyd acekyd commented Aug 15, 2024

This pull request includes several changes to enhance the tbDEX PFI exemplar project by adding new endpoints, updating documentation, and improving the Docker setup. The most important changes include the addition of new endpoints for IDV and issuer servers, updates to the Docker configuration to expose new ports, and modifications to the README to include new example flows.

New Endpoints and Features:

  • src/example/idv-vendor/server.ts: Added a new IDV server with endpoints for handling IDV form submissions and communicating with the issuer server.
  • src/example/issuer/server.ts: Added a new issuer server with endpoints for handling SIOPv2 authentication requests and issuing Known Customer Credentials (KCC).

Docker Configuration:

  • Dockerfile: Exposed ports 3001 and 3002 for the new issuer and IDV servers.
  • docker-compose.yaml: Updated to expose ports 3001 and 3002 for the new services.

Documentation Updates:

  • README.md: Updated to include new example flows for issuing Known Customer Credentials (KCC) and running the mock Identity Vendor (IDV) and Issuer servers. [1] [2]

Script and Configuration Updates:

  • container-start.sh: Added logging and commands to run the example issuer creation and seed offerings scripts.
  • package.json: Added new npm script example-wallet-issue-kcc for running the full flow of issuing a KCC.

Example Flows:

  • Added a series of scripts in src/example/kcc-wallet/ to demonstrate the full flow of creating a DID, resolving IDV service endpoints, submitting SIOPv2 responses, and requesting credentials. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

These changes significantly enhance the functionality and documentation of the tbDEX PFI exemplar project, making it easier to follow and implement the full flow of issuing Known Customer Credentials.

@acekyd acekyd requested a review from finn-block August 15, 2024 15:26
@acekyd acekyd self-assigned this Aug 15, 2024
@finn-block
Copy link
Member

Those kcc wallet scripts look a lot like the ones that already exist at javascript/kcc-prototype-exemplar/wallet - are we sure we want to duplicate them?

@acekyd
Copy link
Contributor Author

acekyd commented Aug 15, 2024

Those kcc wallet scripts look a lot like the ones that already exist at javascript/kcc-prototype-exemplar/wallet - are we sure we want to duplicate them?

You're correct. They are an integration of that prototype into the existing PFI exemplar to execute the KCC along with the offerings as a way to show end to end tbDEX interop.

@@ -224,7 +224,7 @@ async function main() {
path: ['$.type[*]'],
filter: {
type: 'string',
pattern: '^SanctionCredential$',
pattern: '^KnownCustomerCredential$',
Copy link
Member

Choose a reason for hiding this comment

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

there was a change to the spec. it no longer looks for type. It looks for credentialSchema.id:

              {
                "path": [
                  "$.credentialSchema[*].id"
                ],
                "filter": {
                  "type": "string",
                  "const": "https://vc.schemas.host/kcc.schema.json"
                }
              }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh gotcha. Thanks for catching that.

@michaelneale
Copy link
Contributor

I like this - I think this could be the right home for end to end tbdex including with kcc as it is important. I guess open question if that external example kcc is retained, or added in parallel to the pfi-exemplar for just that bit? I think it makes more sense in context of this so I think this is EXCELLENT!

Nice one @acekyd

@michaelneale
Copy link
Contributor

not sure if missing it but should the kcc be used as part of the end to end tbdex flow as well?

@acekyd acekyd requested a review from angiejones August 19, 2024 18:36
@acekyd acekyd merged commit 0bebdfc into main Aug 20, 2024
17 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants