Commit Graph

161 Commits (d63a6cb93d9b03d74f3b0d0fdac3bfea3075a072)

Author SHA1 Message Date
Bogdan Opanchuk a338ff1a69 Don't return the signature along with the MessageKit from MessageKit.author() 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 41ae6dbcca Move message kits to policy submodule 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 161bb8f06d Use __bytes__ instead of to_bytes() in MessageKit 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 3ef534b812 Rename PolicyMessageKit to MessageKit 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 3b43eac717 Remove UmbralMessageKit alias 2021-09-07 11:58:55 -07:00
Kieran R. Prasch 024bcb1c5f Finish deprecation of map storage from tests. 2021-08-20 16:58:58 -07:00
Bogdan Opanchuk 6164137610 Rename m -> threshold, num_kfrags -> shares 2021-08-20 19:26:56 -04:00
Bogdan Opanchuk c595850952 RFCs, part 2 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk caf32842b3 RFCs 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk ad2ad8e3c0 Make HRAC a class and use it as a policy ID 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk 509b8c1bfc Split treasure maps into decrypted and encrypted 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk 5b5cd4bd84 Use HRAC as treasure map ID at all times instead of just in the blockchain case 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk 2be3d727d5 Rename TreasureMap field and datastore model to EncryptedTreasureMap 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk 8c628da9ea Extract kfrag authorization into a class 2021-08-12 16:34:05 -07:00
Bogdan Opanchuk e5c0bb079e Fix the remainders of Alice/Publisher separation 2021-08-12 16:32:02 -07:00
Bogdan Opanchuk cc156b28e3 Move retrieve() argument deserialization to `BobInterface` 2021-08-12 16:32:02 -07:00
derekpierre e83128fd91 One potential solution for contextualizing federated vs non-federated treasure maps provided as bytes in the `/publish_treasure_map` endpoint.
The context information is provided either at construction time of the TreasureMap field, or via the parent Schema context.
2021-07-26 15:14:42 -04:00
derekpierre 589ddff4de Initial refactoring of "character control"; abstract what is now "character control" into a general "base control" from which "character control" can sub-class. 2021-07-26 15:14:42 -04:00
Kieran R. Prasch 6192c34c3d Renames relayer -> publisher. 2021-07-06 14:43:35 -07:00
Kieran R. Prasch 8f8b79aa08 Responding to RFCs in PR #2687. 2021-07-06 14:43:31 -07:00
Kieran R. Prasch 3367ac5a50 Post-rebase cleanup for PR #2701 2021-07-03 19:05:24 -07:00
Kieran Prasch c915a1b1d3 Use umbral adapter everywhere. Fixes straggler uses of umbral 0.1.x 2021-07-03 18:51:07 -07:00
Kieran Prasch 81ca745bfa Fixes incorrect splitter in map versioning and grant test assertion. 2021-07-03 18:48:54 -07:00
Bogdan Opanchuk 7642300fe0 Rebase fixes for rebased-chili-limes (#28)
* Fix PRETask serialization

* Use a constant for encrypted kfrag length

* Fix argument order in Signature.verify()

* Remove a too brittle check in test_bob_handles_frags

What exactly are we ensuring here? If we want to check that the cfrag is fine,
we need to use it for decryption.

* Remove an unnecessary check

The result of `reencrypt()` is verified by default.

* Re-raise Umbral decryption errors as DecryptionFailed

* Fix an argument of _filter_work_orders_and_capsules()

* Fix an assertion in test_federated_grant_and_revoke

Assertion fails because now UmbralMessageKit has __len__,
so a bool() call is equivalent to len() == 0
(which it is, since there are no cfrags attached).
2021-07-03 18:48:26 -07:00
Kieran Prasch 4e7ea984f0 Post-rebase integration with PR #2612 and Umbral 0.2.x 2021-07-03 18:48:24 -07:00
Kieran Prasch e13fae0526 Combating freefriders and evil Bobs with a KFrag writ authorization. 2021-07-03 18:46:36 -07:00
Kieran Prasch a22b403a08 Partial tets update for modified map and order handling; Continue handling of publisher/authorizer keys. 2021-07-03 18:40:10 -07:00
Kieran Prasch 2b299cf993 Sing-along with david - use HRAC for workorders. 2021-07-03 17:50:43 -07:00
David Núñez fed1b4aba8 Let's go for the moment with TMaps with KFrags and Arrangement IDs 2021-07-03 17:50:43 -07:00
Kieran R. Prasch 6aef077172 bulk renaming of Keyring -> Keystore 2021-06-28 14:33:31 -07:00
Bogdan Opanchuk cd11909d4e Adjust for a slightly stricter API of Rust Umbral 2021-06-22 18:31:10 -07:00
Bogdan Opanchuk 15333ddca2 Dissolve umbral_adapter 2021-06-17 14:38:51 -07:00
Bogdan Opanchuk e6fcdbbff6 Minimal fixes to make CI pass, using an adapter for Umbral 2021-06-17 14:38:51 -07:00
Bogdan Opanchuk 4de9b91d2a Refactor FleetSensor 2021-02-16 22:45:55 -08:00
Bogdan Opanchuk a2b99daa1d Merge proposals and enactment into a single method, return EnactedPolicy 2021-01-14 11:19:35 -08:00
Bogdan Opanchuk de0f933118 Make Arrangement stateless and get rid of BlockchainArrangement 2021-01-14 11:19:35 -08:00
Bogdan Opanchuk 61253968fc Simplify the reencryption loop 2020-12-18 15:19:43 -08:00
Bogdan Opanchuk 08c7f83548 Remove an unnecessary alternative of passing a treasure map via map_id
Every time it happens the actual map object is also available.
2020-12-15 14:04:32 -08:00
Kieran R. Prasch 912e2b1c46
Revert signed treasure map changes for federated policies. 2020-12-09 00:13:38 -08:00
Kieran Prasch ba8cae96eb Respond to RFCs in PR #2389 2020-10-19 15:56:14 -07:00
tuxxy c965f72c2e Fix DoS vector on nodes through map storage 2020-10-13 10:01:37 +02:00
tuxxy 5962cd4c05 Prune expired treasure maps in __prune_datastore (formerly __prune_arrangements) 2020-10-13 10:01:37 +02:00
David Núñez 064972e800 Some unit tests reorganization 2020-09-24 20:27:13 +02:00
David Núñez 4cf7dcadc3 We're done with multiple domains, for the moment.
Closes #2144. Closes #1580.
2020-09-24 20:27:13 +02:00
jMyles 6498992f61 Deduplicating test; moving json validation utils to utils. 2020-08-24 09:42:15 -07:00
jMyles d7b8254b36 Since this doens't block, it's possible that Bob hasn't actually connected to *any* nodes yet. 2020-08-18 12:05:58 -07:00
jMyles 34a5ad910d Removing stale debugging tooling. 2020-08-18 12:05:55 -07:00
jMyles a448903bbb This makes more sense, because you might block the main thread in a test, and then the Ursula can't process the request. 2020-08-10 12:54:05 -07:00
jMyles 8cd182e26d Stopping Bob and Ursula at appropriate times. 2020-08-10 12:53:33 -07:00
jMyles 78eb904c10 Flagging test bob's origins for inspection on other threads. 2020-08-10 12:53:33 -07:00
jMyles ea092fd4d3 Using lonely_ursula_maker in all the right places. 2020-08-10 12:51:49 -07:00
jMyles a3a21ff49e The number of known nodes might be a bit variable at this point; we're really concerned that he has only connected to 2. 2020-08-10 12:49:26 -07:00
jMyles 295518033e Refining both test and threadpooling. Looking pretty good now. 2020-08-10 12:45:22 -07:00
jMyles 3e9cf80386 Splitting test logic to show when the problem is with Bob or with Alice. 2020-08-10 12:39:59 -07:00
tuxxy b1817cc9f2 Remove Ursula.work_orders and replace its use with queries to the datastore 2020-08-10 15:38:13 +02:00
tuxxy 52038e36dc Create a MockLMDBEnv w/ fixture and fix up some tests
Patch the PolicyArrangement model to fix discovery phase tests
2020-08-10 15:38:12 +02:00
tuxxy 846625d917 Replace as much old datastore logic as possible 2020-08-10 15:37:30 +02:00
Kieran Prasch 5909c37dd1 Apply API and interface updates to for enrico file handling. 2020-06-18 08:55:21 -07:00
damon 6d79d8db7b test fixes resulting from change in keys 2020-06-17 11:31:48 -07:00
damon 9d65b242e8 message -> plaintext 2020-06-17 00:08:48 -07:00
Kieran Prasch 28cce2fccc Reorganize tests into multiple suites. 2020-05-27 14:11:25 -07:00