View Issue Details

IDProjectCategoryView StatusLast Update
0006365Talerspecificationpublic2021-08-24 14:23
ReporterFlorian Dold Assigned Tojonathanbuchanan Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.8Fixed in Version0.8 
Summary0006365: allow "forgettable" fields in contract terms
DescriptionWith some fields in the contract terms, the merchant doesn't really have any good reason to store them long term.
For example, it can be reasonably expected that the merchant deletes the delivery address after the delivery happened.

However, when the delivery address is in the contract terms, deleting this part would change the hash of the contract terms.

Thus, some fields of the contract terms should be "forgettable", in the sense that only the hash counts, and the merchant can delete the plain value after it is not needed anymore.

E-mail citation for a possible generic solution below.

-----------------

Would make sense to have parts of the contract terms that are
"forgettable". It makes computing the contract terms hash harder
though, so we should agree on some sensible, generic rules where we
don't have to change to much to make more parts forgettable!

I'd propose the following scheme that makes introducing this rather cheap:

{
  delivery_location: {
    country: "Switzerland",
    city: "Zurich",
    street: "Foostreet",
  },
  _forgettable: ["delivery_location"],
}

and

{
  delivery_location: null,
  _forgotten: {
    delivery_location: <hash of forgotten delivery_location>
  }
}

have *exactly* the same hash code. At the same time, the
"forgettability" is completely transparent to applications that don't
care about it!
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2020-07-15 22:53

manager   ~0016463

We need a salt to make brute-forcing forgettable parts impossible. I propose that the salt is included in the forgettable attribute, thus:


{
  delivery_location: {
    country: "Switzerland",
    city: "Zurich",
    street: "Foostreet",
  },
  _forgettable: { "delivery_location" : "SALTVALUE" } ,
}

Christian Grothoff

2020-07-15 23:58

manager   ~0016464

Draft implementation done in 90e756dd..e1ad498b, needs testing.

Christian Grothoff

2020-07-16 12:52

manager   ~0016466

Implemented in 5658c4c5..c326a5bd. Needs wallet support and a merchant API.

For the merchant API, I'm thinking of an endpoint
PATCH /private/order/$ORDER_ID/forget
where the uploaded JSON includes an array of paths to fields to forget. Those must have already been forgettable (otherwise 409 conflict). We need paths as we may want to forget some attributed deeply nested inside of an object or array inside of the contract. For the path specification, I think the 'jq' command line tool includes a good design for the syntax.

Christian Grothoff

2020-07-16 12:53

manager   ~0016467

Jonathan: please draft a specification for such an endpoint (docs.git), and then after review by Florian or myself, please implement it. This has a low priority at this point, so feel free to pick it up when it fits your mood.

jonathanbuchanan

2020-07-22 19:40

reporter   ~0016502

Implemented as of 68978c9..0314d6d.

Issue History

Date ModifiedUsernameFieldChange
2020-06-04 15:45Florian DoldNew Issue
2020-06-04 15:45Florian DoldStatusnew => assigned
2020-06-04 15:45Florian DoldAssigned To => Marcello Stanisci
2020-07-15 18:44Christian GrothoffAssigned ToMarcello Stanisci => Christian Grothoff
2020-07-15 22:27Christian GrothoffSeverityminor => feature
2020-07-15 22:53Christian GrothoffNote Added: 0016463
2020-07-15 23:58Christian GrothoffNote Added: 0016464
2020-07-16 12:52Christian GrothoffNote Added: 0016466
2020-07-16 12:52Christian GrothoffAssigned ToChristian Grothoff => jonathanbuchanan
2020-07-16 12:53Christian GrothoffNote Added: 0016467
2020-07-22 19:40jonathanbuchananStatusassigned => informing
2020-07-22 19:40jonathanbuchananResolutionopen => fixed
2020-07-22 19:40jonathanbuchananNote Added: 0016502
2020-07-22 20:03Christian GrothoffProduct Version => git (master)
2020-07-22 20:03Christian GrothoffFixed in Version => 0.8
2020-07-22 20:03Christian GrothoffTarget Version => 0.8
2021-08-24 14:23Christian GrothoffStatusinforming => closed
2024-01-12 13:02Christian GrothoffCategorymerchant backend API (HTTP specification) => specification