Commit Graph

465 Commits (ede371eede6f53450dfdb65baf1ce9fc1c8e52d7)

Author SHA1 Message Date
Bogdan Opanchuk e5e598952a Extract NodeMetadata into the core 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 01c2e9bd71 Move RetrievalKit to core.py 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 256c93db58 Move [Encrypted]TreasureMap to core.py 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk a3410cadfb Move MessageKit to the temporary core module 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 18454c721e Use a single InvalidSignature exception instead of three different ones 2021-10-15 15:19:19 -07:00
derekpierre 949f3f8884 Fix failing test. 2021-10-13 14:44:48 -04:00
derekpierre 21212653f9 Allow more flexibility for CORS origins to be specified. CLI takes a comma-separated list, that can include regexes, and Porter with NGINX can configure conditionals for allowing origins. 2021-10-13 13:13:52 -04:00
derekpierre 9853509716 Make CORS allow origins opt-in by default (instead of opt-out and having '*' as the default).
Ensure that empty string for --allow-origins equates to cors not enabled.
Add tests for CORS CLI option.
2021-10-08 11:32:47 -04:00
Kieran Prasch c6b2ace28b Correct renamed umbral signature kwarg. 2021-09-23 16:01:25 -07:00
KPrasch 5582a9fd79
Merge pull request #2768 from derekpierre/porter-retrieval
Update Porter endpoint for retrieval
2021-09-19 14:31:47 -07:00
derekpierre a653751d13 Document cleanup regarding retrieval results format, and improve testing for mutliple retrieval kits. 2021-09-17 11:12:48 -04:00
Bogdan Opanchuk defa0e7c75 Fix deprecation warnings 2021-09-15 13:12:21 -07:00
derekpierre adb8f17b99 Updated Bob's RetrieveAndDecrypt schema and associated CLI to accept a list of message kits since the respective Python API was modified to accept a list of message kits.
Cleaned up Bob's retrieve_and_decrypt CLI code to account for updated required options - there was code that was based on some options not being required
Adjusted associated tests.
2021-09-14 15:58:08 -04:00
derekpierre 90408c1768 Publisher verifying key is no longer an argument for RetrievalClient - remove usage from Porter. 2021-09-14 15:58:08 -04:00
derekpierre 7f20fbdc7b Try not to use Bob python api to decrypt results of retrieve_cfrags. 2021-09-14 15:58:08 -04:00
derekpierre b0267ee9f8 Remove unnecessary decryption of treasure map in porter retrieve_cfrags tests. 2021-09-14 15:58:08 -04:00
derekpierre eb48e82fc3 VerifiedCapsuleFrag cannot be deserialized, so rename marshmallow field to CapsuleFrag.
Improve retreive_cfrags test to ensure that the cfrags are valid and can successfully be used by Bob to decrypt the data.
2021-09-14 15:58:08 -04:00
derekpierre dfa65a2976 Code cleanup after rebase over retrieval protocol work in #2730. 2021-09-14 15:58:08 -04:00
derekpierre 4568fc1f5a Ensure that /retrieve_cfrags can be executed using url query parameters. 2021-09-14 15:58:08 -04:00
derekpierre 001dd39ac2 Improve Porter retrieve_cfrags tests to ensure that capsules match in results. 2021-09-14 15:58:08 -04:00
derekpierre d2c3b7a1f9 Make Porter Web endpoints return error status codes instead of exceptions in tests. 2021-09-14 15:58:08 -04:00
derekpierre ff6b1bae98 Encrypted and Decrypted treasure map fields. 2021-09-14 15:58:08 -04:00
derekpierre 2cd7698da7 Fix failing tests with respect to treasure map needed for bob's retrieve endpoint. 2021-09-14 15:58:08 -04:00
derekpierre 2fec681e66 Skip Porter exec_work_order tests; they'll be reworked for the new retrieve protocol. 2021-09-14 15:58:08 -04:00
Bogdan Opanchuk 1a10ddf7e7 Remove `EncryptedTreasureMap` datastore model 2021-09-08 08:55:49 -07:00
Bogdan Opanchuk bb31fac083 Remove the unused Bob.matching_nodes_among() and related machinery/tests 2021-09-08 08:23:46 -07:00
Bogdan Opanchuk 66175a04da Rename Bob.retrieve_cfrags()/retrieve() to avoid confusion with RetrievalClient.retrieve_cfrags() 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk 1ad868bf41 Remove internal cfrag cache from Bob 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk da816586fa Remove "enrico" as a parameter to Bob.retrieve(); make "policy_encrypting_key" mandatory. 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk 0f85435ac7 Require encrypted_treasure_map in retrieve() 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk 1d3642d960 Retrieval rework 2021-09-08 08:21:03 -07:00
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
derekpierre 731013aa92 Add special case for WorkerPoolExceptions in WebController to handle response message - ensure WorkerPoolExceptions provide access to relevant data. 2021-08-25 19:53:30 -04:00
derekpierre 8b748dea52 Allow WorkerPool failure tracebacks to accessed directly from the exceptions raised. If callers need more context they can use the get_tracebacks() function on the exception to obtain all execution failure tracebacks. 2021-08-25 19:53:27 -04:00
derekpierre aa8df5ea2a Fixed failing concurrency tests. 2021-08-25 19:52:11 -04:00
Kieran R. Prasch a3f8df66fc RFCs for PR #2780 pt. II 2021-08-25 12:08:35 -07:00
Kieran R. Prasch 18c9f849b7 Respond to RFCs in PR #2780; Additional map publication removals. Middleware raises detailed 400-level exceptions. 2021-08-23 20:57:18 -07:00
Kieran R. Prasch f64dca21bb Introduce --treasure-map CLI flag to the Bob CLI. 2021-08-22 10:12:52 -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
KPrasch ed67bbcd7b
Merge pull request #2777 from KPrasch/main
Relock Dependencies
2021-08-18 15:43:09 -07:00
Kieran R. Prasch 1f7ee94489 Update eth_account Transaction API imports. 2021-08-17 15:34:44 -07:00
Bogdan Opanchuk e5c0bb079e Fix the remainders of Alice/Publisher separation 2021-08-12 16:32:02 -07:00
Piotr Roslaniec 6b687b527f Fix test 2021-08-06 18:11:28 +02:00
Piotr Roslaniec e357fe2f38 Pass Path as str to CLI in tests 2021-08-06 18:11:26 +02:00
Piotr Roslaniec 09e90d17fa Remove remaining 'str' usage 2021-08-06 18:10:43 +02:00
Piotr Roslaniec 113a6db0ac Fix tests after rebase 2021-08-06 18:10:22 +02:00
Piotr Roslaniec 97c6b66052 Fix tests 2021-08-06 18:10:22 +02:00
Piotr Roslaniec cb8e092ef1 Use click instead of custom wrapper 2021-08-06 18:10:22 +02:00
Piotr Roslaniec a8975ff41d Fix tests 2021-08-06 18:10:22 +02:00
Piotr Roslaniec 662bc34439 Use Path methods instead of os module 2021-08-06 18:10:22 +02:00
Piotr Roslaniec 6a270c1713 Use pathlib 2021-08-06 18:10:20 +02:00
derekpierre def9ef1116 Ensure that url query parameters in tests are url encoded. Added note about url encoding in docs.
Add unit test for Base64BytesRepresentation field.
Cleanup imports.
2021-07-26 15:14:43 -04:00
derekpierre 463078ce0d Fix issues after TMapConKFrag rebase including how work orders are created and used for tests. exec_work_order tests now actually use /reencrypt ursulas endpoints. 2021-07-26 15:14:43 -04:00
derekpierre 1baa05ba3f Initial implementation of Porter '/exec_work_order' functionality and tests.
Some code refactoring.
2021-07-26 15:14:43 -04:00
derekpierre 25f3db3355 Use query parameters for GET methods; updated tests for stringlist and query parameters. 2021-07-26 15:14:43 -04:00
derekpierre d31f5938ca Fix imports and function calls after rebasing over latest changes (TMapConKFrags and umbral_adapter).
Fix incompatible treasure map data used in tests.
2021-07-26 15:14:43 -04:00
derekpierre e8f0e20400 Add Basic Authentication tests. 2021-07-26 15:14:43 -04:00
derekpierre 0720f7ca51 Modify --certificate-filepath option to instead be --tls-certificate-filepath. 2021-07-26 15:14:42 -04:00
derekpierre 8babb11e96 Add acceptance cli tests for porter. 2021-07-26 15:14:42 -04: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 5b2984fd74 Improve treasuremap validation for rest api, and some code cleanup.
Added rpc and web control tests for porter.
2021-07-26 15:14:42 -04:00
derekpierre 34fbc058d6 Make duration_period for get_ursulas optional on the Learner object for federated mode (not changed for rest api). 2021-07-26 15:14:42 -04:00
derekpierre dbeec7f1ae Add integration and acceptance tests for porter functionality.
Remove unused 'publish_treasure_map' parameter from _enact() function.
Loosen validation on treasure map id which can be 32 bytes (federated) or 16 bytes (non-federated). Probably only care about non-federated but for ease of testing, federated really helps.
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
Bogdan Opanchuk c13b8213ec Add a more informative message to WorkerPool.OutOfValues/TimedOut 2021-07-12 16:24:35 -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
jMyles 39d322909d Standardizing message signatures sizes in logic as a constant. 2021-07-03 18:46:50 -07:00
jMyles b1ff1077cd Seems like we want to revoke the same policy that's made in this test here. 2021-07-03 18:46:50 -07:00
jMyles 993a4265c7 Needs to be 65 bytes, not 64. 2021-07-03 18:46:50 -07:00
Kieran Prasch 94217c43d3 tests passing 2021-07-03 18:46:37 -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
David Núñez 11052a6124 DecentralizedTreasureMaps were renamed SignedTreasureMaps a while ago 2021-07-03 17:47:32 -07:00
Kieran Prasch 8a54bd7e6d Post rebase cleanup for PR #2612; Umbral 0.2.x compatibility. 2021-06-30 15:14:10 -07:00
Kieran Prasch 3253ab9694 Index node metadata by stamp instead of checksum address. Further decouples wallet address from node identity. 2021-06-28 14:33:31 -07:00
Kieran R. Prasch 4f7bdf5c46 tests respect the Keystore API 2021-06-28 14:33:31 -07:00
Kieran R. Prasch e3868df4d1 Handle TLS power derivation form keystore. 2021-06-28 14:33:31 -07:00
Kieran R. Prasch 6aef077172 bulk renaming of Keyring -> Keystore 2021-06-28 14:33:31 -07:00
Bogdan Opanchuk 6090a755b0 Gate the choice of Umbral implementation in a single file 2021-06-22 18:31:08 -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
derekpierre e61cec703a Fix stray prometheus imports/tests that should only be performed when prometheus_client is installed; prometheus is an optional dependency. 2021-05-21 14:27:33 -04:00
David Núñez 520a648c96
Merge pull request #2699 from fjarri/adjudicator-delenda-est
Remove IndisputableEvidence and related machinery
2021-05-20 15:33:38 +02:00
Bogdan Opanchuk 26076b1d98 Remove IndisputableEvidence and related functions and tests 2021-05-18 13:14:04 -07:00
Piotr Roslaniec 85252edf13 Properly skip test 2021-05-14 09:22:06 +02:00
Piotr Roslaniec dc7f067bb0 Skip a long-running test 2021-05-12 21:33:34 +02:00
Piotr Roslaniec 9c8ac9ab45 Fix test 2021-05-12 14:40:30 +02:00
Piotr Roslaniec c65b96b7a6 Rename test file 2021-05-12 08:37:34 +02:00