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

BPI Interop - Create user agent script in NodeJs #695

Open
3 tasks
fleischr opened this issue Jun 16, 2023 · 2 comments
Open
3 tasks

BPI Interop - Create user agent script in NodeJs #695

fleischr opened this issue Jun 16, 2023 · 2 comments

Comments

@fleischr
Copy link
Contributor

Overview

Create a user agent script the processes outputs of BRI-1/BRI-3 and maps inputs to inputs BRI-3/BRI-1 according per the Interop demonstration requirements

Reference

Latest build of provide-js
https://github.com/provideplatform/provide-js

BRI-1 Workstep/Workflow Instance API docs
https://docs.provide.services/api/rest-api-v1/axiom/worksteps/workstep-instances

Questions

N/A

Assumptions

Node.js dependencies within the scripts directory shall not introduce any breaking changes elsewhere in the Baseline repo
Refresh/access tokens to be maintained by env file
Shall use the provide-js library to integrate to BRI-1. BRI-3 integration to be supported by the BRI-3 project team.
Executable in batch mode/from CLI terminal. No UI needed.

Acceptance

  • Directory created
  • Diagram created
  • User agent script drafted

Tasks

  • Create visual diagram depicting the user agents interactions to BRI-1/BRI-3 apis
  • Create scripts directory for hosting user agent scripts
  • Draft user agent script executable from command line
@fleischr
Copy link
Contributor Author

fleischr commented Nov 6, 2023

Hi @Therecanbeonlyone1969 I want to get some additional details on the test cases for the scenario onboarding with did-jwt

I have some assumed test cases for consideration. Let me know if these look ok and I can make additional dev/test plans accordingly.

  1. Add an existing DID user to BRI-1. Use did-jwt library to create DID. In lieu of of an email/password combination - the user record to BRI-1 Ident is created when a valid signature by the DID user is provided.
  2. Login the user. DID user generates a digital signature for login. Upon signature verification success, the session access token for BRI-1 is given to interact with BRI-1 APIs accordingly

@Therecanbeonlyone1969
Copy link
Collaborator

@fleischr ... so the did-jwt package is here. DID JWT is used for authentication and authorization purposes. Alternatively, the core repo from DIF is here

DID JWT assumes you have a DID for a given DID method.

  1. So creating an account presents the DID-JWT as the authentication token and the DID is added to the new user account. The DID-JWT library is used to create the DID-JWT based on a given DID and then used to verify the DID-JWT
  2. Login the user works exactly the same way. Except now the check is for an existing account for a given DID and subsequent verification of the DID JWT that would allow access to BRI-1 functionality

Hop that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants