Commit Graph

4047 Commits (2135d32885b759b22e079b2ba6acf001f1beff2d)

Author SHA1 Message Date
derekpierre 2135d32885
Add tests to ensure that cryptography exception during transcript generation / verification does not get propagated during ritual ceremony. 2024-07-29 16:38:34 -04:00
KPrasch 98fb407e77
more graceful handling of intentional node crashing 2024-07-29 22:58:42 +07:00
KPrasch 270d6b9f40
extract ferveo key mismatch detection on startup to a method for improved mocking capability 2024-07-29 22:23:50 +07:00
KPrasch 7263001db6
formalizes FerveoKeyMismatch includes acceptance test for mismatch conditions; updates mocks to handle key mismatch 2024-07-29 21:05:00 +07:00
KPrasch 7df326a85d
Reproduces ferveo key mismatch in automated testing 2024-07-29 21:05:00 +07:00
Manuel Montenegro 56b503c5e9
Add a test that checks if a bad cohort fails 2024-07-29 21:05:00 +07:00
KPrasch f258496bae
Merge pull request #3522 from derekpierre/2-hour
EIP4361 freshness check ignores `not-before` value in SIWE message for freshness check; only `issued-at` is used
2024-07-29 19:53:55 +07:00
derekpierre a0f21e8f4d
Fix ordering in failing tests - chain id needs to be set before creating EthereumClient. 2024-07-26 13:11:12 -04:00
derekpierre 392506648d
Ensure that issued-at value is not in the future.
Add respective test.
2024-07-24 11:20:12 -04:00
derekpierre 607e667350
Update test for EIP712 authentication when address from signature does not match expected address. 2024-07-24 10:54:38 -04:00
derekpierre 3853075407
Update EIP4361 authentication tests now that issued_at is the sole reference point for checking freshness. 2024-07-24 10:54:22 -04:00
derekpierre 796c29377d
Update use of SiweMessage object given breaking changes in updated siwe library.
Update tests accordingly including testing did URIs.
2024-07-16 09:38:15 -04:00
derekpierre 4a409ab958
Rename integration test to have a unique name from acceptance test. 2024-07-16 09:32:28 -04:00
derekpierre 1a1ba746fc
Generate the EIP712 test auth message on the fly instead of having a fixed message/signature combination. 2024-07-04 13:54:20 -04:00
derekpierre 167669c3c9
Separate fixtures for EIP4361 and EIP712 messages, and update tests accordingly. This will make things easier once we fully remove EIP712 support in the future. 2024-07-04 13:54:17 -04:00
derekpierre 22bf9df1ad
Removal of unnecessary/no longer needed special context variables for EVM wallet authentication. These were never released publicly (local to v7.4.x branch) so no compatibility concerns removing them. 2024-07-04 13:53:22 -04:00
derekpierre 28df8b851f
Respond to RFCs for #3513. 2024-06-24 08:10:36 -04:00
derekpierre 184de55bfc
Handle context variable for EIP4361 auth signature, where the SIWE message and signature were passed through from the 3rd party app, and not created by TACo itself. 2024-06-21 12:17:00 -04:00
derekpierre 59d42b7b2e
Some code reorg that leaves space for additional authentication types other than EVM. 2024-06-06 15:48:45 -04:00
KPrasch 3b3263a57d
Merge pull request #3496 from KPrasch/rpc
Default RPC endpoints for Condition Evaluation
2024-06-05 15:52:19 +02:00
KPrasch 2d8a5baf1b
linting 2024-05-30 11:01:50 +02:00
derekpierre 0214471462
Allow any valid user authentication scheme for `:userAddress` context variable processing. 2024-05-29 09:46:37 -04:00
derekpierre fa47141801
Update context tests to use auth message fixture to generate customized context with relevant user address context variables. 2024-05-28 14:31:22 -04:00
derekpierre a3f1328a02
Update authentication tests based on rename of auth scheme to EIP4361 from SIWE. 2024-05-28 14:31:21 -04:00
derekpierre 8d9bb3f9c0
Separate authentication message fixture from user context dictionary - provides more flexibility for testing. 2024-05-28 14:31:19 -04:00
derekpierre ff84b0f40c
Move user address tests out of test_conditions and into test_context module. 2024-05-28 14:31:17 -04:00
derekpierre f89cffd328
Adjust freshness check to occur after message verification, and skip if "not-before" is specified in the message. 2024-05-28 10:49:36 -04:00
KPrasch 1573f3f3ce
RPC healthcheck unit test coverage 2024-05-28 15:48:23 +02:00
KPrasch be515e26be
Relocate default RPC endpoint list to a standalone repository controlled by nucypher. 2024-05-28 15:48:23 +02:00
Kieran 48a8bf1e0f
lint 2024-05-28 15:48:23 +02:00
Kieran 76ef9fca83
initial mock to avoid RPC health checks to actual endpoints 2024-05-28 15:48:23 +02:00
derekpierre 0e83c1c158
Add a default freshness check for SIWE messages - this prevents perpetual reuse of the same SIWE message.
Improve auth exception messages and update tests to check for relevant messages.
Add tests for stale SIWE messages.
2024-05-16 19:46:42 -04:00
derekpierre 92b06eeb6e
Generate a fresh SIWE signature for tests. 2024-05-16 18:40:09 -04:00
derekpierre d699c93bf9
Make auth tests more maintainable by improving fixture parameter usage. 2024-05-15 16:52:06 -04:00
derekpierre c17614be65
Appease codecov by calling userAddress context directive directly during tests so that coverage is registered. 2024-05-15 16:40:00 -04:00
derekpierre 1a8d05a092
Add testing module for Auth/AuthScheme functionality. 2024-05-15 16:39:22 -04:00
derekpierre 147f783aa2
Update parameterization of fixture to make parameters used explicit instead of implicit - allows for more flexibility for specific tests. 2024-05-15 16:37:15 -04:00
derekpierre 09cf716f64
Incorporate SIWE-based user address context into tests. 2024-05-15 11:09:13 -04:00
derekpierre ce8352930a
Fix condition test based on changes - this was a case of invalid context variable vs verification failing. 2024-05-14 16:56:30 -04:00
derekpierre daaaf0e831
Make adjudicator fixture a fake contract for now. 2024-05-13 15:06:02 -04:00
derekpierre f39ba2bad3
Fix linter errors. 2024-05-13 14:43:35 -04:00
derekpierre 2409ef0e43
Add penaltyIncrement parameter to deployment/instantiation of TACoApplication contract for acceptance tests. 2024-05-13 14:43:34 -04:00
Kieran 05877e2084
compatibility changes for nucypher/nucypher-contracts #254 2024-05-13 14:43:27 -04:00
KPrasch df3b0b2666
Merge pull request #3409 from KPrasch/revoke
removes the `/revoke` endpoint
2024-05-07 09:24:45 -04:00
Kieran c529d71b35
Removal of auxilliary revocation usage. 2024-05-07 09:24:45 -04:00
Kieran Prasch b848282a03
Removes revocation test assertions. 2024-05-07 09:24:45 -04:00
derekpierre 031f484b85
Remove sign_transaction and sign_message from EthereumClient - clients shouldn't do any account management/signing.
Raise exceptions from Web3Signer if used for signing - an explicit signer should be used instead of this fallback.
Remove EthereumTesterClient since no longer needed and therefore from_w3() is no longer needed either; actual signer objects are used for signing transactions/messages in tests.
2024-04-29 16:33:18 -04:00
derekpierre d2c93f91cc
Update tests now that Web3Signer cannot be used for account management/signing. 2024-04-29 10:34:24 -04:00
derekpierre 0f0a39d242
Rename stake_provider(s)_account(s) -> staking_provider(s)_account(s). 2024-04-29 10:34:22 -04:00
derekpierre db1ff0eeee
Add simple test for ReservedTestAccountManager to ensure that accounts are appropriately organized. 2024-04-29 10:34:21 -04:00