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

[Interop] Nats Message Schemas #711

Open
Therecanbeonlyone1969 opened this issue Jul 14, 2023 · 5 comments
Open

[Interop] Nats Message Schemas #711

Therecanbeonlyone1969 opened this issue Jul 14, 2023 · 5 comments
Assignees

Comments

@Therecanbeonlyone1969
Copy link
Collaborator

We need Nats Schemas for the following Messages based on the standard:

  • Create State Synchronization and Advancement Predicate --> ACME BPI to Bank BPI (R140 - R145)
  • Launch IVSM --> ACME BPI to Bank BPI (R151)
  • Remove IVSM --> Bank BPI to ACME BPI and the other way around (after workflow completion) (R159) --> would archive workflow on both sides.
  • Exit BPI Interoperability (R207)
@fleischr
Copy link
Contributor

hey!

@fleischr
Copy link
Contributor

fleischr commented Aug 4, 2023

Need to get the NATS message schema endpoint underlying the protocol messages

@fleischr
Copy link
Contributor

fleischr commented Aug 7, 2023

question - what is the assumption to how/where BRI-3 NATs to integrate to BRI-1 NATs?

Are we orchestrating peer-to-peer connectivity or standing up a standalone interop module? @Therecanbeonlyone1969

@Therecanbeonlyone1969
Copy link
Collaborator Author

@fleischr the assumption is that we use NATS in P2P. The BPI Subjects representing BRI-1/BRI-3 in each other's stack have to have a communication endpoint associated with the BPI Subject either explicitly in the BPI Subject Account or implicitly through the services section in the DID document where the NATS endpoint is placed. Since each BPI Subject representing BRI-1/BRI-3 are identified by DIDs as we agreed.

Can you please confirm that BRI-1 can manage DIDs in NATS messaging since BRI-3 will only send DIDs?

@Therecanbeonlyone1969
Copy link
Collaborator Author

for server-server messaging using the NATS request-response pattern:

  • Add each others NATS server URLs to the NATS server URL list
  • Authentication via JWT token with a DID in it --> That is still an open point! We need to know if BRI-1 can use DID-JWT
  • Create a topic called Interop
  • Instantiate a NATS listener that subscribes to the Interop topic and continuously listens for incoming messages, and then processes the incoming messages on that topic as usual based on the workgroup.

Suggested Interop Message
Schema

messageId: uuid
sender: string --> DID of BRI-1/BRI-3 respectively
recipient: string --> DID of BRI-1/BRI-3 respectively
signature: object --> curve, pubkey, signature
type: string --> default value: interop
payload: payloadObject -- see below
WorkgroupID string --> as provided in inviteMessage from BRI-1/BRI-3
WorkflowID  string --> as provided in inviteMessage from BRI-1/BRI-3
WorkstepID  string --> as provided in inviteMessage from BRI-1/BRI-3

payloadObject
object: object --> as defined in communicated schame
proof: string                      
type: string --> Groth16 or Plonk
witness: object --> pubInput (object), verKey (object), proof (string), crs (either for Groth16 -- new for each time a proof is generated -- or based on the public PTau ceremony for PLONK that was chosen e.g. Aztec vs Polygon Hermez)

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