Commit Graph

1577 Commits

Author SHA1 Message Date
Michele Sollecito
142f52fa82
[CORDA:936]: Enable RPC layer to work with SSL 2018-01-23 16:23:37 +00:00
Christian Sailer
8d5611853a
CORDA-929 Attachment caching (#2372)
* ENT-1403 Cache node attachments (and attachment content)

* ENT-1403 Make cache sizes configurable

* Update documentation with new config parameters

* Test that non-existence of attachments is not cached

* Remove unneeded defaults in interface

* It turned out we need the defaults on the interface in quite a few tests

* Codereview: typos, size in MB rather than bytes, charset in tests, move concurrencyLevel to a constant

* Codereview: Make the internal config value bytes again, but config file in MB

* Fix example config unit test
2018-01-22 13:41:06 +00:00
Andrzej Cichocki
1fc646cfa8 CORDA-716 Move test-utils and node-driver to stable API section in docs (#2335)
* Move test-utils and node-driver to stable section.

* Move FlowStackSnapshotFactory to testing.services package & update docs

* Move SerializationTestHelpers to testing.core package

* Move TestConstants.kt to core namespace

* Move Expect.kt to core namespace

* Move CoreTestUtils to core.TestUtils - rename class and update imports

* Added some clarification to documents after re-reading them

* Added static imports

* Removing unused import

* Fix merge conflict

* Fixing merge conflict
2018-01-22 11:28:41 +00:00
szymonsztuka
f59560bb06
Database schema changes. (#2389)
Changes compatible with R3.Corda (ENT-794):
1) Added Hibernate corda-wrapper-binary two to to columns.
2) Shorten names of tables in dummy schemas used in tests.
3) Undo removal of compound index of VaultTxnNote (b423fea).
4) Assertions for 2 vault tests don't rely on order of rows.
2018-01-19 17:09:02 +00:00
Mike Hearn
ac7637e2b4 Revert "CORDA-599 RPCSecurityManager is no longer lateinit (#2347)"
This reverts commit 75e74e67a1.
2018-01-19 17:52:59 +01:00
cburlinchon
de4c062529
Node restarted with shutdown executor (#2391)
* Test for node restart
* Executor gets shutdown on stop, make sure we have one on start
* Reset shutdown otherwise AbstractNode.stop never gets called
2018-01-19 10:19:12 +00:00
Katarzyna Streich
af081a7170
Remove primary key constraint on DBHostAndPort (#2318)
Remove primary key constraint on DBHostAndPort

Return always first node if more are matching by address.
2018-01-18 16:23:41 +00:00
Andrzej Cichocki
bbcafca959
Retire DatabaseTransactionManager. (#2385) 2018-01-18 10:11:34 +00:00
josecoll
e699dad076
CORDA-917 Bootstrap nodes without Notary schemas (by default) (#2376)
* Default jolokia version with optional override in CorDapp project gradle file.

* Bootstrap a node without Notary schemas by default.

* Revert unrelated Jolokia code change.

* Revert unrelated Jolokia code change.

* Addressed PR review feedback.
2018-01-18 10:10:06 +00:00
Shams Asari
d19eb4a9d7
Removed useHTTPS from NodeConfiguration as it's not needed by the node. (#2375)
It's still expected to be present in node.conf if the web server needs to use SSL.
2018-01-17 17:47:40 +00:00
Matthew Nesbit
6edf95506b
Rename the inbox (#2360)
Add changelog entry

Address review comments

Alternate solution to service queues

Fixup after merge
2018-01-17 16:06:31 +00:00
Andrzej Cichocki
ea57639a37
CORDA-924 Fix IntegrationTestingTutorial (#2349)
i.e. H2 startup bug. also:
* Fix poor connection pool discipline
* Log cleanup failures instead of replacing foreground failure
2018-01-17 14:23:13 +00:00
Christian Sailer
fca0afe591
CORDA-928 Caching in the NetworkMapCache (#2358)
* CORDA-928 cache query results via `getPeerByLegalName` and `getNodesByIndentityKey` to avoid hitting the DB hard in RPC handling.

* Skip cache invalidation during init() - caches are still null.

* Remove registeredNodes/partyNodes caching of data feed.
Rewrite data feed to be initialised off the DB.
Add start method to trigger readyness/artemis listeners if there are nodes in the DB.

* Invalidate cache last rather than first when updating
2018-01-16 21:15:15 +00:00
Anthony Keenan
1367cd4adb
CORDA-912 Stop exposing internal node user, create user in testing infrastructu… (#2361)
* Stop exposing internal node user, create user in testing infrastructure instead

* Update kdocs
2018-01-15 19:30:33 +00:00
Andrzej Cichocki
75e74e67a1
CORDA-599 RPCSecurityManager is no longer lateinit (#2347) 2018-01-15 19:11:00 +00:00
Christian Sailer
5e7d2f00ae
ENT-1389 Modify the HibernateObserver to persist states by schema (and only create a session per schema, not one per state per schema) (#2366) 2018-01-15 15:19:32 +00:00
Christian Sailer
df195b20bd
ENT-1383 Memory weight based transaction cache (#2355)
* ENT-1383 Make the transaction cache in DBTransactionStorage memory-weight based (rather than count based) so large transactions can no longer use an undue amount of memory.

* Code review: formatting and legibility

* Fix stupid type cast error

* More formatting
2018-01-15 13:48:55 +00:00
igor nitto
2082168cf7
Close Hikari CP around external auth database on shutdown (RPCSecurityManagerImpl.kt) (#2359) 2018-01-15 09:57:44 +00:00
Andrius Dagys
fb1d3087de Raft notaries can share a single key pair for the service identity (in contrast to a shared composite public key, and individual signing key pairs). This allows adjusting the cluster size on the fly. 2018-01-13 16:36:41 +00:00
Andrius Dagys
7311111c9c
Re-enable notary idempotence test (#2356)
* Re-enable notary idempotence test
2018-01-12 20:25:49 +00:00
Andrius Dagys
219d6f8b12 Un-ignore several integration tests 2018-01-12 18:19:02 +00:00
Shams Asari
bbfbb08c43
CORDA-881: Signed network parameters has the network map cert attached to it instead of just the public key. (#2346)
Introduced DigitalSignatureWithCert and SignedDataWithCert as internal APIs, with the expectation that they will become public; renamed the network parameters end-point to network-parameters; updated the network-map.rst doc; and did some refactoring.
2018-01-12 07:59:08 +00:00
Andrius Dagys
0a56c75543 Minor: AuthDBTests - close RPC connections to prevent thread leaks 2018-01-11 12:00:02 +00:00
igor nitto
8b5ad9d5c0
Remove unused class DefaultCordaRpcPermissions (#2328) 2018-01-11 10:45:33 +00:00
Tudor Malene
c2bd7403a8
hibernate mapping changes (#2337)
* add foreign key names and move the participants mapping to the subclass so that the table name can be configured

* update api-current file

* fix compilation errors

* PR changes

* PR changes
2018-01-10 11:42:08 +00:00
Anthony Keenan
979d7f2c63
ENT-1226 Improve Network client Error Handling (#2344)
* Improve Network client Error Handling

* Reformatted NetworkMapServer

* Removed line that is now redundant
2018-01-09 16:55:16 +00:00
Andrius Dagys
a6cf04b49c Ignore flaky Raft Notary integration test while it's being investigated 2018-01-09 16:07:07 +00:00
Andrius Dagys
63e1bdaa94 Revert "Raft notaries can share a single key pair for the service identity (i… (#2269)"
This reverts commit 3e00676851.
2018-01-09 12:20:25 +00:00
Andrius Dagys
3e00676851
Raft notaries can share a single key pair for the service identity (i… (#2269)
* Raft notaries can share a single key pair for the service identity (in contrast to a shared composite public key, and individual signing key pairs). This allows adjusting the cluster size on the fly.
2018-01-09 08:17:59 +00:00
Andrzej Cichocki
9d66214f4a
CORDA-891 Convert NodeSchedulerServiceTest into a unit test (#2273) 2018-01-05 16:34:03 +00:00
Katelyn Baker
ab76ef4deb REMOVING FLAKEY TESTS TILL THEYRE STABILISED 2018-01-05 15:05:10 +00:00
Katelyn Baker
694721e8ba TEMP removal of SSH tests till they're made determinsitic (#2325) 2018-01-05 14:07:55 +00:00
igor nitto
00b570df29
Improve RPC security test coverage [CORDA-827] (#2320)
* Added test cases covering encrypted password usage
 * Renamed UserAuthServiceTests as AuthDBTests: the integration tests checking user credentials loaded from external database (still limited to H2 in-memory for now).
 * Some internal renamings
2018-01-05 11:50:21 +00:00
Konstantinos Chalkias
48be562a2a
ECDSA entropyToKeyPair + no idempotent signatures (#2210) 2018-01-04 17:52:31 +00:00
Ross Nicoll
412fead02e
CORDA-785: Add functions for constructing FlowLogicRef without the class (#2134)
Add functions for constructing `FlowLogicRef` from class name, rather than requiring the class itself. This avoids requiring that schedulable states have access to the scheduled flow to instantiate, but instead can require it only actually scheduling the flow. This reduces the size of the JAR required to validate transactions containing these states.
2018-01-04 13:32:10 +00:00
Shams Asari
d84105b60e
Using X509Certificate consistently throughout, rather than BC's X509CertificateHolder. (#2305)
The later is now only used where needed. This has reduced the amount of converting we have to do back and forth.
2018-01-03 22:00:39 +00:00
Shams Asari
20683c3239
Added checks on the received node CA cert from the doorman service. (#2301) 2018-01-02 15:51:13 +00:00
Shams Asari
730fec2eb4
Internal driver now also does the registration for the notaries. (#2304)
Using the --just-generate-node-info flag for the notary nodes so that their identities can be submitted to the network map server, which does the network parameters generation.
2018-01-02 15:12:30 +00:00
Andrzej Cichocki
fe3c2b3983
CORDA-891 Refactoring for #2273 (#2306)
* Make FlowLogicRefFactoryImpl a class.

* Replace instanceof with polymorphism.

* Fix out-of-scope spelling error.
2018-01-02 13:11:43 +00:00
Shams Asari
07258c0a16
Moved configureTestSSL out of testing API and made it internal. (#2297) 2018-01-02 09:15:26 +00:00
Shams Asari
4a2f157118
Validating the entire cert path in node registration, rather just checking the root cert. (#2298)
Also reduced duplicate code when creating the node CA cert path for testing, and renamed IdentityGenerator to DevIdentityGenerator.
2017-12-29 14:38:30 +00:00
Shams Asari
39d25958e2
Fixed identity generation of single node notaries as used by the driver and MockNetwork. (#2296)
The identity cert generated used to be of type SERVICE_IDENTITY when it should have been a LEGAL_IDENTITY.
2017-12-28 15:32:09 +00:00
Alberto Arri
6db0490750
Fix node integration tests. (#2233)
* Add tests for node registration and communication
2017-12-21 11:48:00 +00:00
josecoll
a2d14bd20d
Exclude jolokia packages from Quasar instrumentation. (#2279) 2017-12-21 11:06:44 +00:00
szymonsztuka
ad23bb8754
BFTNotaryServiceTests - instantiate MockServices before each test, not at the class level. (#2281)
* change to align with enterprise repo
2017-12-21 09:50:21 +00:00
Shams Asari
e1e715ee81 Removed all remaining special treatment of the X500 common name.
With network parameters the CN is no longer needed to identify notaries. This frees it up to be used in the node's name alongside the other attributes.

Also, the identity generation logic has been simplified, removing the need to have magic string values for storing distributed identities in the keystore. Now there are just two alias prefixes: "identity" as it was previously, and "distributed-notary".
2017-12-18 21:39:11 +00:00
Ross Nicoll
22af527b79
CORDA-869: Clean up error reporting in node config/registration (#2268) 2017-12-18 16:54:49 +00:00
Ross Nicoll
21f0892deb
CORDA-831: Add roles to X509 certificates (#2180)
* Add roles to X509 certificates so that the identity service can always determine which certificate in a hierarchy is the well known identity
* Rename CLIENT_CA certificate type to NODE_CA
* Rename DOORMAN role to INTERMEDIATE_CA
* Correct issue in CashTests where instead of providing a well known identity to generateSpend(), a confidential identity was passed in and a confidential identity generated from it.
* Enforce role hierarchy in PKI
* Enforce that party certificates must be well known or confidential identities
* Add network map certificate role
2017-12-18 16:23:34 +00:00
Ross Nicoll
166918c62c
CORDA-869: Stop silently dropping node configuration errors (#2267) 2017-12-18 15:17:18 +00:00
Shams Asari
00a5e3db6b CORDA-830 Introducing the network bootstrapper
Copying of the node-info files moved out of Cordform and into NetworkParametersGenerator (which is now called NetworkBootstrapper). This class becomes an external tool to enable deployment of nodes in a test setup on a single filesystem.
2017-12-17 23:49:57 +00:00