-
Notifications
You must be signed in to change notification settings - Fork 23
[EPIC][WIP] Signing Epic #674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
derekpierre
wants to merge
194
commits into
epic-v0.7.x
Choose a base branch
from
signing-epic
base: epic-v0.7.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Manuel Montenegro <[email protected]>
Co-authored-by: Derek Pierre <[email protected]>
…ific public addresses (#665)
…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.
a69f20b
to
884ffea
Compare
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).
…able to schema-docs via script.
… 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of PR:
Required reviews:
What this does:
authorizationType
#677