2987 Commits

Author SHA1 Message Date
Shams Asari
73ca1601fb Merge remote-tracking branch 'open/master' into os-merge-68145e1
# Conflicts:
#	node/src/integration-test/kotlin/net/corda/node/flows/FlowOverrideTests.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt
#	tools/explorer/src/main/kotlin/net/corda/explorer/ExplorerSimulation.kt
2018-11-28 17:10:09 +00:00
Shams Asari
36fdb858c6 CORDA-2239: DriverDSL.startNode overload cleanup (#4252)
The overload that takes in a bunch of the node parameters with default values has been fixed to the V3 version. New node parameters since V3 now only exist in NodeParameters.

The reason for this is otherwise each new release of Corda that introduces new node parameters will force a new startNode overload to be added to DriverDSL to preserve backwards compatibility.

NodeParameters has been moved to its own file and logLevel is removed as it doesn't do anything.
2018-11-28 14:36:26 +00:00
Florian Friemel
9c59295250
Hsm simulator: Clean up existing docker images before running. 2018-11-28 14:16:04 +00:00
Michele Sollecito
ef7af7fc7d
Merge pull request #1607 from corda/merges/27_11_2018_16_42 2018-11-28 13:30:27 +00:00
Florian Friemel
95694a2c99
[ENT-2540] Azure Key Vault Integration for holding Legal Identity for nodes. (#1572)
* Add dependencies for Azure KeyVault.

* CryptoService implementation for Azure KeyVault.

* Exclude transitive dependencies from azure keyvault client in other modules.

* Integrate Azure KeyVault CryptoService into NodeConfiguration and AbstractNode.

* Improve ContentSigner for Azure KeyVault CryptoService.

* Fix missing import.

* Improve tests.

* Fix rebase error.

* Respond to feedback: Remove duplicate entry.

* Respond to feedback.

* Add better explanation for hard vs. soft keys.

* az keyvault alias validation.

* Respond to feedback.
2018-11-27 18:53:38 +00:00
Michele Sollecito
501929e91c Merge remote-tracking branch 'remotes/open/master' into merges/27_11_2018_16_42
# Conflicts:
#	node/src/integration-test/kotlin/net/corda/node/AddressBindingFailureTests.kt
#	node/src/integration-test/kotlin/net/corda/node/amqp/AMQPBridgeTest.kt
#	node/src/integration-test/kotlin/net/corda/node/amqp/ProtonWrapperTests.kt
#	node/src/integration-test/kotlin/net/corda/node/modes/draining/FlowsDrainingModeContentionTest.kt
#	node/src/integration-test/kotlin/net/corda/node/modes/draining/P2PFlowsDrainingModeTest.kt
#	node/src/integration-test/kotlin/net/corda/node/modes/draining/RpcFlowsDrainingModeTest.kt
#	node/src/integration-test/kotlin/net/corda/node/persistence/H2SecurityTests.kt
#	node/src/integration-test/kotlin/net/corda/node/services/messaging/ArtemisMessagingTest.kt
#	node/src/integration-test/kotlin/net/corda/node/services/network/NetworkMapTest.kt
#	node/src/integration-test/kotlin/net/corda/services/messaging/AdditionP2PAddressModeTest.kt
#	node/src/main/kotlin/net/corda/node/services/schema/NodeSchemaService.kt
#	samples/attachment-demo/src/integration-test/kotlin/net/corda/attachmentdemo/AttachmentDemoTest.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/NodeBasedTest.kt
2018-11-27 16:55:40 +00:00
Michele Sollecito
dc1f5f0ccd
[CORDA-2257]: Enabling optional global test port allocation (#4310) 2018-11-27 16:40:30 +00:00
Tudor Malene
06ebb97a31
Fix cache races. (#4311) 2018-11-27 16:36:02 +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
szymonsztuka
50c2112a2b Merge OS to Enterprise 2018-11-27 12:53:31 +00:00
Florian Friemel
ca1ff6663f
Fix problems with hsm simulator (#1587)
* Fix problems with hsm simulator

  - run on different port (was starting at 10000, conflictiong with
    other tests
  - make the hsm simulator a @ClassRule instead of a @Rule in the
    UtimacoCryptoServiceIntegrationTest so it's only started once
    and not for every test.

* Use different port for hsm simulator.

* Fixed UtimacoNodeRegistrationTest so that it shares the same PortAllocation between the test, doorman and hsm
2018-11-27 05:54:51 +00:00
Thomas Schroeter
b881fbd330
Throughput is private in PersistentUniquenessProvider (#4302) 2018-11-26 19:15:06 +00:00
Shams Asari
152975d044
Merge pull request #1600 from corda/os-merge-5d43f31
O/S merge 5d43f31
2018-11-26 18:44:16 +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
Thomas Schroeter
85ebd57f90
ENT-2783 Implement ETA for backpressure in JPA and MySQL uniqueness providers (#1599)
* Implement ETA for backpressure in JPA uniqueness provider

* Pass eta threshold to validating notary flow

* Add ETA to MySQLUniquenessProvider

* Restore default eta message threshold in ValidatingNotaryFlow

Reducing the OS-ENT diff.

* Throughput var is private
2018-11-26 16:46:12 +00:00
szymonsztuka
d399e3c242
CORDA-2232 external id to pub key mapping - fixes
Fixes in PersistentKeyManagementService.kt, VaultSchema.kt, and vault-schema.changelog-v8.xml. (#4295)
2018-11-26 16:03:06 +00:00
Shams Asari
61f2183328 Merge remote-tracking branch 'open/master' into os-merge-5d43f31 2018-11-26 15:28:19 +00:00
Shams Asari
3b8a74fe44
CORDA-2114: SwapIdentitiesFlow is now inlined (#4260)
This is to fix the security issue whereby any counterparty is able to generate anonymous identities with a node at will without checks.
2018-11-26 09:41:14 +00:00
rick.parker
a21217ccc9 Add default value to NonValidatingNotaryFlow so other notaries compile by default. 2018-11-26 09:36:59 +00:00
rick.parker
30813e4497 Fix compilation issue in FlowStateMachineComparatorTest 2018-11-26 08:50:01 +00:00
rick.parker
aee0ebdc7b Apply notary back pressure code to MultiThreadedStateMachineManager to fix compilation 2018-11-26 08:48:00 +00:00
rick.parker
b6736cbaf9 Merge remote-tracking branch 'remotes/open/master' into parkri-os-merge-20181126-1 2018-11-26 08:44:08 +00:00
Thomas Schroeter
4e55694216 ENT-2356 NotaryServiceFlow backpressure (#4242) 2018-11-23 17:45:36 +00:00
Shams Asari
3e8c7ba9bc Merge fixes to make sure the crypto service config is intact 2018-11-23 17:31:22 +00:00
Shams Asari
3af241c93d Merge branch 'merge-point-49d1cee' into shams-os-merge-231118
# Conflicts:
#	.idea/compiler.xml
#	node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt
#	node/src/main/kotlin/net/corda/node/services/config/NodeConfigurationImpl.kt
#	node/src/main/kotlin/net/corda/node/services/config/schema/v1/V1NodeConfigurationSpec.kt
#	node/src/test/kotlin/net/corda/node/services/config/NodeConfigurationImplTest.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/InternalMockNetwork.kt
2018-11-23 17:20:55 +00:00
Shams Asari
2dfb88ac14 Merge branch 'merge-point-4c8dabc' into shams-os-merge-231118 2018-11-23 17:14:45 +00:00
Shams Asari
6f79e60a9d Merge branch 'merge-point-c419605' into shams-os-merge-231118
# Conflicts:
#	CONTRIBUTING.md
#	build.gradle
#	docs/source/api-scanner.rst
#	docs/source/building-corda.rst
#	docs/source/contributing-index.rst
#	docs/source/contributing.rst
#	docs/source/testing.rst
#	node/capsule/build.gradle
#	node/src/main/kotlin/net/corda/node/services/schema/NodeSchemaService.kt
#	node/src/main/resources/migration/vault-schema.changelog-master.xml
2018-11-23 16:34:49 +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
Dominic Fox
729469483f Resolve merge conflict 2018-11-23 14:35:47 +00:00
Roger Willis
9b15d4dafb CORDA-2232: external id to pubkey mapping (#4210)
* First pass
Update test.
Address review comments.
Added docs and kdocs.
Clean-up.

* Addressed review comments.

Changes to docsite.

* First pass at account service.
Added new hibernate schemas and liquibase scripts.
Added indexes to new tables.
Removed mock network.
Removed fresh key for external id from key management service.
Removed some redundant changes.
Rebase to master.

* Clean up.

* Added try/catch block as recommended by Andras.

* Removed accounts test to another branch.
Removed element collections from fungible states and linear states table.
Added a new state_parties table which stores x500 names and public key hashes.
Added a view which can be used to query by external ID.

* 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.

*  This is a combination of 10 commits.
 This is the 1st commit message:

Shortened table name.

 This is the commit message #2:

Minor changes.

 This is the commit message #3:

Common criteria parser now returns a predicate set which is concatenated to the predicate sets of sub-class criteria.

 This is the commit message #4:

Fixed api compatibility issue.
Reverted some changes to reduce size of PR.

 This is the commit message #5:

Multiple states can now be mapped to the same externalId.
Multiple externalIds can now be mapped to the same state.

 This is the commit message #6:

Relaxed upper bound type constraint in some of the vault types.

 This is the commit message #7:

Added comment to test.

 This is the commit message #8:

Changed name of external id to public key join table.
Removed some comments/TODOs.

 This is the commit message #9:

Added docs.
General clean up.

 This is the commit message #10:

Fixed participants query bug and updated unit test.

* Removed unused code.
2018-11-23 14:29:57 +00:00
James Brown
4cd77dca3a CORDA-2199 NetworkParameters certificate role (#4278) 2018-11-23 14:27:28 +00:00
Tudor Malene
0a6c3822e5 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-23 14:27:28 +00:00
Thomas Schroeter
08ae58529a [CORDA-2243] Notary client should sign over NotarisationRequest serialised with object referencing turned off (#4264)
* Sign later to make sure the notary service constructs the same serialized bytes

* Add non validating notary tests

* Revert "Sign later to make sure the notary service constructs the same serialized bytes"

This reverts commit cefba5c350622df44227e89feacb12a7f12e1f7e.

* Dereference SecureHashes before creating the notarisation request signature

* Update comment

* Address comments

* Undo accidental renaming
2018-11-23 14:27:27 +00:00
Andrius Dagys
bc48f8112e Address util tests: remove invalid test case (#4269)
Local host address can also be public
2018-11-23 14:27:27 +00:00
Viktor Kolomeyko
035656bd89 ENT-2653: Introducing CommonCliConstants (#4265) 2018-11-23 14:26:01 +00:00
Konstantinos Chalkias
7e9ee19789 [CORDA-2218] CryptoService signingCertificateStore alias match (#4227) 2018-11-23 14:25:41 +00:00
Florian Friemel
4f9efdda2e Disable utimaco integration tests. (#1593) 2018-11-23 14:16:29 +00:00
Thomas Schroeter
8f15cfaa28
[ENT-2769] Handle reference states in the PersistentUniquenessProvider (#4275)
* Handle reference states in the PresistentUniquenessProvider

* Complete test

* Re-notarise outside time window without input states

* Address comments

* Add missing column name
2018-11-23 11:52:41 +00:00
Shams Asari
49d1cee6d4
Removed crypto service config (#4284) 2018-11-22 20:30:37 +00:00
Thomas Schroeter
df2c313f23
ENT-2769 Handle reference states in the JPAUniquenessProvider (#1586)
* Handle reference states in the JPAUniquenessProvider

* Remove unused import
2018-11-22 19:25:13 +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
Roger Willis
c41960520c
CORDA-2232: external id to pubkey mapping (#4210)
* First pass
Update test.
Address review comments.
Added docs and kdocs.
Clean-up.

* Addressed review comments.

Changes to docsite.

* First pass at account service.
Added new hibernate schemas and liquibase scripts.
Added indexes to new tables.
Removed mock network.
Removed fresh key for external id from key management service.
Removed some redundant changes.
Rebase to master.

* Clean up.

* Added try/catch block as recommended by Andras.

* Removed accounts test to another branch.
Removed element collections from fungible states and linear states table.
Added a new state_parties table which stores x500 names and public key hashes.
Added a view which can be used to query by external ID.

* 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.

*  This is a combination of 10 commits.
 This is the 1st commit message:

Shortened table name.

 This is the commit message #2:

Minor changes.

 This is the commit message #3:

Common criteria parser now returns a predicate set which is concatenated to the predicate sets of sub-class criteria.

 This is the commit message #4:

Fixed api compatibility issue.
Reverted some changes to reduce size of PR.

 This is the commit message #5:

Multiple states can now be mapped to the same externalId.
Multiple externalIds can now be mapped to the same state.

 This is the commit message #6:

Relaxed upper bound type constraint in some of the vault types.

 This is the commit message #7:

Added comment to test.

 This is the commit message #8:

Changed name of external id to public key join table.
Removed some comments/TODOs.

 This is the commit message #9:

Added docs.
General clean up.

 This is the commit message #10:

Fixed participants query bug and updated unit test.

* Removed unused code.
2018-11-22 14:31:34 +00:00
Michele Sollecito
89ea638d05
[CORDA-2249]: Specified unique applicationId in Capsule manifest. (#1585) 2018-11-22 13:53:29 +00:00
Michele Sollecito
33ce00e8b1
[CORDA-2244]: Specified unique applicationId for Capsule manifest. (#4283) 2018-11-22 13:53:14 +00:00
Florian Friemel
b411ad6665
[ENT-2539] Implement support for holding node Legal Identity keys in Ultimaco HSM (#1571)
* Add dependencies for Utimaco HSM.

  The CryptoServerJCE.jar was added in node/lib.
  The node/capsule/build.gradle excludes this jar from
  the final corda.jar.

* Copy the HSM Simulator utility from Network Services.

  HsmSimulator.kt uses the spotify docker client to pull an
  image with a pre-configured hsm simulator from our docker
  registry and run it in integration tests.

* Implementation of the CryptoService interface for Utimaco HSM.

* Integration test for Utimaco CryptoService.

* Unit tests for UtimacoCryptoService (only config parsing).

* Integrate Utimaco CryptoService in AbstractNode and NodeConfiguration.

* Respond to Feedback: Remove copyright notice.

* Respond to PR Feedback: Improve integration test.

* Use custom overrides in DriverDSLImpl.startNodeRegistration

* Make Utimaco dependencies compileOnly and testCompile.

* Add integration test for registering a node that is backed by utimaco HSM.

* Respond to feedback: move HsmSimulator to different package.

* Make NodeConfiguration.cryptoServiceConf a Path instead of String.

* Add Keyfile-based login.

* Respond to feedback -- default signing algorithm.

* Respond to feedback: naming.

* UtimacoNodeRegistrationTest: explicitly verify that tx signature is valid.

* Respond to feedback: Static import assertThat.

* Rename key file for test login so it's not ignored.
2018-11-22 13:40:50 +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
Thomas Schroeter
489e719b54
[CORDA-2243] Notary client should sign over NotarisationRequest serialised with object referencing turned off (#4264)
* Sign later to make sure the notary service constructs the same serialized bytes

* Add non validating notary tests

* Revert "Sign later to make sure the notary service constructs the same serialized bytes"

This reverts commit cefba5c350622df44227e89feacb12a7f12e1f7e.

* Dereference SecureHashes before creating the notarisation request signature

* Update comment

* Address comments

* Undo accidental renaming
2018-11-21 16:50:32 +00:00
Andrius Dagys
6c69d9ae0a Address util tests: remove invalid test case (#4269)
Local host address can also be public
2018-11-21 12:13:04 +00:00
szymonsztuka
58056d4ea9
Improve integration tests to run in database mode - Sql setup for new test, cleanup of new test table. (#1582) 2018-11-21 09:47:29 +00:00