fluree / db

Fluree database library
https://fluree.github.io/db/
Other
340 stars 22 forks source link

support transaction signing #230

Open dpetran opened 2 years ago

dpetran commented 2 years ago

HTTP Sigs for client requests Transaction server signs unsigned requests Authority signing Verifiable Credentials

cap10morgan commented 1 year ago

It might make sense to have a separate issue for some or all of these

mpoffald commented 1 year ago

Currently blocked. Need concrete acceptance criteria from Nexus for MVP in order to break down this ticket.

bplatz commented 1 year ago

Nexus uses the underlying Fluree auth - they simply give an optional proxy for it to allow for use of HTTP Bearer tokens - something we would not allow in Fluree Core.

We do need a spec for this... and it involves at least: 1) Persist original TX (which includes signature) to disk for verifiers. Historically we recorded this as their own Flakes but excluded them for the indexes (which they would bloat). I think them living as their own immutable files makes the most sense. 2) Add relevant parts of TX as flake metadata (using the 't' value, as we do for the timestamp, etc. today). I think this includes a ref to the did that signed the tx (which should exist in the ledger), a tx-id (hash of the tx), and a tx-address (physical storage key of the tx...eg. if on IPFS, the IPFS address). These should be included in the respective commit file, so we need to add some new keys to the existing format. 3) Format of the signed transaction. Historically this was our command format, but this would be more consistent with Fluree New and more standardized to use JSON-LD+Verifiable Credential. Our old command format was effectively a proprietary Verifiable Credential - as VCs didn't exist when we created it.

mpoffald commented 1 year ago

Blocked on design of https://github.com/fluree/ledger/issues/202