Commit Graph

200 Commits

Author SHA1 Message Date
Alberto Arri
9176fcb8e6
Remove for good network map service node (#1942)
* [CORDA-446] Kill network map registration and fix NodeBasedTest
2017-10-30 11:45:52 +00:00
bpaunescu
04d8260e0f CORDA-351: force update dependencies and suppress vulnerabilities not… (#1944)
* CORDA-351: force update dependencies and suppress vulnerabilities not affecting corda

* CORDA-351: force update dependencies and suppress vulnerabilities not affecting corda
2017-10-26 12:16:57 +01:00
Katelyn Baker
cbc4003032 Merge pull request #1905 from corda/kat/feature/addEnterpriseAMQPIdentifier
Corda-725 - Change AMQP identifier
2017-10-20 10:21:19 +01:00
Andrzej Cichocki
005ce349a7 * Retire MockServiceHubInternal (#1909)
* Introduce rigorousMock
* Add test-utils and node-driver to generated documentation
2017-10-20 10:06:53 +01:00
Katelyn Baker
e6de0aa406 Review Comments 2017-10-19 16:19:42 +01:00
Katelyn Baker
1e05f27bae CORDA-725 - Change AMQP identifier to officially assigned value
This does change our header format so pre-cached test files need
regenerating
2017-10-19 12:01:39 +01:00
Alberto Arri
b33b013284 [CORDA-442] let Driver run without network map (#1890)
* [CORDA-442] let Driver run without network map

- Nodes started by driver run without a networkMapNode.

- Driver does not take a networkMapStartStrategy anymore

- a new parameter in the configuration "noNetworkMapServiceMode" allows for a node not to be a networkMapNode nor to connect to one.

- Driver now waits for each node to write its own NodeInfo file to disk and then copies it into each other node.

- When driver starts a node N, it waits for every node to be have N nodes in their network map.

Note: the code to copy around the NodeInfo files was already in DemoBench, the NodeInfoFilesCopier class was just moved from DemoBench into core (I'm very open to core not being the best place, please advise)
2017-10-18 13:49:32 +01:00
Viktor Kolomeyko
cac3057877 CORDA-540: Make Verifier work in AMQP mode (#1870) 2017-10-17 10:44:27 +01:00
Andrzej Cichocki
38cf4a489e CORDA-676 Eager cordapp schemas (#1839)
* Retire customSchemas.
* Key cordapp-to-hash map by url as native equality too strict.
2017-10-16 11:35:29 +01:00
Matthew Nesbit
899f7f9d0d Change the serialization/deserialization code of SessionMessage data to add more validation.
Address PR comments

As pointed out by Shams the SessionInit must be well formed at this point.
2017-10-11 15:17:48 +01:00
Chris Rankin
9cec137a31 CORDA-702: Don't whitelist certain non-annotated types (#1864)
* Don't whitelist arrays of non-serialisable types for RPC.
* Don't whitelist enums which have not been annotated as serialisable.
2017-10-11 11:17:14 +01:00
Viktor Kolomeyko
ef0f0acc4a Make integration tests pass in AMQP mode, part 1 (#1855) 2017-10-11 11:13:46 +01:00
Andrzej Cichocki
4ee250a19b Retire setCordappPackages. (#1860) 2017-10-11 10:35:21 +01:00
Shams Asari
bd53a22efa Removed extraAdvertisedServiceIds config
The remaining use for it was the finance CorDapp for permissioning CCY issuers. Instead this is now taken from a custom config in node.conf.
2017-10-10 13:47:37 +01:00
Tommy Lillehagen
14f959b4af Code clean-up run 2017-10-09 15:26:40 +01:00
Tommy Lillehagen
f98942d7ad Reformat files in node-api 2017-10-09 15:26:39 +01:00
Chris Rankin
689758a71c CORDA-644: Only serialise Kotlin lambdas when checkpointing. (#1801)
* Remove local function because it is serialised as a lambda.
* Don't automatically whitelist Kotlin lambdas unless checkpointing.
* Add comment to @CordaSerializable, warning not to allow AnnotationTarget.EXPRESSION.
2017-10-09 13:02:40 +01:00
Viktor Kolomeyko
a9508b393c CORDA-540: AMQP Private key serializer (#1838) 2017-10-09 11:22:11 +01:00
Viktor Kolomeyko
a425f82c77 CORDA-540: Change how standard mutable whitelists structured (#1814) 2017-10-09 10:19:37 +01:00
Shams Asari
727cd0e55c Cleaned up notary configuration by introducing a notary config option.
extraAdvertisedServiceIds is no longer used for this.
2017-10-07 12:52:37 +01:00
Viktor Kolomeyko
33ba145149 CORDA-540: Add verification to ensure that private keys can only be serialized with specific contexts (#1800) 2017-10-05 17:42:16 +01:00
Ross Nicoll
46532ccbcb Don't repackage well known key types (#1545)
* Don't repackage well known key types when converting keys to a well known type
* Remove custom key serializers
* Remove duplicate serializer registration
2017-10-05 09:14:00 +01:00
Viktor Kolomeyko
e2bb14da8e CORDA-540: AMQP specific fixes in "node-api" project (#1765) 2017-10-03 15:07:34 +01:00
Shams Asari
6c488fd6e0 Merge pull request #1783 from corda/shams-remove-network-map-service-type
Removed the network map service type as it's no longer needed.
2017-10-03 12:15:31 +01:00
Viktor Kolomeyko
c87e1045eb CORDA-540: Perform schema verification (#1672) 2017-10-03 11:47:53 +01:00
Shams Asari
457f95f188 Removed the network map service type as it's no longer needed.
The absence or presence of the networkMapService config is what determines if a node is the network map or not.
2017-10-03 11:32:37 +01:00
Clinton
2d53859745 Fixes bugs with contract constraints (#1696)
* Added schedulable flows to cordapp scanning

Fixed a bug where the core flows are included in every cordapp. Added a test to prove the scheduled flows are loaded correctly. Added scheduled flow support to cordapp.

Renabled broken test.

Fixed test to prove cordapps aren't retreived from network.

Review fixes.

Fixed a test issue caused by gradle having slightly different paths to IntelliJ

* Fixed test for real this time.
2017-10-02 17:54:32 +01:00
Rick Parker
9a16011448 * Move CompositeSignaturesWithKeys into net.corda.core.crypto package.
* Rename and move CordaPluginRegistry to reflect its real purpose now.
* Docs: docsite improvements
* Remove discussion of webserver from 'writing a cordapp' page.
* Fixup some flow docs.
* Add a couple more package descriptions.
* Review comments - always apply default whitelist and no longer load it via ServiceLoader
* Added wording about renaming services resource file
2017-10-02 16:03:07 +01:00
Viktor Kolomeyko
383eb2bef8 CORDA-540: Fix to make IRS demo code pass in AMQP mode (#1769)
* CORDA-540: Do not use concrete instance of an ArrayList as wire representation of it may be different

* CORDA-540: Make data structures suitable for AMQP serialization

* CORDA-540: Use "name" instead of "toString()"

Classes like "net.corda.finance.contracts.DayCountBasisDay" override "toString()" which leads to error behaviour
2017-10-02 15:59:31 +01:00
Rick Parker
7787896cbb Hide SerializationContext from public API on TransactionBuilder (#1715) 2017-09-29 13:13:38 +01:00
Viktor Kolomeyko
bdc3389206 CORDA-540: Fix exception type thrown in AMQP mode (#1680) 2017-09-29 12:23:40 +01:00
Matthew Nesbit
5fa7381883 Custom exceptions in corda, should either derive from an appropriate closely related java exception, or CordaException, or CordaRuntimeException. They should not inherit just from Exception, or RuntimeException.
Handle PR comments

Add nicer constructors to CordaException and CordaRuntimeException

(cherry picked from commit 89478c8)

Fix ambiguous defaulted constructor

(cherry picked from commit ec9bafe)

Address PR comment

Update a few more custom exceptions
2017-09-29 09:37:22 +01:00
Katelyn Baker
cfcc5aad67 CORDA-601 - Review Comments
So...

On reflection, and adding a number of tests for static initialisation
with serialised types it looks like there is no chance that the
serializer factory will ever pass a non white-listed type through to the
carpenter in the first place.

As such leaving the plumbing in as it may be useful to pass a blacklist
at some point into the carpenter and the tests are always useful
(ignoring those that won't work without the white-list checking)
2017-09-27 21:53:15 +01:00
Katelyn Baker
f59b22ba98 CORDA-601 - Carpenter should respect whitelist
The class carpenter should refuse to carpent classes that are not
whitelisted or marked as CordaSerializable. This prevents any security
issue where a malicious message could indicate a class had a member of
some type that on construction did something bad. By respecting the
whitelist we avoid this.

As the carpeter annotates anythign it constructs as CordaSerializable,
it will always be able to carpent classes that contain memebrs that were
unknown, and thus unannotated, carpented classes
2017-09-27 21:26:15 +01:00
Katelyn Baker
5ed755d3fe CORDA-653 - Serialised enums should respect whitelist (#1692) 2017-09-27 18:02:35 +01:00
Andras Slemmer
2054827528 Merge pull request #1650 from corda/aslemmer-rpc-delay-arg-deserialisation
Delay RPC arguments deserialisation to allow routing of errors
2017-09-27 13:47:19 +01:00
Andrzej Cichocki
9874e1ff34 uncheckedCast crusade (#1667) 2017-09-27 12:58:48 +01:00
Viktor Kolomeyko
8a842d1d53 CORDA-540: Ensure that covariance of type is handled correctly when serializing with AMQP (#1631) 2017-09-27 09:19:25 +01:00
Michele Sollecito
63168c0299 [CORDA-481]: GH 965: Java 8 lambdas don't work properly in checkpointing (#1619) 2017-09-26 13:22:59 +01:00
Andras Slemmer
9d115a2111 Delay RPC arguments deserialisation to allow routing of errors 2017-09-26 11:18:11 +01:00
Shams Asari
4df8b427d2 Removed SSLConfiguration parameter from CordaRPCClient, thus removing SSL support.
The current use of SSL RPC relies on access to the node's keystore file, and further to that some uses where using the NODE_USER to login on the p2p port.
2017-09-26 10:41:43 +01:00
Viktor Kolomeyko
b4e674c2fe CORDA-540: Implementation of path in the serialization graph (#1484) 2017-09-26 10:31:37 +01:00
Mike Hearn
20a9892123 RPC: Report failures during deserialisation of method arguments to the client as an exception. 2017-09-26 11:15:29 +02:00
Katelyn Baker
7c63597937 Merge pull request #1622 from corda/feature/kat/carpenterRespectWhitelist
CORDA-601 - Start adding whitelist support to the carpenter
2017-09-26 09:39:07 +01:00
Chris Rankin
8cc091b3e1 Transform Kotlin's EmptyList, EmptySet and EmptyMap into Java classes (#1550)
* Transform Kotlin's EmptyList, EmptySet and EmptyMap into Java classes before serialising them.
* Transform Kotlin's EmptyList, EmptySet and EmptyMap to their unmodifiable Java equivalents.
2017-09-26 08:33:30 +01:00
Clinton
532bbb5cca Contract constraints (#1518)
* Contract constraints and attachment loading

Fix compiler warnings.

Fixed IdentitySyncFlowTests in confidential-identities.

Fixes.

Fix AttachmentClassLoaderTests.

Added a TODO.

Renamed cordapp service.

Fix compilation error in java code.

Fix RaftNotaryServiceTests

Fix AttachmentLoadingTest

Fix DistributedServiceTests and LargeTransactionTests.

Add cordapp packages to Verifier tests.

Refactor DummyContractBackdoor back out of internal package.

Resolve compiler warnings.

Consolidate excluding `isolated` project at top-level.

Fix contract attachment serialisation for remote verifier.

Fix integration tests for client:rpc.

Contract constraints and attachment loading

Fix compiler warnings.

Fixed IdentitySyncFlowTests in confidential-identities.

Fixes.

Fix AttachmentClassLoaderTests.

Added a TODO.

Renamed cordapp service.

Fix compilation error in java code.

Fix example compilation.

Fix RaftNotaryServiceTests

Fix AttachmentLoadingTest

Fix DistributedServiceTests and LargeTransactionTests.

Add cordapp packages to Verifier tests.

Refactor DummyContractBackdoor back out of internal package.

Resolve compiler warnings.

Consolidate excluding `isolated` project at top-level.

Fix integration tests for client:rpc.

Fixed issues with node driver and differing ZIPs.

Review changes.

Refactor GeneratedAttachment into node-api module.

Merge branch 'clint/hash-constraint' of https://github.com/corda/corda into clint/hash-constraint

Fixed compile error following rebase.

wip - test to check that app code isn't loaded from attachments sent over the wire.

Use Kotlin copyTo() rather than Apache's IOUtils.

Fixes

more fixes.

Removing unconstrained output.

More fixes.

Fixed another test.

Added missing plugin definition in net.corda.core.node.CordaPluginRegistry: net.corda.finance.contracts.isolated.IsolatedPlugin

Re-added missing magic string used in unit test.

Remove unused FlowSession variable.

* Review fixes.

* More review fixes.

* Moved Cordapp implementation to an internal package.

* More JVMOverloads.
2017-09-25 17:05:18 +01:00
Chris Rankin
798f851def Replace Object with Any to fix Kotlin compiler warnings. (#1626)
* Replace Object with Any to fix compiler warnings.

* Fix shadowed name warnings.
2017-09-25 15:08:52 +01:00
Katelyn Baker
5a66433266 CORDA-601 - Start adding whitelist support to the carpenter
Set things up so that the carpenter must be constructed with a Corda
white list object. Right now we don't do anything with it but this will
capture all the changes in the tests to make it "jsut work" as is before
getting into the meat of the change

Externally this is a "no op" as the serialiser factory already takes a
white list as a construction parameter and the carpenter should use that
anyway
2017-09-22 17:47:43 +01:00
Shams Asari
31229b900a Moved serialisation code in client-rpc into internal packages (#1604) 2017-09-22 17:38:40 +01:00
Rick Parker
94a92fe82e CORDA-205: Added some missing types to the whitelist and removed KeyPair. (#1603)
* Added some missing types to the whitelist and removed `KeyPair`.

* Add emptyList/Map/Set for Java.  Also check for duplicates.

* Remove java singleton collections since they are already added via kotlin listOf/mapOf/setOf.
2017-09-22 17:36:49 +01:00