Skip to content

Conversation

@derekpierre derekpierre changed the title [WIP][EPIC][DO NOT MERGE] Signing Epic [WIP][EPIC] Signing Epic Jul 2, 2025
@derekpierre derekpierre changed the title [WIP][EPIC] Signing Epic [EPIC][WIP] Signing Epic Jul 2, 2025
@derekpierre derekpierre mentioned this pull request Jul 2, 2025
14 tasks
Muhammad-Altabba and others added 27 commits July 7, 2025 08:57
derekpierre and others added 11 commits August 5, 2025 11:37
…ching

- Add ContextVariableCondition class supporting various comparison operators
- Add context variable schema with validation for context parameters
- Integrate ContextVariableCondition into condition factory
- Add comprehensive test suite with 194 lines of validation tests
- Deprecate AddressAllowlistCondition in favor of more flexible approach
- Update test utilities with new condition test objects

ContextVariableCondition provides enhanced flexibility for context-based
access control with support for ==, >, <, >=, <=, \!=, in, \!in operators.
- Add missing testContextVariableConditionObj with proper schema structure
- Remove invalid returnValueTest from testAddressAllowlistConditionObj
- Delete AddressAllowlistCondition class, schema, and test files
- Remove from condition factory, exports, and schema utilities
- Remove AddressAllowlistCondition examples and integration tests
- Clean up test utilities removing deprecated objects
- Change condition type from 'variable-match' to 'context-variable'
- Update schema descriptions and add ReturnValueTest description
- Enhance tests with it.each() parameterized structure
- Add integration test validation and update documentation
- Import conditions module to access ContextVariableCondition class
- Create condition instance properly before passing to ConditionExpression
- Resolves 'toObj is not a function' error in integration test
- Apply consistent formatting to context variable files
- Fix trailing whitespace and missing newlines
- Organize imports in proper order
- Improve test formatting and structure
Co-authored-by: Derek Pierre <[email protected]>
…n tests

Add comprehensive integration tests for ContextVariableCondition in encrypt/decrypt workflows:
- Test successful encrypt/decrypt with valid userAddress in allowlist
- Test failure case when userAddress is not in allowlist
- Verify proper authentication flow with EIP4361AuthProvider
- Ensure context parameter validation works correctly

Tests validate end-to-end functionality of context variable conditions
in real TACo encrypt/decrypt operations.
theref and others added 18 commits September 30, 2025 15:59
Add JsonCondition for direct JSON data evaluation without HTTP requests.

Features:
- Accepts JSON data as objects, arrays, primitives, or strings
- Optional JSONPath query support for value extraction
- Context variable resolution in queries and return values
- Zod schema validation with jsonConditionSchema

This parallels the JsonCondition implementation added to nucypher
and provides TypeScript support for the new condition type.
Add JsonCondition to ConditionFactory.conditionFromProps() to enable
condition creation from serialized JSON condition objects.

This completes the integration of JsonCondition into the taco-web
condition system.
Add comprehensive test coverage for JsonCondition:

Unit tests (15 tests):
- Schema validation for various data types (object, array, primitives)
- JSONPath query validation (valid and invalid paths)
- Context variable support
- Error handling for invalid condition types

Integration test:
- Backend compatibility validation via Lynx nodes

Includes testJsonConditionObj in test-utils for reusability.
- Remove unused first parameter in parameterized test cases
- Add test for JSON-looking strings to verify they remain as strings
- Improve test description formatting to show actual data values

Addresses code review feedback from @cygnusv
The data field must now be a context variable that resolves to JSON at
decryption time, matching the updated nucypher implementation.

- Update jsonConditionSchema to use contextParamSchema for data field
- Update all tests to use context variable format (:jsonData)
- Add test to verify non-context variable data is rejected
- Update test-utils testJsonConditionObj
Add tests that verify JsonCondition works end-to-end with context
variable resolution during encryption and decryption:

- Test successful decrypt when JSON data matches condition
- Test failed decrypt when JSON data doesn't match condition
Export jsonConditionSchema in zod-doc-gen and regenerate condition
schemas markdown to include JsonCondition documentation.
…variable (within SequentialCondition) and return value test.
…st and condition variable (sequential condition).
… on a variable/result.

Update tests and schema docs accordingly.
…e to possible expensive nature of operation and possible ddos vector.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants