mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
9575b72a01
This PR provides a basic API for ledger client to create contracts with down/up-grade support. One can send a create Command where the payload contains - (upgrade path) less fields than requires by the package definition (as long as the missing fields are optional), in such case the engine assume those fields are None - (downgrade path) more fields than requires by the package definition (additional field should be node), in such case the engine drop those fields. Here are some restrictions we assume for this first step: - For the sake of simplicity, we forbid field reordering when upgrade is enable - The package of explicit disclosed contract is required - we ignore package ID complelty inside value (probably not what we want in final version)
35 KiB
35 KiB
Security tests, by category
Authorization:
- auth and auth-* should not be set together for the trigger service: CliConfigTest.scala
- badly-authorized create is rejected: AuthorizationSpec.scala
- badly-authorized exercise is rejected: AuthorizationSpec.scala
- badly-authorized exercise/create (create is unauthorized) is rejected: AuthPropagationSpec.scala
- badly-authorized exercise/create (exercise is unauthorized) is rejected: AuthPropagationSpec.scala
- badly-authorized exercise/exercise (no implicit authority from outer exercise) is rejected: AuthPropagationSpec.scala
- badly-authorized fetch is rejected: AuthorizationSpec.scala
- badly-authorized lookup is rejected: AuthorizationSpec.scala
- create with no signatories is rejected: AuthorizationSpec.scala
- create with non-signatory maintainers is rejected: AuthorizationSpec.scala
- error on specifying both authCommonUri and authInternalUri/authExternalUri for the trigger service: AuthorizationConfigTest.scala
- error on specifying only authInternalUri and no authExternalUri for the trigger service: AuthorizationConfigTest.scala
- exercise with no controllers is rejected: AuthorizationSpec.scala
- well-authorized create is accepted: AuthorizationSpec.scala
- well-authorized exercise is accepted: AuthorizationSpec.scala
- well-authorized exercise/create is accepted: AuthPropagationSpec.scala
- well-authorized exercise/exercise is accepted: AuthPropagationSpec.scala
- well-authorized fetch is accepted: AuthorizationSpec.scala
- well-authorized lookup is accepted: AuthorizationSpec.scala
Availability:
- Tail call optimization: Tail recursion does not blow the scala JVM stack.: TailCallTest.scala
Confidentiality:
- ensure correct privacy for create node: BlindingSpec.scala
- ensure correct privacy for exercise node (consuming): BlindingSpec.scala
- ensure correct privacy for exercise node (non-consuming): BlindingSpec.scala
- ensure correct privacy for exercise subtree: BlindingSpec.scala
- ensure correct privacy for fetch node: BlindingSpec.scala
- ensure correct privacy for lookup-by-key node (found): BlindingSpec.scala
- ensure correct privacy for lookup-by-key node (not-found): BlindingSpec.scala
- ensure correct privacy for rollback subtree: BlindingSpec.scala
Integrity:
- Evaluation order of create with authorization failure: EvaluationOrderTest.scala
- Evaluation order of create with contract ID in contract key: EvaluationOrderTest.scala
- Evaluation order of create with contract key exceeding max nesting: EvaluationOrderTest.scala
- Evaluation order of create with create argument exceeding max nesting: EvaluationOrderTest.scala
- Evaluation order of create with duplicate contract key: EvaluationOrderTest.scala
- Evaluation order of create with empty contract key maintainers: EvaluationOrderTest.scala
- Evaluation order of create with failed precondition: EvaluationOrderTest.scala
- Evaluation order of create_interface with authorization failure: EvaluationOrderTest.scala
- Evaluation order of create_interface with contract ID in contract key: EvaluationOrderTest.scala
- Evaluation order of create_interface with contract key exceeding max nesting: EvaluationOrderTest.scala
- Evaluation order of create_interface with create argument exceeding max nesting: EvaluationOrderTest.scala
- Evaluation order of create_interface with duplicate contract key: EvaluationOrderTest.scala
- Evaluation order of create_interface with empty contract key maintainers: EvaluationOrderTest.scala
- Evaluation order of create_interface with failed precondition: EvaluationOrderTest.scala
- Evaluation order of exercise by interface of a cached global contract that does not implement the interface.: EvaluationOrderTest.scala
- Evaluation order of exercise by interface of an inactive global contract: EvaluationOrderTest.scala
- Evaluation order of exercise by interface of cached global contract with failed authorization: EvaluationOrderTest.scala
- Evaluation order of exercise of a cached global contract with failure authorization: EvaluationOrderTest.scala
- Evaluation order of exercise of a non-cached global contract with failure authorization: EvaluationOrderTest.scala
- Evaluation order of exercise of a non-cached global contract with inconsistent key: EvaluationOrderTest.scala
- Evaluation order of exercise of a wrongly typed cached global contract: EvaluationOrderTest.scala
- Evaluation order of exercise of a wrongly typed non-cached global contract: EvaluationOrderTest.scala
- Evaluation order of exercise of an inactive global contract: EvaluationOrderTest.scala
- Evaluation order of exercise of an inactive local contract: EvaluationOrderTest.scala
- Evaluation order of exercise of an unknown contract: EvaluationOrderTest.scala
- Evaluation order of exercise of an wrongly typed local contract: EvaluationOrderTest.scala
- Evaluation order of exercise of cached global contract with failure authorization: EvaluationOrderTest.scala
- Evaluation order of exercise with argument exceeding max nesting: EvaluationOrderTest.scala
- Evaluation order of exercise with output exceeding max nesting: EvaluationOrderTest.scala
- Evaluation order of exercise-by-key of a cached global contract with visibility failure: EvaluationOrderTest.scala
- Evaluation order of exercise-by-key of a non-cached global contract with visibility failure: EvaluationOrderTest.scala
- Evaluation order of exercise_by_key of a cached global contract with failure authorization: EvaluationOrderTest.scala
- Evaluation order of exercise_by_key of a local contract with visibility failure: EvaluationOrderTest.scala
- Evaluation order of exercise_by_key of a non-cached global contract with failure authorization: EvaluationOrderTest.scala
- Evaluation order of exercise_by_key of a wrongly typed cached global contract: EvaluationOrderTest.scala
- Evaluation order of exercise_by_key of an inactive global contract: EvaluationOrderTest.scala
- Evaluation order of exercise_by_key of an inactive local contract: EvaluationOrderTest.scala
- Evaluation order of exercise_by_key of an unknown contract: EvaluationOrderTest.scala
- Evaluation order of exercise_by_key of cached global contract with failure authorization: EvaluationOrderTest.scala
- Evaluation order of exercise_by_key with argument exceeding max nesting: EvaluationOrderTest.scala
- Evaluation order of exercise_by_key with contract ID in contract key: EvaluationOrderTest.scala
- Evaluation order of exercise_by_key with result exceeding max nesting: EvaluationOrderTest.scala
- Evaluation order of exercise_interface of a cached local contract with failed authorization: EvaluationOrderTest.scala
- Evaluation order of exercise_interface of a non-cached global contract with failed authorization: EvaluationOrderTest.scala
- Evaluation order of exercise_interface of an inactive local contract: EvaluationOrderTest.scala
- Evaluation order of exercise_interface of an local contract not implementing the interface: EvaluationOrderTest.scala
- Evaluation order of exercise_vy_key with empty contract key maintainers: EvaluationOrderTest.scala
- Evaluation order of fetch of a cached global contract with failure authorization: EvaluationOrderTest.scala
- Evaluation order of fetch of a non-cached global contract with failure authorization: EvaluationOrderTest.scala
- Evaluation order of fetch of a non-cached global contract with inconsistent key: EvaluationOrderTest.scala
- Evaluation order of fetch of a wrongly typed cached global contract: EvaluationOrderTest.scala
- Evaluation order of fetch of a wrongly typed disclosed contract: EvaluationOrderTest.scala
- Evaluation order of fetch of a wrongly typed non-cached global contract: EvaluationOrderTest.scala
- Evaluation order of fetch of an inactive global contract: EvaluationOrderTest.scala
- Evaluation order of fetch of an inactive local contract: EvaluationOrderTest.scala
- Evaluation order of fetch of an unknown contract: EvaluationOrderTest.scala
- Evaluation order of fetch of an wrongly typed local contract: EvaluationOrderTest.scala
- Evaluation order of fetch of cached global contract with failure authorization: EvaluationOrderTest.scala
- Evaluation order of fetch-by-key of a cached global contract with visibility failure: EvaluationOrderTest.scala
- Evaluation order of fetch-by-key of a non-cached global contract with visibility failure: EvaluationOrderTest.scala
- Evaluation order of fetch_by_key of a cached global contract with authorization failure: EvaluationOrderTest.scala
- Evaluation order of fetch_by_key of a local contract with authorization failure: EvaluationOrderTest.scala
- Evaluation order of fetch_by_key of a non-cached global contract with authorization failure: EvaluationOrderTest.scala
- Evaluation order of fetch_by_key of an inactive global contract: EvaluationOrderTest.scala
- Evaluation order of fetch_by_key of an inactive global contract: EvaluationOrderTest.scala
- Evaluation order of fetch_by_key of an unknown contract key: EvaluationOrderTest.scala
- Evaluation order of fetch_by_key with contract ID in contract key: EvaluationOrderTest.scala
- Evaluation order of fetch_by_key with contract key exceeding max nesting: EvaluationOrderTest.scala
- Evaluation order of fetch_by_key with empty contract key maintainers: EvaluationOrderTest.scala
- Evaluation order of fetch_interface of a cached global contract not implementing the interface.: EvaluationOrderTest.scala
- Evaluation order of fetch_interface of a cached global contract with failure authorization: EvaluationOrderTest.scala
- Evaluation order of fetch_interface of a non-cached global contract that doesn't implement interface.: EvaluationOrderTest.scala
- Evaluation order of fetch_interface of a non-cached global contract with failed authorization: EvaluationOrderTest.scala
- Evaluation order of fetch_interface of an inactive global contract: EvaluationOrderTest.scala
- Evaluation order of fetch_interface of an inactive local contract: EvaluationOrderTest.scala
- Evaluation order of fetch_interface of an local contract not implementing the interface: EvaluationOrderTest.scala
- Evaluation order of fetch_interface of an unknown contract: EvaluationOrderTest.scala
- Evaluation order of fetch_interface of cached global contract with failure authorization: EvaluationOrderTest.scala
- Evaluation order of lookup of a cached global contract with visibility failure: EvaluationOrderTest.scala
- Evaluation order of lookup of a non-cached global contract with visibility failure: EvaluationOrderTest.scala
- Evaluation order of lookup_by_key of a cached global contract with authorization failure: EvaluationOrderTest.scala
- Evaluation order of lookup_by_key of a local contract with authorization failure: EvaluationOrderTest.scala
- Evaluation order of lookup_by_key of a local contract with failure authorization: EvaluationOrderTest.scala
- Evaluation order of lookup_by_key of a non-cached global contract with authorization failure: EvaluationOrderTest.scala
- Evaluation order of lookup_by_key of an inactive global contract: EvaluationOrderTest.scala
- Evaluation order of lookup_by_key of an inactive local contract: EvaluationOrderTest.scala
- Evaluation order of lookup_by_key of an unknown contract key: EvaluationOrderTest.scala
- Evaluation order of lookup_by_key with contract ID in contract key: EvaluationOrderTest.scala
- Evaluation order of lookup_by_key with contract key exceeding max nesting: EvaluationOrderTest.scala
- Evaluation order of lookup_by_key with empty contract key maintainers: EvaluationOrderTest.scala
- Evaluation order of successful create: EvaluationOrderTest.scala
- Evaluation order of successful create_interface: EvaluationOrderTest.scala
- Evaluation order of successful exercise by interface of a non-cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful exercise of a cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful exercise of a local contract: EvaluationOrderTest.scala
- Evaluation order of successful exercise of a non-cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful exercise_by_key of a cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful exercise_by_key of a local contract: EvaluationOrderTest.scala
- Evaluation order of successful exercise_by_key of a non-cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful exercise_interface of a cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful exercise_interface of a local contract: EvaluationOrderTest.scala
- Evaluation order of successful fetch of a cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful fetch of a local contract: EvaluationOrderTest.scala
- Evaluation order of successful fetch of a non-cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful fetch_by_key of a cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful fetch_by_key of a local contract: EvaluationOrderTest.scala
- Evaluation order of successful fetch_by_key of a non-cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful fetch_interface of a cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful fetch_interface of a local contract: EvaluationOrderTest.scala
- Evaluation order of successful fetch_interface of a non-cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful lookup_by_key of a cached global contract: EvaluationOrderTest.scala
- Evaluation order of successful lookup_by_key of a local contract: EvaluationOrderTest.scala
- Evaluation order of successful lookup_by_key of a non-cached global contract: EvaluationOrderTest.scala
- Exceptions, throw/catch.: ExceptionTest.scala
- Rollback creates cannot be exercise: EngineTest.scala
- This checks that type checking in exercise_interface is done after checking activeness.: EvaluationOrderTest.scala
- This checks that type checking is done after checking activeness.: EvaluationOrderTest.scala
- This checks that type checking is done after checking activeness.: EvaluationOrderTest.scala
- contract key behaviour (non-unique mode): ContractKeySpec.scala
- contract key behaviour (unique mode): ContractKeySpec.scala
- contract keys must have a non-empty set of maintainers: ContractKeySpec.scala
- contract keys should be evaluated after ensure clause: ContractKeySpec.scala
- contract keys should be evaluated only when executing create: ContractKeySpec.scala
- ensure builtin operators have the correct type: TypingSpec.scala
- ensure expression forms have the correct type: TypingSpec.scala
- exercise-by-interface command is rejected for a: ApiCommandPreprocessorSpec.scala
- exercise_interface with a contract instance that does not implement the interface fails.: EvaluationOrderTest.scala
- ill-formed create API command is rejected: ApiCommandPreprocessorSpec.scala
- ill-formed create replay command is rejected: ReplayCommandPreprocessorSpec.scala
- ill-formed create-and-exercise API command is rejected: ApiCommandPreprocessorSpec.scala
- ill-formed exception definitions are rejected: TypingSpec.scala
- ill-formed exercise API command is rejected: ApiCommandPreprocessorSpec.scala
- ill-formed exercise replay command is rejected: ReplayCommandPreprocessorSpec.scala
- ill-formed exercise-by-key API command is rejected: ApiCommandPreprocessorSpec.scala
- ill-formed exercise-by-key replay command is rejected: ReplayCommandPreprocessorSpec.scala
- ill-formed expressions are rejected: TypingSpec.scala
- ill-formed fetch command is rejected: ReplayCommandPreprocessorSpec.scala
- ill-formed fetch-by-key command is rejected: ReplayCommandPreprocessorSpec.scala
- ill-formed interfaces are rejected: TypingSpec.scala
- ill-formed kinds are rejected: TypingSpec.scala
- ill-formed lookup command is rejected: ReplayCommandPreprocessorSpec.scala
- ill-formed records are rejected: TypingSpec.scala
- ill-formed templates are rejected: TypingSpec.scala
- ill-formed type synonyms applications are rejected: TypingSpec.scala
- ill-formed type synonyms definitions are rejected: TypingSpec.scala
- ill-formed types are rejected: TypingSpec.scala
- ill-formed variants are rejected: TypingSpec.scala
- well formed create API command is accepted: ApiCommandPreprocessorSpec.scala
- well formed create replay command is accepted: ReplayCommandPreprocessorSpec.scala
- well formed create-and-exercise API command is accepted: ApiCommandPreprocessorSpec.scala
- well formed exercise API command is accepted: ApiCommandPreprocessorSpec.scala
- well formed exercise replay command is accepted: ReplayCommandPreprocessorSpec.scala
- well formed exercise-by-interface command is accepted: ApiCommandPreprocessorSpec.scala
- well formed exercise-by-key API command is accepted: ApiCommandPreprocessorSpec.scala
- well formed exercise-by-key command is accepted: ReplayCommandPreprocessorSpec.scala
- well formed fetch replay command is accepted: ReplayCommandPreprocessorSpec.scala
- well formed fetch-by-key replay command is accepted: ReplayCommandPreprocessorSpec.scala
- well formed lookup replay command is accepted: ReplayCommandPreprocessorSpec.scala