Commit Graph

845 Commits

Author SHA1 Message Date
Viktor Kolomeyko
b60ab70440 CORDA-2617: Add failover listeners to terminate node process (#5337)
* CORDA-2617: Add failover listeners to terminate node process

This is a backport of changes done in Corda Enterprise.

It will be triggered in case of:
a) Loss of connectivity to in-built Artemis for Bridge Control;
b) Loss of connectivity to in-built Artemis for P2P connectivity.

Note on merge to CE: Disregard these changes and take whatever CE already has.

* CORDA-2617: Update documentation on stability of Corda Node

* CORDA-2617: Documentation update after discussion with @mnesbit
2019-08-06 11:28:16 +01:00
Dan Newton
34368bf0d5 CORDA-2216 Restrict extended key usage of certificate types (#5294)
* CORDA-2216 Restrict extended key usage of certificate types

- Remove `anyExtendedKeyUsage` from all certificates
- Restrict to server and client auth for all certificates except
  `ROOT_CA` which has had all extended key usages removed

* CORDA-2216 Update certificate types

- Remove server authentication from all certificates except for TLS
- Add client authentication to all certificates except for ROOT
2019-07-30 15:32:12 +01:00
Viktor Kolomeyko
4e66885cf9 CORDA-1937: Do not ignore alias parameter passed in. (#5314)
By now we were lucky because all the time `X509Utilities.CORDA_ROOT_CA` been used as an input parameter.
2019-07-19 21:47:52 +01:00
josecoll
b4749eb8f9
CORDA-2991 (Cont): set node info polling interval to 1 second in DriverDSL Node Startup (#5285)
* Fix test execution flakiness on fast hardware: set node info polling interval to 1 second in DriverDSL Node Startup (was only being set to 1 sec in Node Registration). Follow-up to https://github.com/corda/corda/pull/5240

* Diagnostics: add additional logging to NodeInfoFilersCopier.

* Diagnostics: add additional logging to NodeInfoWatcher

* Downgrade logging level severity to debug.

* Make atomic counter unique across instances.
2019-07-17 14:48:46 +01:00
Viktor Kolomeyko
e96dcedfc6 CORDA-3068: Pass base directory when resolving relative paths (#5297) 2019-07-15 10:51:39 +01:00
Ryan Fowler
76631132ca ENT-3827: Temporarily disable the HSM timeouts (#5291) 2019-07-10 18:08:22 +01:00
Dan Newton
9bcaecfbe3 Delete unused DuplicateContractClassException (#5284) 2019-07-10 17:01:38 +01:00
Dominic Fox
14a20654bd CORDA-2991 shorten poll intervals for node info file propagation (#5240)
* CORDA-2991 shorten poll intervals for node info file propagation

* Relax minimum poll time constraint

* Relax, not comment out, minimum poll time constraint

* Correct error message
2019-07-03 15:00:55 +01:00
fowlerrr
6df142bf7a ENT-3658, ENT-3660: Add timeouts and hospital flow handling to CryptoServices (#5226) 2019-07-03 12:39:32 +01:00
Manoj
44835bd17c CORDA-2914: Allow certificate directory to be a symlink (#5102) 2019-07-03 10:39:40 +01:00
Viktor Kolomeyko
51f1e442a3 CORDA-3021: Introduce SignOnlyCryptoService and use it whenever possible (#5239)
* CORDA-3021: Introduce `SignOnlyCryptoService` and use it whenever possible

Also modify `CryptoServiceFactory` to show how sign only implementation can be created.

* CORDA-3021: Undo some of my earlier changes

Which after discussion with @dimosr and @fowlerrr proven to be contradictory.
2019-06-27 11:55:59 +01:00
bpaunescu
726798cce8 ENT-3642: move the crypto service builder method to node-api (#5198)
* ENT-3642: move the crypto service builder method to node-api

* ENT-3642: add arg for different crypto services

* ENT-3642: add arg for cryptoservice config

* ENT-3642: add null check for BCC requirement

* ENT-3642: remove double-bang operator

* ENT-3642: cryptoservice factory method moved to its own class, improve API

* ENT-3642: remove import
2019-06-07 09:10:42 +01:00
josecoll
0263650a5f
Revert "Merge pull request #5145 from corda/jdk11-migration-gradle5-upgrade" (#5146)
This reverts commit f46377556c, reversing
changes made to ba675e73b9.
2019-05-20 16:16:49 +01:00
josecoll
53ab00d91c Revert -Djava.security.debug=provider 2019-05-20 15:09:36 +01:00
josecoll
2d9ee1d582 Enhanced JDK security debugging for JCA provider(s).
Used whilst investigating "Unrecognized algorithm for signature parameters SHA256withECDSA" JDK bug using Bouncy Castle.
2019-05-20 15:08:27 +01:00
josecoll
cdbf7fa830 Remove usage of private JDK class "sun.security.rsa.RSAPrivateCrtKeyImpl" (REVISIT) 2019-05-20 15:08:27 +01:00
josecoll
1b3f0efa96 Included TLS 1.3 unit tests (see https://r3-cev.atlassian.net/browse/CORDA-2801) 2019-05-20 15:08:27 +01:00
Chris Rankin
b9f7c1a08a CORDA-2893, ENT-3422: Tweak JUnit 5 configurations to keep vintage engine off compile classpaths. (#5138)
* Tweak JUnit 5 configurations to keep vintage engine off compile classpaths.

* Configure Gradle tests to use JUnit 5.
2019-05-20 11:57:56 +01:00
Tudor Malene
688c742706 CORDA-2934 disable hibernate validator integration with hibernate (#5130) 2019-05-20 11:45:03 +01:00
Dominic Fox
0b63157a4b ENT-3422 Add JUnit 5 dependencies to all projects (#5084)
* ENT-3422 Add JUnit 5 dependencies to all projects

* Remove explicit junit 4 imports where not needed

* Minor PR fixes

* Limit import scope
2019-05-15 16:40:12 +01:00
Viktor Kolomeyko
355604457f CORDA-2935: Align timeouts for CRL retrieval and TLS handshake (#5125) 2019-05-15 09:19:51 +01:00
rui-r3
9e3a0a64ac CORDA-2491: Ability to specify Java package namespace from Cordform (#5075)
Add entry point with generic extra configuration options. Move configuration verification code to avoid circular dependencies.
2019-05-09 17:25:21 +01:00
Matthew Nesbit
7bcff70864
Update the proton-j library to latest version (#5105) 2019-05-08 13:04:49 +01:00
JamesHR3
c533792f3f [CORDA-2866] Prevent node startup if legal identity key is lost but node key isn't (#5090) 2019-05-07 11:49:29 +01:00
James Brown
2365276597 ENT-3541 remove unused commons-fileupload dep (#5086) 2019-05-02 12:08:23 +01:00
Adel El-Beik
46c073d212 CORDA-2882: Added ability to specify signature scheme when signing. (#5050)
* CORDA-2882: Added ability to specify signature scheme when signing.

* CORDA-2882: Sign operation with algo specified does not now use Crypto service.

* CORDA-2882: Added jvmoverloads for sign operation.

* CORDA-2882: Removed unused imports.
2019-04-26 10:01:43 +01:00
rui-r3
864a355e63 CORDA-2651 Remove null values from changelog list (#5022)
* CORDA-2651 Check if resources are in classpath before passing them to Liquibase

* CORDA-2651 Add missing stop

* CORDA-2651 Change exception type. Improve exception log message.

* CORDA-2651 Add null check when getting resources from class loader

* CORDA-2651 Do not include null values in the changelog list
2019-04-23 10:24:47 +01:00
Viktor Kolomeyko
97d1c80e30 CORDA-2801: Test to check compatibility between TLS 1.2 and TLS 1.3 (#4993)
The test is currently disabled till we move to Java 11 (or beyond) when TLS 1.3 becomes available as part of JDK.
Local testing been performed with Open JDK 12 (12+33) and the test is passing.
2019-04-15 09:51:44 +01:00
Shams Asari
a8861fd18d
Revert "CORDA-2651 Check if resources are in classpath (#4999)" (#5013)
This reverts commit 87720163
2019-04-12 16:27:43 +01:00
Adel El-Beik
367c98ec7c ENT-3482: Move BC crypto service implementation to node api. (#5008)
* ENT-3482: Move BC crypto service implementation to node api.

* ENT-3482: Added missing unit test.
2019-04-12 11:35:12 +01:00
rui-r3
87720163f8 CORDA-2651 Check if resources are in classpath (#4999) 2019-04-11 14:38:10 +01:00
Thomas Schroeter
dc46446432 [CORDA-2807] Don't retry db transaction in AbstactNode start (#4942)
Retries can lead to confusing error messages in case the CFT notary is
misconfigured and throws a SQLException causing a retry.
2019-03-29 09:41:39 +00:00
Dominic Fox
c2ad64ccde CORDA-2802 use eventually to wait (#4932)
* CORDA-2802 use eventually to wait

* Catch Exception, not Throwable
2019-03-26 16:01:06 +00:00
JamesHR3
b3b184c93e [CORDA-2701] Ensure crlCheckSoftFail config option is respected (#4854)
* Plumb through the crlCheckSoftFail configuration option to bridge manager

* Add crlCheckSoftFail test to bridge manager and fix equivalent proton wrapper test

* Update documentation and set the node configuration default to true

* Revert default change and clarify consequences of setting option to false

* Remove NodeConfiguration default to leave only AMQPConfiguration default
2019-03-08 16:23:07 +00:00
Rick Parker
1c38ecee7b
ENT-3256 Small performance enhancement and OS preparation for ENT changes (#4857) 2019-03-07 14:47:51 +00:00
szymonsztuka
9da30b431f CORDA-2554 - Bootstrapper - option to include contracts to whitelist from signed JARs (#4712)
* NetworkBoostrapper can optionally whitelist contracts from signed jars based on include_whitelist.txt file.

* refactoring, docs

* logs

* add ne parameters to the generateWhitelist method at the end

* Addressing review comments.

* CORDA-2577 disable non-downgrade rule - test fix and docs
2019-03-04 11:01:08 +00:00
Chris Rankin
8306b3f708 CORDA-2676: Allow more Network Bootstrapper code to be unloaded from JVM. 2019-03-02 17:43:26 +01:00
James Brown
a18e44ed8f ENT-3025 Thread-safe liquibase migrations 2019-03-02 17:38:49 +01:00
Rick Parker
adad7862d6
ENT-3187 Check that we're not calling toList on concurrent collections (#4828)
* ENT-3165 Kotlin toList() does not work on concurrent collections.  OS backport.

ENT-3165 Added comment.

* ENT-3187 Additional use of toList() on concurrent data structure.
2019-02-28 16:01:33 +00:00
Tommy Lillehagen
8fb3d4dc01
CORDA-2669 - Reintroduce pendingFlowsCount (#4806)
* CORDA-2669 - pendingFlowsCount not in public API

Reintroduce `pendingFlowsCount` to public API (as deprecated). Advise
to use the `gracefulShutdown` command in the shell instead.

* CORDA-2669 - Add pendingFlowsCount to api-current.txt
2019-02-23 17:10:32 +00:00
Rick Parker
6c4433d0b5 CORDA-2646 - Database connection pools leaking memory on every checkpoint (#4773)
* ENT-3053 Database connection pools leaking memory on every checkpoint. Flip in the thread local from the thread into the fiber.

* Back port to OS (needs some gradle changes) and added TODO, ability for it to avoid erroring if not using Hikari.

* Review feedback to remove warning.
2019-02-20 11:28:32 +00:00
JamesHR3
efabab35c4 [CORDA-2636] Ensure states created with contract upgrades can be migrated (#4786)
* Ensure states created with contract upgrades can be migrated

* Remove line from api-current.txt representing an uncallable constructor
2019-02-19 09:48:39 +00:00
JamesHR3
092d66ac45 [CORDA-2591] Prevent spurious logs in AttachmentVersionNumberMigration (#4765)
* Handle case where file containing network parameters is missing

* Improve logging if attachments are not available and the file path doesn't exist

* Get logs the right way around

* Fix build error in tests
2019-02-16 07:54:07 +00:00
JamesHR3
4e2a295eb6
[CORDA-2487] Provide a migration for vault states when moving from V3 to V4.1 (#4699)
* Create a new custom migration for populating the state_party table and the relevancy_status column within the vault_states table when migrating from V3 to V4.

* Add a corresponding unit test suite.

* Small refactorings to expose data required by the migration: the isRelevant function in the NodeVaultService, and the node's legal name from the configuration.
2019-02-12 15:22:15 +00:00
Thomas Schroeter
cdac97120a
[CORDA-2547] Migrate table of SimpleNotaryService (#4722)
* CORDA-2547: WIP Migrate old notary schema correctly.

Modify liquibase scripts to rename the old committed state table instead of creating a new one.

* Rename liquibase change sets

* Change 3.3 baseline before Liquibase.

* Aligin with ENT, orginal node-notary.changelog-v1.xml moved to node-notary.changelog-v2.xml and it's compatible with ENT (which already has changes from v2).

* Aligin with ENT, orginal node-notary.changelog-v1.xml moved to node-notary.changelog-v2.xml and it's compatible with ENT (which already has changes from v2) - adding v2 to master file.

* Ensure setting up Liquibase on pre-existing pre-Liquibase database
2019-02-08 16:30:02 +00:00
josecoll
099a747ebf
CORDA-2526 Allow for duplicate signed attachments in devMode (#4691)
* Allow for duplicate (contract class, version) signed attachments in devMode.

* Code clean-up.

* Fix compilation error in test code.

* Additional gating/warning and added Unit test for development mode behaviour.
2019-01-31 14:41:23 +00:00
Rick Parker
7dc7313fb7
ENT-3000 Start pooling classpath scanning and related fixes (#4664)
* Start pooling classpath scanning

Quickly patch synchronisation of attachment class loader cache.  Needs a revisit but more complicated due to DJVM.

Annotate away for DJVM

Take ClassGraph utils into their own file so we can exclude for DJVM

Clean up a little

* Daemonize the threads

* Seems to be some concurrency problems with use of ClassGraph.  Using a mutex for now to work around.
2019-01-30 10:35:20 +00:00
JamesHR3
22462cc1e8
[CORDA-1596] Improve error message when CorDapp schema changes (#4506)
* Raise schema exceptions with better error

* Add test and use new exceptions
2019-01-29 08:17:05 +00:00
szymonsztuka
f7a6463424
Fix Liquibase AttachmentVersionNumberMigration failure when system property is not provided or was set wrongly (a String "null" and not null) (#4632)
When system property is not provided or was set wrongly (a String with text "null" and not null reference).
2019-01-24 18:19:39 +00:00
josecoll
100a6fcb56
CORDA-2475 Adjust attachments query logic to return correct results (#4612)
* CORDA-2475 Adjust attachments query logic to return correct results sets for signed/unsigned jars.

* Updates following PR review feedback by RP.
2019-01-22 22:57:43 +00:00
szymonsztuka
26cfea202b
CORDA-2450 Creating attachment version from whitelisted JARs fails for node upgrade (#4593)
Upgrade from node 3.0 to 4.0 fails to create versions of whitelisted JARs from networkParameters - read parameters from file at first as in Corda 3.0 there no relevant table, then try from the table.
As this is migration, the code will run only once on each node, she increased log level to info for messages. Tested using https://r3-cev.atlassian.net/browse/R3T-1549
2019-01-17 17:26:24 +00:00
Tudor Malene
76182f29d3
Optimize contracts scanning (#4580) 2019-01-15 13:29:38 +00:00
Christian Sailer
3ba2ef3092
Make the AMQP bridge individually ACK artemis messages (so that we don't have to wait for an ack flush or end up with ack'd messages queued up). (#4568) 2019-01-14 15:32:08 +00:00
szymonsztuka
7a4b6b3e44
CORDA-2405 Update versions of whitelisted attachments (#4549)
The version of contract attachments that are whitelisted should be read from NetworkParameters.whitelistedContractImplementations.
It use the lattes network map from db with the highest epoch.
2019-01-13 11:38:19 +00:00
szymonsztuka
9b8fda0d6d
CORDA-2375 Ensure node has unique attachment contract classname/version from signed JARs (#4535)
Corda Node ensures a given contract class and version can be sourced from only one signed and trusted Attachment (JAR).
An attempt to import a signed JAR as a trusted uploader (or promote to be trusted) with a class and version already present in the other trusted Attachment will raise DuplicateContractClassException.

Minor fixes to Hibernate Attachment Query parser (original query to select attachment without signers would always return no attachments)
2019-01-10 14:13:00 +00:00
Tudor Malene
60388a7a45
Add additional transactionality check. (#4530)
* Add additional transactionality check.

* Fix logic
2019-01-09 21:13:06 +00:00
Andrius Dagys
fa025dedeb
ENT-2822: Move experimental raft and bft-smart notaries back into node, fix reference state support (#4509)
Move Raft and BFT-Smart notaries back into node to preserve backwards compatibility.

* Allow overriding full node config when using internal mock network parameters.

* Make BFT-Smart notary start up in prod mode as well

* Move raft & bftsmart notaries to net.corda.notary.experimental package

* Make sure Raft notary handles reference state edge cases correctly.

* Make sure BFT-Smart notary handles reference state edge cases correctly.

* Include notary schemas in node internal schemas

* Undo Raft notary table schema changes to maintain compatibility.
2019-01-09 15:52:42 +00:00
josecoll
4530a5e982
CORDA-2395 Add cordapp code signing dev key to production blacklist. (#4519)
* Add cordapp code signing dev key to production blacklist.

* Remove code used to generate the actual PK hash (it is now attached to the JIRA story)

* Remove wiki page reference.

* Remove the non redundant cash transfer.
2019-01-09 15:41:24 +00:00
Tudor Malene
d33cb16c5e
ENT-2923 - remove db access code from the verification thread pool (#4504)
* ENT-2923 - remove db access code from the verification thread pool

* Remove worker pool for tx verification and disable db access.

* Address code review comments
2019-01-08 14:37:26 +00:00
Shams Asari
2622c8fe51
CORDA-1942: Renamed NetworkParametersStorage to NetworkParametersService to match its public usage (#4487)
As a public API it's not a true storage - CorDapps can't add network parameters.
2019-01-03 08:52:39 +00:00
Tudor Malene
ee9251bd25
CORDA-2327 add attachments for missing dependencies (#4456)
* CORDA-2327 first draft - add attachments for missing dependencies

* CORDA-2327 draft - fix unit tests

* CORDA-2327 draft - some cleanup.

* CORDA-2327 fix test

* CORDA-2327 fix test

* CORDA-2327 fix test

* CORDA-2327 Address code review comments

* CORDA-2327 fix api

* Address code review comments

* CORDA-2327 Address code review comments

* CORDA-2327 Address code review comments

* Fix merge

* Address code review comments
2019-01-02 16:16:53 +00:00
Shams Asari
60d215aaa8
Fixed incorrect usages of assertFailsWith (#4458)
The overload that takes in a String does NOT check that the exception thrown has that message, which is what these tests are assuming. Rather it's the assertion message when the test fails.
2018-12-24 09:44:48 +00:00
Shams Asari
830959c9f7
CORDA-2345: Simplified TestCordapp to make it inline with the recent CorDapp versioning changes (#4434)
TestCordapp has now two implementations to clearly separate the two use cases it has in the Corda repo:

* TestCordappImpl which implements the revised public API of TestCordapp; namely that a TestCordapp instance references a real CorDapp jar on the classpath. This is either an external dependency jar in which case it’s taken as is and given to the node, or it’s a local gradle project in which case it’s compiled using the gradle “jar” task to generate the CorDapp jar. This approach means the jar has all the original CorDapp versioning information, which is important that it’s correct when testing. To this end, TestCordapp only needs to expose the ability to specify the app’s config. All the remaining properties have moved to CustomCordapp.

* CustomCordapp for creating arbitrary custom CorDapps, including specifying the jar’s MANIFEST values. This is internal API and only used for testing the platform. Technically this shouldn’t implement TestCordapp but does so to reduce the complexity of the driver and mock network.
2018-12-20 09:49:58 +00:00
Matthew Nesbit
36bff744dc
Suppress core.server.lambda$channelActive$0 - AMQ224088 error from load balancer type connections. Note TLS handshake timeouts still occur, but do so silently. (#4432) 2018-12-18 15:58:53 +00:00
Rick Parker
20e5bbf56f
ENT-2848 Add caching to contract attachment versions (#4410)
* Refactor into attachment service

Fix up mock service

First caching version, but with no invalidation currently

Set cache size

Fix up after rebase

Cache invalidation

Formatting tidy up

Sort out some nullability

Add kdocs.

Unit tests

More unit tests

Fix TODO

Unit test fixes

Unit test fixes

Fixed concurrent invalidating transaction support.

* Correct some transaction concurrency bug, including unit test.

* Added some unit tests for the method I added to persistence.

* Remove some blank lines

* Review feedback

* Fix imports
2018-12-17 15:14:14 +00:00
josecoll
9cdda3bd77
CORDA-2149 CorDapp Contract and Workflow version identifiers (#4363)
* Implementation of Contract and Workflow attribute identifiers.

* Fixes following rebase from master.

* Fix broken JUnit test.

* Fix broken JUnit test.

* Fix broken JUnit test.

* Added missing constants.

* Further clean-up.

* Updated documentation.

* Added changelog entry.

* Updated all samples (using new Gradle Plugin 4.0.37 functionality)

* Temporarily resolve gradle plugins from latest published snapshot.

* Temporarily resolve gradle plugins from latest published snapshot.

* Updates following feedback from PR review.

* Move constants into CordappInfo companion object.

* Contract and Workflow attribute `version` to `versionId` (as version is a reserved gradle variable)

* Clarified warning message on incorrect version identifier.

* Align version identifier processing logic with gradle cordapp plugin.

* Updated comment.

* Minor fixes following rebase from master.

* Fixed broken unit test.

* Improved exception reporting.

* Update to use 4.0.37 of Gradle Plugins.

* Added support for combined Contract and Workflow CorDapp info.

* Updated following discussions with Shams + cleanup.

* Updated following Shams PR review.

* Minor API improvements.

* Added missing cordapp info causing deployNodes to fail.
2018-12-14 09:39:23 +00:00
Remo
eb4a33e438 Corda-3941: initialiseSchema property couples corda node and cordapp ddl handling (#4277)
New property database.initialiseAppSchema introduced that allows to turn-off Hibernate DDL generation while leaving Node-specific Liquibase handling enabled.
2018-12-13 14:34:58 +01:00
bpaunescu
749c207bad
ENT-2835: handle uncaught exception when bridge tries to send a message using a disconnected amqp client (#4399)
* ENT-2835: handle uncaught exception when bridge tries to send a message using a disconnected amqp client

* ENT-2835: remove emptyline

* ENT-2835: added comment explaining the exception handling
2018-12-11 16:51:35 +00:00
Florian Friemel
74a0a6116c
backport ENT-2844 (#4396) 2018-12-11 15:20:49 +00:00
szymonsztuka
4799df9b80
CORDA-2150 signature constraints non-downgrade rule (#4262)
Contract class version non-downgrade rule is check by LedgerTransaction.verify().
TransactionBuilder.toWireTransaction(services: ServicesForResolution) selects attachments for the transaction which obey non downgrade rule.
New ServiceHub method loadAttachmentConstraint(stateRef: StateRef, forContractClassName: ContractClassName? = null) retrieves the attachment contract related to transaction output states of given contract class name.
2018-12-11 10:23:07 +00:00
szymonsztuka
7172048735
CORDA-2291 enable Finance App 3.x on Corda 4.x - Liquibase script is not required(#4382)
Finance CorDapp v3.0 and core node 3.0 database tables doesn't have Liquibase migration scripts, now in Corda v4.0 the Liquibase has been introduced. Allow older  Finance Cordapp v3.0 which doesn't have Liquibase to run in node v4.0 and create Liquibase log entries for FinanceApp only if it has schema migration (so it’s of v4.0).

At implementation level: there is new case when database has already Liquibase control tables however it doesn’t contains entries related to tables created by FInnaceApp and if the FinaceApp has Liquibase scheme it means it needs to be added to Liquibase logs.
2018-12-10 15:54:30 +00:00
szymonsztuka
d2d13c1dfc
Attachment query with contract version, related to CORDA-2150, CORDA-2157 (#4357)
TransactionBuilder loads attachment using attachment storage instead of CordappLoader,
contract class version is now Integer (format and stored in db as Integer).
2018-12-06 11:28:53 +00:00
Viktor Kolomeyko
5ad992d01f
CORDA-2157: Close inputStream properly in withContractsInJar (#4365)
Or else the file remains open and test `VaultQueryJavaTests.testAttachmentQueryCriteria` fails on Windows as
open for reading files cannot be deleted.
2018-12-05 18:55:44 +00:00
Anthony Keenan
bdd893fb57
Don't print info messages when entry is via cordformation (#4360) 2018-12-05 10:09:08 +00:00
Florian Friemel
382e3b651f
[ENT-2821] Make the default schemes for TLS and identity available from the CryptoService interface (#4354)
* Make the default schemes for TLS and identity available from the CryptoService interface.

* Change CryptoService.generateKeyPair to accept SignatureScheme instead of Int.
2018-12-04 17:06:12 +00:00
Anthony Keenan
994afcfef7 [CORDA-2055] [CORDA-2236]: Bootstrapper cordapp copying (#4309) 2018-11-28 13:28:56 +00:00
Katarzyna Streich
5d2ad46553
CORDA-2089 - network parameters tags - part (#4228)
* CORDA-2089 - network parameters tags - part

Data structures changes, storage and notarisation.

Tag transactions with network parameters hash that was in force when tx
was created. Add component group on all core transactions and resolved
parameters on full transactions. The hash should be always visible on
the filtered versions of transactions. Add
notarisation check that the parameters are current.
Implement network parameters storage on services for resolution.

This is only part of the work, next PR will include changes to
ResolveTransactionsFlow to make sure that parameters in the transaction
graph are ordered (this is to prevent the downgrade attack, when the
malicious notary and participants sign transaction that shouldn't be
notarised otherwise).
Probably on network services side we need the default parameters
endpoint for the
transactions that were created before this change - for now it's default
to the current ones.

* Make parameters storage agnostic to cert hierarchy

Test fixes

* Address most PR comments

* Fixes after rebase

* Fixes. Add epoch column to parameters storage.

* Address part of review comments

* Some more comments

* Hopefully fixing what I broke doing rebse

* Address Kostas comments

* Further fixes

* Save all parameters from updates to storage

* Fix integration test

* Address comments

* Fixes after rebase

* Fix test

* Fixes

* Add wrapper for filtering around parameters hash

* API stability fixes

* Add NetworkParametersStorageInternal

* Rename
2018-11-27 15:48:32 +00:00
Anthony Keenan
b7d04b1c6e
[CORDA-2235]: Add overrides for network parameters via command line and file (#4279)
* Temp commit

* Print the error message first by default, makes error output more natural.

* Polishing

* Further modifications after testing

* Documentation updates

* Couple of fixes after review

* Removing unnecessary tests

* Fix broken test

* Add interface to bootstrapper for testign

* Added unit tests

* Remove unused class

* Fix up bootstrapper unit tests and add a couple more

* Refactor the tests slightly

* Review comments

* Couple of minor tweaks
2018-11-26 17:11:05 +00:00
Michele Sollecito
a5fb1a82f1
[CORDA-2244]: Allow map and mapValid on entire lists wrt configuration parsing (#4280) 2018-11-23 15:11:59 +00:00
Tudor Malene
4c8dabc288
ENT-2506 restore the attachment party signers (#4255)
* ENT-2506 restore the attachment party signers

* ENT-2506 restore the attachment party signers

* ENT-2506 restore the attachment party signers

* ENT-2675 Address code review changes.

* ENT-2675 Address code review changes.
2018-11-22 18:35:30 +00:00
James Brown
98a495fa84
CORDA-2199 NetworkParameters certificate role (#4278) 2018-11-22 10:49:18 +00:00
Tudor Malene
504f650022
ENT-2763 - Change packageOwnership type (#4273)
* ENT-2763 - Change packageOwnership type

* ENT-2763 - Address code review comment.

* ENT-2673 Address code review comments.

* ENT-2673 Address code review comments.

* ENT-2673 Fix test

* ENT-2673 Address code review comments.
2018-11-21 20:41:56 +00:00
Tudor Malene
2d043828a0
CORDA-2083 verify transaction in AttachmentsClassloader (#4188)
CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 add support for explicit upgrade transactions

CORDA-2083 cleanup

CORDA-2083 cleanup

CORDA-2083 More cleanup

CORDA-2083 More cleanup

CORDA-2083 Clean up tests

CORDA-2083 Address code review comments

CORDA-2083 Fix merge

CORDA-2083 Fix merge

CORDA-2083 Address code review comments

revert file

CORDA-2083 Fix test

CORDA-2083 Add test

CORDA-2083 cleanup

CORDA-2083 Fix test

CORDA-2083 Address code review comments.

CORDA-2083 Remove unused functions.

CORDA-2083 Address code review comments.

CORDA-2083 Address code review comments.

CORDA-2083 Address code review comments.

CORDA-2083 Address code review comments.

CORDA-2083 Address code review comments.
2018-11-19 13:42:12 +00:00
Stefano Franz
828892a3d9
write nodeInfo to additional-node-info folder as well as baseDirectory (#4247)
* write nodeInfo to additional-node-info folder as well as baseDirectory

* fix broken network map tests
2018-11-19 11:26:42 +00:00
Stefano Franz
8f463c46a9 Add message to uses of require(...) (#4192) 2018-11-16 17:13:55 +00:00
Andrius Dagys
e1e5d13941
CORDA-2221: Fix clustered notary identity generation (#4230)
- Don't generate a composite key certificate for CFT notaries
- Don't require a composite key certificate for CFT notaries on startup
2018-11-14 18:15:05 +00:00
Hristo Gatsinski
eb9bd10da0 [CORDA-2219] Show message if CorDapp already exists (#4236)
* [CORDA-2219] Show message if CorDapp already exists

* Update definition of `net.corda.core.node.services.Vault$StateMetadata` in `api-current.txt` or else diff tool gets very confused.
2018-11-14 17:50:55 +00:00
tudor.malene@gmail.com
1e27f0cbe0 Merge remote-tracking branch 'private/master' into feature/tudor_constraints
# Conflicts:
#	core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt
#	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
#	core/src/main/kotlin/net/corda/core/utilities/KotlinUtils.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/NodeAttachmentServiceTest.kt
2018-11-14 11:50:19 +00:00
Michele Sollecito
dc62b20c5d
[CORDA-1879]: Ensure Node dies on unrecoverable errors. (#4213) 2018-11-12 15:56:04 +00:00
Konstantinos Chalkias
81418ca7e7
[CORDA-2200][CORDA-2202] More tests for BCCryptoService and CryptoServiceException (#4190) 2018-11-12 09:38:06 +00:00
Matthew Nesbit
2caa082746
Some code paths for bridge control are now being acknowledged (#4206) 2018-11-09 17:54:51 +00:00
Roger Willis
4684259970
Expose JPA to flows (#4140)
* First pass
* Update test.
* Address review comments.
* Added docs and kdocs.
* Clean-up.
* Add extra test.
* Changes to docsite.
* Added try/catch block as recommended by Andras.
* Removed try catch block. It's not required as the checkpoint serialiser deals with this.
* Re-used existing DB session instead of creating a new session.
* Entity manager auto flushes.
* Added java friendly api.
* Addressed review comments.
2018-11-09 17:47:36 +00:00
Michele Sollecito
6c749889d0
[CORDA-1993]: Replace reflection-based NodeConfiguration parsing with versioned property-based parsing mechanism. (#4132) 2018-11-08 15:56:00 +00:00
Stefano Franz
ecbf23ab73
CORDA-2106: Print node info gen log on bootstrap failure (#4184)
* print node-gen log when nodeInfo generation fails during bootstrapping

* add logic to print out the legal name of the node which failed to generate nodeInfo
2018-11-07 19:05:50 +01:00
Michal Kit
6f005605aa
CORDA-2187 & CORDA-2038: reverting maxTransactionSize <= maxMessageSize (#4166)
* CORDA-2187 reverting maxTransactionSize <= maxMessageSize

* Addressing review comments

* Increasing the maxTransactionSize for the Bootstrapper

* Updating the testNetworkParameters
2018-11-07 09:28:27 +00:00
Konstantinos Chalkias
106eb9df4a
[CORDA-2011] [CORDA-2057] CryptoService interface and BC HSM simulation (#4099) 2018-11-06 12:57:13 +00:00
josecoll
015a36dad6
CORDA 2131 - Extend Network Bootstrapper to enable registration of Java Package Namespaces. (#4116)
* Package Ownership Network Parameters: add register / unregister CLI options to network bootstrapper.

* Fix 2 failing unit tests.

* Fix failing unit tests.

* Added changelog, documentation and cosmetic changes.

* Fixed exception message.

* Address PR review feedback.

* Fix typo.

* Resolve conflicts.

* Rebase, resolve conflicts and remove PackageOwner class.

* Address latest PR review feedback.

* Fix incorrect imports.

* Fix broken JUnit

* Add support for key store passwords including delimiter characters.

* Updated and improved documentation.

* Minor doc update.

* Documentation changes following PR review feedback

* Replace Bank Of Corda with Example CorDapp.
Remove references to locally built network bootstrapper.
2018-11-06 09:28:55 +00:00
szymonsztuka
1de56550b0
Optionally allow the node in production mode to accept Cordapps signed by dev Key (CORDA-1915) (#4133)
By default Cordaps build by corda-gradle-plugins are signed by Corda development key.
In dev mode any key can be used to sign Cordapp JAR .
In production node Corda dev keys were forbidden. This code change allows to opt-out by setting node option cordappSignerKeyFingerprintBlacklist=[] or specify more public keys to blacklist.
The option is used in production only mode.
2018-10-30 13:53:01 +00:00
Michele Sollecito
28dd3ac873
[CORDA-1778, CORDA-1835]: Decoupled configuration parsing mechanism (#4093) 2018-10-25 16:45:14 +01:00
tudor.malene@gmail.com
29a8c153ed Merge branch 'master' into tudor_merge_os_24_10
# Conflicts:
#	core/src/main/kotlin/net/corda/core/internal/JarSignatureCollector.kt
#	core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt
#	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
#	core/src/main/kotlin/net/corda/core/utilities/KotlinUtils.kt
#	core/src/test/kotlin/net/corda/core/contracts/PackageOwnershipVerificationTests.kt
#	core/src/test/kotlin/net/corda/core/internal/JarSignatureCollectorTest.kt
#	node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/NodeAttachmentServiceTest.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/dsl/TestDSL.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/dsl/TransactionDSLInterpreter.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/internal/MockCordappProvider.kt
2018-10-24 17:09:30 +01:00
Anthony Keenan
0ab644783e CORDA-1838: Add subcommands to node (#4091)
* Tidy up

* Add install-shell-extensions command

* Make cli tests use same version of picocli as everything else

* Remove initLogging from NodeStartup, it is ran earlier by CordaCLIWrapper

* Use picocli snapshot for testing

* Use RunLast() parser to invoke correct subcommands

* Deprecate old clear-network-map-cache parameter

* Restructure NodeStartup for commands

* Get rid of -c option since the flag method has been deprecated and that didn't exist in last release

* Update documentation

* Update backwards compatibility test

* Get all subcommands working

* Refactor sub commands into seperate classes

* Update docs and fix some tests

* Docs changes

* Fix merge conflicts with master

* Fix renamed parameters

* Fix test failure

* Fix compatibility tests

* Add missing compatibility test for blob inspector

* Remove blob inspector compatibility test as there are import conflicts

* Assorted doc fixes

* Addressing review comments

* More review comments

* Couple more bits

* Fix broken tests

* Fix compilation error

* More merge conflicts

* Make startup logging function a bit more sensible

* Fix broken shell extensions

* Make shell extensions work with subcommands

* Make sure parameters for deprecated options are carried through

* More review comments

* Adding some s's

* One last go

* Fix compilation error on Windows

* Revert logging changes

* Revert docs back to their original imperatively moody state
2018-10-24 13:58:19 +01:00
szymonsztuka
7e3aa7f30c
CORDA-1915 node rejects CorDapps signed by our dev keys in prod mode (#4041)
Related to CORDA-1915 Signing CorDapp JARs - Corda node rejects CorDapps signed by our development keys when running in production mode. This prevents Cordapps signed by our dev key (by default) running in production (node devMode=false).
2018-10-24 10:53:39 +01:00
Tudor Malene
391c6bf66f
Feature/corda 1947/add package ownership (#4097)
* Upgrade hibernate and fix tests

CORDA-1947 Address code review changes

CORDA-1947 Address code review changes

(cherry picked from commit ab98c03d1a)

* ENT-2506 Changes signers field type

ENT-2506 Clean up some docs

ENT-2506 Fix tests and api

ENT-2506 Fix compilation error

ENT-2506 Fix compilation error

(cherry picked from commit 32f279a243)

* CORDA-1947 added packageOwnership parameter

CORDA-1947 add signers field to DbAttachment. Add check when importing attachments

CORDA-1947 add signers field to DbAttachment. Add check when importing attachments

CORDA-1947 add tests

CORDA-1947 fix comment

CORDA-1947 Fix test

CORDA-1947 fix serialiser

CORDA-1947 fix tests

CORDA-1947 fix tests

CORDA-1947 fix serialiser

CORDA-1947 Address code review changes

CORDA-1947 Address code review changes

CORDA-1947 Revert test fixes

CORDA-1947 address code review comments

CORDA-1947 move verification logic to LedgerTransaction.verify

CORDA-1947 fix test

CORDA-1947 fix tests

CORDA-1947 fix tests

CORDA-1947 address code review comments

CORDA-1947 address code review comments

(cherry picked from commit 86bc0d9606)

CORDA-1947 fix merge
2018-10-22 15:00:08 +01:00
Andrius Dagys
e0d8ea8a58
CORDA-535: Move implementation specific configuration values out of n… (#4058)
The configuration objects for specific notary implementations have been replaced
by a single untyped "extraConfig" Config object that is left to the notary service
itself to parse.

* Remove the raft bootstrapping command from node, we'll need a different
mechanism for that.

* Remove pre-generated identity config value.

* Split up obtainIdentity() in AbstractNode to make it easier to read.

* A temporary workaround for the bootstrapper tool to support BFT notaries.

* Update docs

* Add upgrade notes

* Fix rebase issue

* Add a config diff for the bft notary as well
2018-10-22 10:26:10 +01:00
Viktor Kolomeyko
88f368134f
ENT-2610: Separate passwords for store and for private keys in Corda OS. (#4090)
* ENT-2610: Separate passwords for store and for private keys in Corda OS.

When it comes to KeyStores there are *2* passwords: 1 for the keyStore as a whole and separately there is one private keys within this keyStore.
Unfortunately, those 2 passwords have to be the same due to Artemis limitation, for more details please see:
`org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport.loadKeyManagerFactory`
where it is calling `KeyManagerFactory.init()` with store password.

Before change in this PR, throughout our codebase there are multiple places where we assume that storePassword is the same as keyPassword, even in the classes that have nothing to do with Artemis.
This is of course less than ideal as TLS communication may be used not only for Artemis connectivity (e.g. Bridge/Float interaction in Ent) and it is unfair to impose same passwords constraint on that communication channel.
Therefore this PR is removing this limitation and properly separating storePassword from keyPassword.

Linked Jira(https://r3-cev.atlassian.net/browse/ENT-2610) has for more background info.

Suggest to start review from `net.corda.core.crypto.X509NameConstraintsTest` to get an idea about the nature of the changes made.

* ENT-2610: Address PR input from @kchalkias

* ENT-2610: Address PR input from @kchalkias, s/privateKeyPassword/entryPassword/

* ENT-2610: Address PR input from @kchalkias, s/keyPassword/entryPassword/

In the implementation of `CertificateStoreSupplier`
2018-10-22 07:11:27 +01:00
Rick Parker
55731ef816
ENT-2431 Tidy up buildNamed and CacheFactory 2018-10-18 10:38:43 +01:00
Shams Asari
2c9a942e1a
CORDA-2088: Simplified the TestCordapp public API (#4064)
The entry point to the API has been simplified to just requireing a list of packages to scan, with sensible defaults provided for the metadata. Because of the wither methods, having parameters for the metadata (with default values) seems unnecessary. Also the ability to scan just individual classes has been made internal, as it seems unlikely app developers would need that level of control when testing their apps.

TestCordappImpl is a data class and thus acts as a natural key for the Jar caching, where previously the key was the package names. This fixes an issue where it was not possible to create two CorDapp Jars of the same package but different metadata.
2018-10-15 10:11:18 +01:00
Shams Asari
aced03df54
CORDA-1274: Migrated usage of FastClasspathScanner to ClassGraph (#4060)
FastClasspathScanner was renamed to ClassGraph for the version 4 release
2018-10-11 19:50:26 +01:00
Dominic Fox
d9ea19855f
CORDA-2006: Simplify checkpoint serialization (#4042)
* CORDA-2006: Simplify checkpoint serialization

* Supply rule to KryoTest
2018-10-08 13:39:28 +01:00
Shams Asari
bffac331a3
Moved the PLATFORM_VERSION constant to core and added some missing usages (#4026) 2018-10-05 09:28:00 +01:00
josecoll
3110c75847
Network bootstrapper tool: optional configuration setting to specify the minimum plat… (#4005)
* Provide an optional configuration setting to specify the minimum platform version to use in the network params file.

* Leave Cordform signature intact.

* Leave previous Gradle Plugin called signature intact.

* Incorporating feedback from PR review.

* Added minimum platform version validation check.

* Removed final 2 references to "default"

* Added changelog entry.
2018-10-03 13:41:52 +01:00
Patrick Kuo
149b6034e1
CORDA-2016 Add unit tests to ensure SNI header generation will not be changed by accident (#4014)
* Add test for SNI header to prevent changing it accidentally.

* added hardcoded values test to ensure hashing function and corda x500 name format can't be changed
2018-10-03 08:59:31 +01:00
szymonsztuka
1e72298a46
CORDA-1915 Update to Network Bootstrapper for signed JARs (#4008)
The cordapp and cordformation plugins (from v4.0.30) are going to have ability to sign JARs (in cordformation signing will be by default), to enable signature constraints to work out of box Network Bootstrapper will not whitelist contracts form signed JARs.
For unsigned JARs the Network Bootstrapper behaviour is unchanged.
2018-10-02 20:45:50 +01:00
szymonsztuka
bc6ef74c6a
CordaPersistence class minor refactoring to align with Enterprise repo. (#4012) 2018-10-02 16:49:31 +01:00
tudor.malene@gmail.com
40825fef99 Merge branch 'tudor_merge_os_master' into feature/ENT-2222/constraints_propagation_private
# Conflicts:
#	node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/internal/MockCordappProvider.kt
2018-10-02 16:10:19 +01:00
tudor.malene@gmail.com
063efe0c6d Merge branch 'master' into tudor_merge_os_master 2018-10-02 15:50:20 +01:00
Viktor Kolomeyko
5a79f439db
ENT-2500: Introduce optional BridgeMetricsService in nodeApi module (#4001)
* ENT-2500: Introduce optional BridgeAuditService in `nodeApi` module

* ENT-2500: Rename audit to metrics service and add more traps to capture stats.
2018-10-01 14:27:01 +01:00
Tudor Malene
f96a59932c ENT-2222 Constraints propagation
ENT-2222 Fix tests

ENT-2222 Fix tests

ENT-2222 Add ledger transaction verification logic

ENT-2222 Fixed IRS test

ENT-2222 Fixed IRS test

ENT-2222 Fixed unit test

ENT-2222 Better kdocs

ENT-2222 Support for reference states

ENT-2222 Fix support for reference states

ENT-2222 Revert wrong change

ENT-2222 Fix Kdoc

ENT-2222 Fix Kdoc

ENT-2222 Better docs

ENT-2222 Address code review comments

ENT-2222 Fix test

ENT-2222 Fix rebase

ENT-2222 Add documentation around constraint propagation

ENT-2222 Add tests for contract propagation

ENT-2222 Add Signature Constraints propagation - first draft

ENT-2222 fix tests

ENT-2222 more tests

ENT-2222 unseal the TransactionVerificationException

ENT-2222 unseal the TransactionVerificationException

ENT-2222 more docs

ENT-2222 address code review comments

ENT-2222 address code review comments

ENT-2222 re-implement transition logic

ENT-2222 better comments and checks

ENT-2222 Fix tests

ENT-2222 merge fixes
2018-09-28 13:38:35 +01:00
Tudor Malene
ab98c03d1a Upgrade hibernate and fix tests
CORDA-1947 Address code review changes

CORDA-1947 Address code review changes
2018-09-28 11:58:44 +01:00
Florian Friemel
842eac5c43
[CORDA-1926] Implement target version and min platform version (#3899)
https://r3-cev.atlassian.net/browse/CORDA-1926
2018-09-28 09:46:06 +01:00
Christian Sailer
878bd4da8c Remove TLS_DHE_RSA cipher family (#3987) 2018-09-25 22:58:47 +01:00
bpaunescu
5139ac3d01
CORDA-2001: added SNI header to TLS connections based on hashed CordaX500 (#3968)
* CORDA-2001: added SNI header to TLS connections based on hashed CordaX500

* CORDA-2001: added newline

* CORDA-2001: truncate hashed x500 to pass IDN validations

* CORDA-2001: convert hostname to lower case

* CORDA-2001: to lower after truncating, use of better suited method

* CORDA-2001: to lower after truncating, use of better suited method

* CORDA-2001: correctly set ssl parameters in the engine
2018-09-20 16:22:27 +01:00
Konstantinos Chalkias
38c85d1711
CORDA-2009 update to BC 1.60 (security fixes) (#3974)
* update to BC 1.60 (security fixes)

* adding key combination keystore/cert tests
2018-09-20 13:11:32 +01:00
Clinton
ae4dfc93da
CORDA-2002: Adding new Cordform bootstrap endpoint to move Cordapp JA… (#3963)
* CORDA-2002: Adding new Cordform bootstrap endpoint to move Cordapp JAR copying back into Cordform
2018-09-19 16:23:09 +01:00
Michal Kit
492c25fedd
CORDA-1995 removing DigitalSignatureWithCertPath (#3953)
* CORDA-1995 removing DigitalSignatureWithCertPath

* Fixing unit tests

* Addressing review comments
2018-09-19 14:30:21 +01:00
Michele Sollecito
5113f4c8c1
[CORDA-1941]: Server-side draining node shutdown. (#3909) 2018-09-18 13:04:26 +02:00
Konstantinos Chalkias
137f7664c1
CORDA-1986 Ensure key alias format is supported by the major HSM vendors (#3950) 2018-09-17 10:19:34 +01:00
Viktor Kolomeyko
0c1910722b
ENT-2489: Gracefully handle session that might have already been closed. (#3933) 2018-09-13 09:16:24 +01:00
Konstantinos Chalkias
8ad540d1c7
Move identity alias prefixes from DevIdentityGenerator to X509Utilities (#3902) 2018-09-06 15:48:59 +01:00
bpaunescu
793ee3e1ee
Store default platform version in a constant (#3900)
* use constant for default platform version value when tests with out of process nodes are run from Intellij.

* node will use constant for platform version instead of manifest file(RPC already uses the constant, no sense in having 2 sources for it)

* fix issues caused by merge
2018-09-06 14:32:23 +01:00
Matthew Nesbit
304dba704e
Support HA without load balancer (#3889)
Allow configuration in node for additional advertised addresses.

fix logic error

Use empty list as default config not null

Allow multiple addresses in NodeInfo

Describe new additionalP2PAddresses property in docs.

Add integration test of additionalP2PAddress feature

Fixup after rebase

Address PR comment

Address PR comments by removing unused element of NodeAddress
2018-09-05 17:46:46 +01:00
Michele Sollecito
2fbeab1365
Fixed compilation error for case-insensitive operating systems. (#3896) 2018-09-05 13:06:05 +01:00
Michele Sollecito
d01dd22419
[CORDA-1937]: Refactor NodeConfiguration hierarchy. (#3856) 2018-09-04 10:26:10 +01:00
Michal Kit
8e6a9818b7
CORDA-1932 Fixing network map certificate path verification (#3843)
* CORDA-1932 Fixing network map certificate path verification to be certificate hierarchy agnostic

* Addressing review comments
2018-08-31 09:35:36 +01:00
Michal Kit
d7b85b4928
CORDA-1934 Renaming INTERMEDIATE_CA certificate role to DOORMAN_CA certificate role (#3844) 2018-08-31 09:35:06 +01:00
szymonsztuka
dbc1088417
CORDA-1939 Regression: Liquibase fails to migrate existing pre-liquibase database (#3855)
* Bugfix for corda.jar manually deployed without coping the matching corda-finance-VERSION.jar.
If the older finance cordapp version is detected (which doesn't have Liquibase migration scripts) fail node at startup and print message: "Could not create the DataSource: Detected incompatible corda-finance cordapp without database migration scripts, replace the existing corda-finance-VERSION.jar with the latest one."
Since coda-finance is an optional cordapp,the presence of Liquibase scripts is only checked if corda-finance-VERSION.jar is present in cordapps folder.
*  Allow to start using Liquibase from any point of 4.0-SNAPSHOT before Liquibase was introduced (not only from 3.0/3.X versions) - 2 database changes introduced after 3.2 but before Liquibase are now conditional database changes.
2018-08-30 13:40:02 +01:00
Dominic Fox
f81428eb53
Corda 1916: signature attachment constraints (#3839)
* Create constraint, extract Jar signature collection

* Extract JarSignatureCollector into its own file

* Jar signature collection throws exception if signatures are inconsistent

* Focus testing in Jar signature collection

* Extract some helper functions in test

* Patch tests with mock attachment storage

* Assert that generated constraint is satisfied by signed attachment

* Clarify constraint selection logic

* Explicit return types on extension methods

* Link to docsite Signature Contrainsts documentation

* Fix issue with shared JAR reading buffer
2018-08-24 17:21:54 +01:00
Christian Sailer
bc330bd989
ENT-2414 Named caches (#3848)
* Add named caches and apply to NonInvalidingUnboundCache and all usages.

* Add named caches and apply to NonInvalidingCache and all usages.

* Add named caches and apply to NonInvalidingWeightBasedCache and all usages.

* Move NamedCache to core/internal

* Remove type `NamedCache` and `NamedLoadingCache`

* Suppressed 'name not used' warning, added comment, and fixed generic parameters on the buildNamed functions.

* Use `buildNamed` in all caffeine instances in production code. Not using it for caches that are created in test code.

* Add checks for the cache name

* Formatting

* Minor code review revisions
2018-08-24 17:17:22 +01:00
PokeyBot
042b91814a
Merge pull request #3834 from corda/mike-rpc-propagate-deser-errors
Propagate RPC deserialisation faults back to the caller
2018-08-24 16:52:23 +01:00
Clinton
3594ccd89b
CORDA-1924: Remove references to Cordform definition and cordform-common (#3842) 2018-08-24 16:29:14 +01:00
Mike Hearn
8fd4d0d218 RPC: propagate failures when they occur during deserialization.
Before this change, a failure to deserialize an RPC reply would leave
the caller hanging because we'd never set the future.
2018-08-24 15:16:55 +02:00
szymonsztuka
487cad7d06
CORDA-1471 Database schema setup for internal tables via Liquibase (#3815)
Internal tables (the tables from node and finance modules) are now tracked /created by Liquibase script.
Tables backing MappedSchemma in Cordapps are created by Hibernate (as before). 
The PR scope added Liquibase library, setup code SchemaMigration and XML scripts and from Enterprise.
For existing database installation - the node will auto-upgrade to use Liquibase.
Method migrateOlderDatabaseToUseLiquibase checks for any 3.X existing Corda database to upgrade database to use Liquibase. When the existing database without Liquibase integral tables is detected, the node (at startup) will create Liquibase tracking tables and fill them with all migration scripts (marked as done), this ensure the database will look as it would use Liquibase from the beginning.
The database changes gradually introduced by the subsequent 3.X releases (3.1, 3.2) are conditionally run by Liquibase.
2018-08-23 16:30:02 +01:00
Roger Willis
0c7e0f6dbb
Bumped minimum platform version for the bootstrapper from 1 to 4 to unlock reference states. (#3753) 2018-08-08 12:09:47 +01:00
Rick Parker
ff298e17e1
CORDA-1866 Avoid circular flushing in our hibernate column converters. (#3737) 2018-08-02 10:08:12 +01:00
Tudor Malene
40fc56f2ea
Feature/corda 1813/change postgres column type (#3631)
* CORDA-1813 fix Postgres db bloat issue

* CORDA-1813 merge fixes

* CORDA-1813 change column type and size to a standard corda type

* CORDA-1813 docs

* CORDA-1813 create custom hibernate type for the checkpoint blob and align with enterprise

* CORDA-1813 Remove max col size

* CORDA-1813 Remove max col size

* CORDA-1813 Fix merge

* CORDA-1813 Remove buggy :serverNameTablePrefix: configuration
2018-07-25 09:52:57 +01:00
Shams Asari
d4f0e0f8e0
Ordered starting of node components and clear dependencies between them (#3664)
Moved start up logic of the various node components out of their c’tors and into “start” methods, which are called from Node.start(). The components themselves are created in the Node’s c’tor with minimal initialisation logic.

Certain things are not immediately available at construction time, which are instead given to the components at start time in an orderly fashion:

* Certs from the node’s key store and trust store
* The network parameters, and thus access to things like maxMessageSize and the contracts whitelist
* A running database - several components were doing database stuff their c’tors
* The node’s NodeInfo, and thus access to things like identities and addresses

The messaging service couldn’t be created in the Node’s c’tor due to initialisation issues with MockNode. This should be fixed in a later commit.
2018-07-24 16:13:21 +01:00
Michele Sollecito
abc1d99eaa
[CORDA-1799]: Avoid generating test CorDapp JARs from each out of process node started by the driver (#3641) 2018-07-23 11:18:11 +01:00
Anthony Keenan
7853cfe003
[CORDA-1482] Make boolean config variables case insensitive (#3622)
* Make boolean config variables case insensitive

* Address review comments
2018-07-21 11:54:02 +01:00
bpaunescu
53b398a460
ENT-2116: handle amqp client remote error, added test (#3636)
* ENT-2116: handle amqp client remote error, added test

* ENT: 2116 rename test, added logging

* ENT-2116: rename test to indicate its purpose
2018-07-18 16:07:42 +01:00
Michal Kit
c0207b2219
CORDA-1815 adding maxTransactionSize validation (#3635)
* CORDA-1815 adding maxTransactionSize validation

* Fixing failing tests

* Fixing failing test
2018-07-18 10:34:41 +01:00
Konstantinos Chalkias
bf4f30fd39
Use newSecureRandom instead of SecureRandom (#3606) 2018-07-14 05:21:02 +01:00
szymonsztuka
208ac49da0
CORDA-1804 Corda node stops when detecting not migrated node_attachments_contracts table name (#3593)
Database table NODE_ATTACHMENTS_CONTRACT_CLASS_NAME in v3.0 was changed to NODE_ATTCHMENTS_CONTRACTS in v3.1 and then finally NODE_ATTACHMENTS_CONTRACTS on current master. Users may omit the upgrade note and run into errors. After the change the node will not start if the new table name is not found and any other older ones is found.
2018-07-13 16:23:20 +01:00
Katarzyna Streich
4fb7f7d3d0
CORDA-1733 X500Principal configuration parsing (#3580)
CORDA-1733 X500Principal configuration parsing

Change the NodeConfiguration.tlsCertCrlIssuer type from String to X500Principal
2018-07-13 13:44:29 +01:00
Michal Kit
5dd85e08bf
CORDA-1805 Fixing the NPE with path parent (#3591) 2018-07-13 12:46:50 +01:00
Rick Parker
ed25d8f1be
ENT-1565 Upgrade Artemis version to latest. (#3557)
* ENT-1565 Upgrade Artemis version to latest.

* Fix compiler errors.

* Add to changelog

* Additional commentary on Proton-J version
2018-07-13 10:10:26 +01:00
Patrick Kuo
26d44eedf5
remove CRL url from dev doorman cert (#3555) 2018-07-10 19:07:29 +01:00
Michal Kit
408cc68c65
CORDA-1715 Ordering the X500 name for the CRL extension of the TLS certificates (#3515)
* CORDA-1715 Ordering the X500 name for the CRL extension of the TLS certificate

* Addressing review comments

* Addressing review comments - round 2

* Throwing an exception on incorrect TLS CRL issuer configuration

* Changes after the redesign decisions

* Small refactoring
2018-07-09 13:45:38 +01:00
Patrick Kuo
68d0826563
Custom config parser for more complex config structure (#3513)
* custom config parser for more complex config structure

* address PR issues
2018-07-04 16:51:54 +01:00
Matthew Nesbit
d0568121b7
Some code tidy up ahead of post-GA development. (#3500)
Handle SSL Handshake timeouts properly
2018-07-03 14:16:31 +01:00
Thomas Schroeter
66cb0e389b
Warning timer thread should run as a daemon (#3450) 2018-06-27 12:57:37 +01:00
Michal Kit
e00c7706c3
CORDA-1661 Reverting DEV certificates (#3422)
* CORDA-1661 Reverting DEV certificates

* Addressing review comments

* Removed the intermediate certificate from the trust store and added some test cases for the revocation check
2018-06-25 16:40:51 +01:00
Tudor Malene
9be4c5dca4
CORDA-1567 Remove all traces of the out-of-process verifier (#3424) 2018-06-25 13:01:33 +01:00
Shams Asari
3046843d40
CORDA-1602: Added cmd line flags to the network bootstrapper (#3419)
The list of CorDapps jars is no longer passed in via the cmd line but is now expected to be placed in the bootstrapped directory.

Ended up being a bit of a refactor to cater for unit testing, and also tidied up the bootstrapper docs.
2018-06-23 11:36:10 +01:00
Tudor Malene
381aadc78f
ENT-1796 RPC SSL (#3401)
* ENT-1796 add just-generate-rpc-ssl-settings command line flag. Fix ssl configuration and documentation

* ENT-1796 small fix. change alias

* ENT-1796 address code review changes

* ENT-1796 revert file

* ENT-1796 Added check to display better error message

* ENT-1796 Doc fixes
2018-06-21 16:46:05 +01:00
gaugfather
2f34b16b07 Fix to allow equality of hostname (#3381)
* Fix to allow equality of hostname

* Remove unreliable require test per pull 3381

* Remove unreliable require test per pull 3381
2018-06-21 09:03:32 +01:00
Matthew Nesbit
4ff5aa34b6 Change to use MDC logic in bridge/AMQP protocol logging (#3398) 2018-06-20 11:55:59 +01:00
Rick Parker
999ee49804
ENT-2053 Fix messaging TTL related settings causing disconnects (#3384)
* ENT-2053 Revert RPC TTL due to hanging RPC clients.

* ENT-2053 Set TTL correctly.
2018-06-15 16:57:49 +01:00
Michal Kit
377d980c99
Fixing filename typo (#3358) 2018-06-14 16:35:42 +01:00
Michal Kit
d97f4f58be
CORDA-1624 updating the DEV certificate with CRL distribution point (#3353)
* CORDA-1624 updating DEV certificates with CRL distribution points implying R3 owned endpoints

* Keeping old keys but updating certificates
2018-06-13 12:01:15 +01:00
Matthew Nesbit
4bf5d809a5
If the Artemis connectionTTL configuration is not set then some of the cleanup actions do not happen on client kill. This prevents durable messages being replayed (#3351)
and may prevent cleanup of other resources.

Undo spurious code
2018-06-13 10:32:29 +01:00
Michal Kit
02884e6c81
CORDA-1593 Extracting the whitelist logic and making it public (#3317)
* CORDA-1539 Extracting the whitelist logic and making it public

* Addressing review comments
2018-06-12 09:31:06 +01:00
Tudor Malene
c474c04503
ENT-1837 better error message on db failure (#3318) 2018-06-07 14:05:28 +01:00
Tudor Malene
5f2c3d175d
ENT-2036 Handle ClosedChannelException during SSL handshake (#3314) 2018-06-06 13:08:33 +01:00
Mike Hearn
468c0c7404
CORDA-1349: Docs: improve docs on permissioning, doorman and network map. (#3277)
* Docs: improve docs on permissioning, doorman and network map.

* Add a convenience serialization API for Java users, marked as
internal for now with a TODO to make it public after we start work on
Corda 4.0. Otherwise serializing arbitrary objects to AMQP is awkward.
2018-06-06 13:57:25 +02:00
Matthew Nesbit
d86ae5fc0b
I set the max retry time for AMQP at 5 minutes. This is just too long for any kind of sensible testing, so drop back to 1 minute. (#3294) 2018-06-05 10:30:35 +01:00
Thomas Schroeter
4bc9151d5d
Limit concurrency of the bootstrapper (#3271) 2018-06-01 11:55:46 +01:00
Shams Asari
7b09795795
CORDA-1383: Cleaned up the JSON format of WireTransaction and SignedTransaction (#3248)
In particular correctly outputs the custom state and command objects in the txs. Also fixed up deserialisation back into the transaction objects.
2018-05-30 16:37:41 +01:00
szymonsztuka
ed70fea3a7
CORDA-1548 Hibernate session not flushed before handing over raw JDBC session to user code (e.g. coin selection) (#3266)
* Hibernate session flushed before handing over raw JDBC session to user code + test - inserting and selecting cash in the same transaction
* Additional two tests copied from Enterprise repo
2018-05-30 16:19:06 +01:00
Matthew Nesbit
202bd6603b
Simplify the toString, so that printing ConnectionChange events into the log output only gives a summary and reduce logging. (#3247) 2018-05-29 18:18:31 +01:00
Michele Sollecito
f68cf6f712
[CORDA-1341]: Ensure API can be called concurrently wrt transactions. (#3235) 2018-05-29 15:25:34 +01:00
Rick Parker
59fdb3df67
CORDA-1475 CORDA-1465 Allow flows to retry from last checkpoint (#3204) 2018-05-25 13:26:00 +01:00
Matthew Nesbit
7ff008d4e3
Prevent bridge reconnection attempts on targets that present invalid/misconfigured/different certificates to protect nodes from dead identities. (#3225) 2018-05-24 16:53:09 +01:00
Michele Sollecito
61fedb5fd2
[CORDA-1528]: Node configuration not containing property "rpcSettings.address" fails with error "No configuration setting found for key 'address'" (fix). (#3229) 2018-05-24 13:20:04 +01:00
Shams Asari
3136e973a7
CORDA-1511: Kryo only used for node checkpoints and so moved out of serialization module and into node (#3228) 2018-05-24 12:18:07 +01:00
Katelyn Baker
cba83aca13
Move RxNotification serializer into the serialization package (#3214) 2018-05-22 15:17:18 +01:00
Michele Sollecito
48b126321b
Reverting API breaking change in PermissionException. (#3209) 2018-05-22 09:48:29 +01:00
Michele Sollecito
5de2c2aa4b
[CORDA-1264}: Complete obfuscation of exceptions to client side. (#3155) 2018-05-21 13:34:37 +01:00
Tudor Malene
455221629b
CORDA-1343 Make the RPCClient ssl constructors public. Clean up broke… (#3039)
* CORDA-1343 Make the RPCClient ssl constructors public. Clean up broker authentication logic

* CORDA-1343 small fix

* CORDA-1343 cleanup

* CORDA-1343 fixed api changes script

* CORDA-1343 fixed merge

* CORDA-1343 removed unused property

* CORDA-1343 add separate p2p and rpc node users

* CORDA-1343 remove test configuration

* CORDA-1343 fix tests

* CORDA-1343 address core review comments

* CORDA-1343 some documentation and adding createWithSsl method for a haAddressPool

* CORDA-1343 clean up the CordaRPCClient interface

* CORDA-1343 add internal shell test

* CORDA-1343 address code review comments

* CORDA-1343 split the internalShell user from the System Rpc user

* CORDA-1343 fix test

* CORDA-1343 Add warning when certificateChainCheckPolicies is being configured

* CORDA-1343 Address code review changes

* CORDA-1343 fix merge

* CORDA-1343 added test, docs, clarify comments

* CORDA-1343 clean up docs

* CORDA-1343 fix api

* CORDA-1343 fix merge

* CORDA-1343 fix merge

* CORDA-1343 fix merge

* CORDA-1343 fix merge
2018-05-21 13:05:08 +03:00
Thomas Schroeter
acefe4261c Bootstrap HA and BFT notaries 2018-05-18 18:33:49 +01:00
Stanly Johnson
ae5bacb4b4 Network bootstrapper check for duplicate node names (#3182) 2018-05-18 10:31:24 +01:00
Shams Asari
3cdd908714
Moved the serialisation logic in nodeapi.internal.serialization into its own module: serialization (#3179)
node-api now depends on this module and upcoming changes will use this as well rather than having to depend on node-api.

EnumEvolveTests.deserializeWithRename and EnumEvolveTests.multiOperations are temporarily ignored since their test resources can't be regenerated due to bugs.
2018-05-17 16:18:07 +01:00
Kat Baker
0c3a30edc8 Corda-847 - Remove Kryo for RPC
It's no longer used as we've switched over to AMQP for RPC calls so
remove it from everywhere and only use it for checkpointing

 * Wire up demo bench post Kryo removal
 * Test Fixes
 * rebase and fix tests
 * Test Fix
 * wip
 * revert changes to api now we don't need to add annotations
2018-05-17 12:55:45 +01:00
Kat Baker
f850daa582 CORDA-847 - AMQP RPC
* Client and server support for amqp
 * Observable (and supporting) serialisers
   Unit Tests
 * Fixing tests
 * Test fixes
 * CORDA-847 - Update api doc with additon of @CordaSerializable annotation
 * TestFixes
 * review comments
 * TestFixes
 * Test Fix
 * Test Fix
 * Test Fix
 * Test Fix
 * Test Fix
 * Test Fix
 * TestFix
 * Test Fix
 * Review Comments
2018-05-17 12:53:38 +01:00
Patrick Kuo
0b76a12637
CORDA-864 Wire up max message size (#3057)
* add checks on message size
* added size check in AMQP bridge
* passing maxMessageSize to AMQPClient and server
* added Interceptor to enforce maxMessageSize on incoming messages
2018-05-17 09:59:30 +01:00
Chris Rankin
d0d07287e7
Remove duplicate Netty classes from Node. (#3142)
* Remove duplicate Netty classes from Node.
* Force all Netty modules to our given version.
2018-05-15 12:35:00 +01:00
Katarzyna Streich
24fa695ca0
CORDA-866: Implement removal of stale nodes from network - backport (#3128)
* CORDA-866: Implement removal of stale nodes from network

Backported

* Implement removal of stale nodes from network

Add eventHorizon to NetworkParameters structure. Add republishing of
node info on 1 day intervals - it is treated by network map as heartbeat from node indicating if it's alive or not. Add removal of old node infos on network map signing.

* Add copy method to NetworkParameters data class

Add JvmOverloads annotation to the constructor, because it's data class
exposed in API

* Fix test
2018-05-15 12:10:04 +01:00
Chris Rankin
84d94d44ad
ENT-1463: Hide more AMQP ConcurrentHashMaps behind interfaces. (#3147) 2018-05-15 12:03:33 +01:00
Chris Rankin
4f9bbc8820
ENT-1463: Isolate more non-deterministic code from AMQP serialisation. (#3138) 2018-05-14 16:50:43 +01:00
Michele Sollecito
d027b5b8f2
[CORDA-1472]: Crackdown on warnings. (#3136) 2018-05-14 21:15:52 +07:00
Matthew Nesbit
3c005789c0
ENT-1850: Improve reporting of connection problems (#3124)
* Add nicer logging for SSL handshake problems

* Just in case let people see the horrid netty exception traces at trace level
2018-05-14 09:14:09 +01:00
Chris Rankin
a2de18b63c
ENT1463: Turn ClassCarpenter and SerializerFactoryFactory into interfaces. (#3121) 2018-05-11 15:42:12 +01:00
Chris Rankin
36d13124d5
ENT-1463: Refactor serialisation slightly for determinisation. (#3110) 2018-05-10 12:42:01 +01:00
Chris Rankin
3f21c47f39
Remove lingering Kryo reference from AMQP. (#3107) 2018-05-09 20:20:43 +01:00
Chris Rankin
fe88e9907c
ENT-1463: Replace getStackTraceAsString() with Throwable.initCause(). (#3101) 2018-05-09 16:36:17 +01:00
szymonsztuka
bb95156262
ENT-1447 Database transaction optional ability to retry on nested SQLException. (#3046)
Database transaction can be set to retry failure due to any exception with a cause or a nested cause of SQLException type.
Rationale: By the default transaction is retried only for SQLException. It may happen that SQL Exception is wrapped by Hibernate exception, allow to retry such cases if requested  e.g. database.transaction(recoverableFailureTolerance = 3, recoverAnyNestedSQLException = true) { .... }
2018-05-09 15:45:31 +01:00
Chris Rankin
781b50642a
ENT-1463: Prepare node-api for determination. (#3080)
* Prepare node-api for determination.
* Disentangle Kryo and AMQP classes.
* Add version properties for fast-classpath-scanner, proton-j and snappy.
* Remove String.jvm extension function.
* Refactor Cordapp reference out of AMQP serialisers' primary constructors.
2018-05-09 13:37:04 +01:00
Katelyn Baker
a61aa5d645
CORDA-847 - Pass serialization context down serialization call stack (#3062)
* CORDA-847 - Pass serialization context down serialization call stack

Needed for later work on AMQP RPC where we need to set per-thread
elements on a context. Could use some magic thread local but I'd rather
it was explicit on the stack and thus easier to reason about.

Additionally, now we're passing this around we can make better use of it
in the future

* Test Fix

* Test fixes

* REVIEW COMMENTS / CODE FORMAT

* Fix build issues
2018-05-03 16:09:03 +01:00
Matthew Nesbit
0494e45037
Remove debug logging left over from earlier AMQP development. (#2867) 2018-05-03 13:44:05 +01:00
Katelyn Baker
20570d72cf
CORDA-1238 - Move blob inspector initial work into experimental (#3058)
* CORDA-1238 - Initial blob inspector tool commit

Note this is WIP and not ready for prime time but it's time it moved off
of a personal branch and into the main code base, especially if I'm
passing the serialization code onto someone else's shoulders

* CORDA-1238 - Move blob inspector into experimental

It was developed locally in tools (as it's a tool), but it's no
where near production ready, so lets just ship it in experimental
for now

* CORDA-1238 - Tidyup and bug fixes
2018-05-03 13:25:29 +01:00
Katelyn Baker
0d3c7e7762
CORDA-847 - RPC Server lib refactoring (#3056)
Just as we did for the RPC CLient, refactor kryo specific elements into
their own sub module. Also move kryo specific components out of generic
RPC files.

Thus, adding AMQP support will be a much smoother operation
2018-05-02 15:48:41 +01:00
Viktor Kolomeyko
884928c956
CORDA-1416: Upgrade version of Proton-J library (#3050)
* CORDA-1416: Upgrade version of Proton-J library

* CORDA-1416: Compilation fixes following Proton-J upgrade

Reflects:
https://issues.apache.org/jira/browse/PROTON-1712
and
https://issues.apache.org/jira/browse/PROTON-1672

* CORDA-1416: Add an integration test to prove that data saved by from previous version can be read.

* CORDA-1416: Add additional check validate serialized form.
2018-05-02 15:14:45 +01:00
Katelyn Baker
0c680ae530
CORDA-1403 - Generics serialization issue (#3030)
When implementing a generic interface subtype check fails, need
to compare to the actual raw type
2018-05-01 16:27:54 +01:00
Michele Sollecito
5565b3e80d
[CORDA-1411]: Prevent MappedSchema caching from leaking memory. (#3042) 2018-05-01 19:32:29 +07:00
Shams Asari
adef57f127
Including FlowException in the RPC exception whitelist (CORDA-1264) (#3037)
These exceptions are designed to be propagated in P2P and so makes sense to keep them visible if the recipient is an RPC user.
2018-05-01 07:48:50 +01:00
Michal Kit
ab80df342a
CORDA-1319 Adding CRL checking for nodes (#2987)
* Adding CRL support for nodes

* Addressing review comments
2018-04-30 09:26:26 +01:00
bpaunescu
c3e6b39e59
artemis upgrade to 2.5.0 (#3029) 2018-04-27 19:54:08 +01:00
Michele Sollecito
235df69efe
[CORDA-1379]: Allow soft trapping of unknown config keys. (#3011) 2018-04-27 15:33:13 +07:00
Joel Dudley
efa69ce959
Whitelists Triple. 2018-04-27 08:57:28 +01:00
Thomas Schroeter
2ff3939e2e
Add exponential backoff to P2P messaging retry (#2975) 2018-04-26 13:58:41 +01:00
Chris Rankin
8e507d0b88
CORDA-1263: Replace deprecated kotlin-stdlib-jre8 with kotlin-stdlib-jdk8. (#2992) 2018-04-24 14:03:41 +01:00
Shams Asari
65525d74e7
CORDA-1325: Bootstrapper unable to whitelist two versions of the same contract simultaneously (#2980)
Also added unit tests
2018-04-24 10:51:24 +01:00
bpaunescu
c4ceca3787
Merge pull request #2989 from corda/ENT-1775-PR759
ENT-1775: reworked client to handle failover in HA mode instead of Artemis
2018-04-23 17:15:00 +01:00
Shams Asari
d3446e213c
Introduced a few more extension methods to Path, which are clearer than the static methods in Files. (#2985)
Also migrated code away from the old File API.
2018-04-23 14:31:49 +01:00
Viktor Kolomeyko
3aaa176dd4
CORDA-1355: Introduce a dedicated property which controls what is going to be in scope for classpath scanning (#2977)
* CORDA-1355: Introduce a dedicated property which controls what is going to be in scope for classpath scanning

* CORDA-1355: Update change log

* CORDA-1355: Minor change to improve readability.

* CORDA-1355: Custom serializers documentation update to mention new system property.
2018-04-23 13:55:40 +01:00
Viktor Kolomeyko
bf4d8ba08c
CORDA-1335: Scan attachment Jar only to speed-up the process. (#2982)
* CORDA-1335: Scan attachment Jar only to speed-up the process.

* CORDA-1335: Explicitly mention other types of contracts to scan.

* CORDA-1335: Refactor to eliminate listing different subclasses of Contract in two separate places.
2018-04-23 09:17:43 +01:00
bpaunescu
be083d6763 Added helper method for creating tcp transports from a list of host:port 2018-04-22 15:04:19 +01:00
Shams Asari
a684507553
Better cert path validation exception message for PartyAndCertificate.verify (#2976) 2018-04-18 17:27:03 +01:00
Shams Asari
60323cca15
CORDA-1312: Network bootstrapper copies any CorDapp jars into each nodes' cordapps dir (#2974) 2018-04-17 15:38:25 +01:00
Tudor Malene
9d2b7f0b7b
CORDA-1313 RPC whitelist TransactionVerificationException (#2965) 2018-04-16 13:29:36 +01:00
Christian Sailer
d8bf1019b6
CORDA-1336: Turn off direct delivery in Artemis via config (#2961)
* CORDA-1336: Turn off direct delivery in Artemis via config - this can
deadlock when the server gets busy and switches back and forth between
direct and async delivery if it can't keep up.

* CORDA-1336: put in a comment explaining the config setting.
2018-04-13 16:17:24 +01:00
Katarzyna Streich
91c52af5ac
ENT-1584: Subscribe to private network maps using UUIDs (#2922)
Client private network map implementation

Add private network maps UUIDs to config as extraNetworkMapKeys. Adjust NetworkMapServer implementation accordingly.
Change NetworkMapUpdaterTest to use NetworkMapServer instead of mock
2018-04-13 10:52:45 +01:00
Shams Asari
02913b284e
CORDA-1312: Removed the need to have whitelist.txt for updating the contracts whitelist using the bootstrapper. (#2954)
Instead the current whitelist is read in from the existing network parameters file.
2018-04-12 17:03:06 +01:00
Patrick Kuo
80c075b19e
Merge pull request #2958 from corda/pat/ent-1323-cherrypick
ENT-1323 Network map service to check all identities in submitted node info
2018-04-12 14:04:47 +01:00
Patrick Kuo
b5f304a104 ENT-1323 Network map service to check all identities in submitted node info (#499)
* ENT-1323 Network map service to check all identities in submitted node info

* fixup after rebase

* address PR issues, refactored createValidNodeInfo

* address PR issues

(cherry picked from commit f9ed55b)
2018-04-12 13:11:30 +01:00
Kat Baker
e6d352e446 Review comments 2018-04-12 12:09:17 +01:00
Kat Baker
03850dabc2 Review comments 2018-04-12 11:58:56 +01:00
Kat Baker
c783c431b1 Fix broken comment 2018-04-12 11:23:13 +01:00
Kat Baker
84914aa5c8 Remove commented out code 2018-04-12 11:18:39 +01:00
Katelyn Baker
f19bcea82f CORDA-1229 - Setter serialization fails with lists
Looks like the super / sub type inference of setter param vs
getter param is the wrong way around. Also, Setter Type should
be the generic type, not just the type

the property must be a supertype of the setter parameter

the getter must be a supertype of the setter parameter
2018-04-12 11:17:26 +01:00
Shams Asari
1b37cef822
Minor: use of ByteArray.inputStream() and introduced PublicKey.hash (#2931) 2018-04-05 17:18:27 +01:00
Michal Kit
c8b58a601f
Adding CRL support in the generated certificates. (#2932) 2018-04-05 16:39:41 +01:00
Shams Asari
53a0aae489
Introduced a few helper methods around InputStream.readBytes (#2928) 2018-04-05 14:27:42 +01:00
Michal Kit
71fa61020e
Adding a unit test for SignedNodeInfo verification (#2925) 2018-04-05 11:25:41 +01:00
Matthew Nesbit
0af42bda44
Fix a bug in the AMQP protocol wrapper code which gives incorrect reply address information on received packets. (#2914) 2018-04-04 11:23:09 +01:00
Michal Kit
2f1b8ff23e
Fixing SignedNodeInfoe security issue (#2908) 2018-04-03 15:49:06 +01:00
Michele Sollecito
0d1d7daedc
[CORDA-1264]: Ensure correct serialisation and masking for throwables raised by a node and propagated through RPC. (#2892) 2018-03-29 13:01:41 +01:00
Shams Asari
768dd32417
ENT-1663 - Inclusion of the cert path and root cert in the exception message when cert path validation fails. (#2890)
Also, added check to node startup that --initial-registration cannot occur in devMode
2018-03-28 15:18:50 +01:00
Katelyn Baker
6c9a39ae44
DOCS: Serialization roundtrip removes mutability explanation (#2888) 2018-03-28 09:40:21 +01:00
Katelyn Baker
e43b12c203
CORDA-1236 - Don't let Carpenter exceptions escape the serializer (#2852)
* CORDA-1236 - Don't let Carpenter exceptions escape the serializer

* Review comments

* Merge branch 'kat/bug/master/nestedCArpenterException' of https://github.com/corda/corda into kat/bug/master/nestedCArpenterException
2018-03-27 10:11:39 +01:00
Katelyn Baker
0f99efa768
CORDA-1213 - Explicitly disallow serialization of non static nested classes (#2824)
* CORDA-1213 - Explicitly disallow serialization of non static nested classes

WIP

* Review comments
2018-03-27 10:06:46 +01:00