Commit Graph

501 Commits

Author SHA1 Message Date
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
Katelyn Baker
91cdcc6752
CORDA-1258 - Only register custom serializers once (#2862)
* CORDA-1258 - Only register custom serializers once

* Review comments

* Fix test
2018-03-26 19:09:03 +01:00
Katelyn Baker
c3031b182b
ENT-1665 - Update fast-classpath-scanner version to 2.12.3 (was 2.0.21) (#2877)
Problem manifests now that the classpath scanner is used by the
serialisation framework in factory initialization to locate pluggable
serializers. The actual thrown error is

    java.lang.RuntimeException: Unknown constant pool tag

Given this is a known issue and a fixed bug it makes sense to move the
version forward. Unfortunately at this time we cannot move beyond
2.12.3 as 2.12.4 and later versions (up to the latest 2.18.1) exhibit
some other error that needs investigating. Thus, move to the latest
version that is stable for our current set of use cases.

More information on the nature of the problem exhibited by moving beyond
2.12.3 can be found on the linked Jira (ENT-1665) as well as details on
reproducing the issue moving forward to 2.12.3 fixes.
2018-03-26 14:24:43 +01:00
Shams Asari
620ba1e8a2
Integration test for network parameter updates and improved logging (#2863) 2018-03-22 14:08:07 +00:00
bpaunescu
ac9cb59a6e
Fix RPC flaky test (#2849)
* fix rpc reconnect flaky test; remove obsolete rpcproxy log message

* rpc client proxy: replace lock with atomic variable

* rpc client proxy: removed volatile property

* RPCStabilityTests: used eventually() method to test async response

* RPCStabilityTests: remove unused import
2018-03-20 16:23:29 +00:00
Michal Kit
144632818c
Adding the X509CRL custom serializer. (#2844)
CORDA-1233

* Adding the X509CRL custom serializer.

* Addressing review comments
2018-03-20 15:42:25 +00:00
Tudor Malene
1a1cd94161
ENT-1564 - add additional uploader check to the HashConstraint (#2845) 2018-03-20 10:17:44 +00:00
igor nitto
8591ae2dc9
CordApps back in node classpath (#2843) [CORDA-1232] 2018-03-19 14:34:02 +00:00
Shams Asari
327d7d8acf
Added sign helper method to CertificateAndKeyPair for producing SignedDataWithCert objects (#2841) 2018-03-19 12:47:23 +00:00
Michal Kit
15e4449b38
Adding BigInteger serialization support (#2804)
* Adding BigInteger serialization support

* Addressing review comments
2018-03-15 10:11:01 +00:00
Michal Kit
27e45bc865
Adding public key verification to the X509Utilities.createCertificateSigningRequest (#2784) 2018-03-15 08:42:36 +00:00
igor nitto
2cff495553
Remove CordApps JARs from node classpath [CORDA-1135] (#2691) 2018-03-14 16:42:23 +00:00
Rick Parker
a24a2105b1
CORDA-1217 Replace Guava caches with Caffeine (#2818) 2018-03-14 16:07:31 +00:00
Michal Kit
1a6f7bc2c0
Whitelisting CRLReason class (#2803) 2018-03-14 08:05:00 +00:00
Shams Asari
9afcbb16a2
Unwrapping InvocationTargetException during config parsing (#2811) 2018-03-14 07:04:25 +00:00
Katelyn Baker
6fbc6a55cf
CORDA-1186 - Actually move annotation into core module, not just core namespace (#2789) 2018-03-12 11:47:58 +00:00
Andrius Dagys
a3bf4577f3 CORDA-696 - Ensure deterministic transaction id calculation for contra… (#2676)
The problem with the previous implementation is that the transaction would be deserialized with the schema specified
in the serialized form, but the calculation of the id would involve re-serializing properties using a local serialization context
which might produce a different result.
2018-03-09 14:39:31 +00:00
Katelyn Baker
198fb4f264
CORDA-1192 - Quieten message when reflecting on a builtin Kotlin type (#2767)
* CORDA-1192 - Quieten message when reflecting on a builtin Kotlin type

* review comments
2018-03-08 23:07:41 +00:00
Matthew Nesbit
b3203c9f3e
Remove a mistakenly duplicated constant defined on ArtemisMessagingComponent (#2765) 2018-03-08 12:44:05 +00:00
Konstantinos Chalkias
d70cd26a7c
Kdoc/comment updates (#2626) 2018-03-08 10:52:07 +00:00
Katelyn Baker
e6ed91df8b
CORDA-1186 - Move ConstructorForDeserialization out of internal (#2759)
Since it's a user facing object it shouldn't exist in an internal
package. Move to core to exist with the other serialization annotations
2018-03-07 16:02:01 +00:00
Matthew Nesbit
519644ce0d
CORDA-1170: Define and whitelist the Artemis/AMQP application headers that are accepted by Corda (#2728)
* Whitelist headers copied across bridges

* Address PR comments
2018-03-07 08:56:58 +00:00
Matthew Nesbit
81f4bbcaf3
Fix flaky bridge test and an associated deadlock during rollback in the BridgeManager code. (#2739) 2018-03-06 10:49:29 +00:00
Tudor Malene
5efea22a9b
Network Bootstrap changes to master (#2736)
* Added exclude whitelist to Network Bootstrapper to enable fine grained testing (#2666)

* Added exclude whitelist to Network Bootstrapper to enable fine grained testing.

* code review change

(cherry picked from commit d4f9b10)

* CORDA-1150 - better log messages (#2721)

* CORDA-1150 better log messages

* CORDA-1150 better log messages

* CORDA-1150 better log messages

(cherry picked from commit 87c5ad8)

* fixed merge

* remove unused function
2018-03-05 19:10:48 +00:00
Katelyn Baker
d116b5e9f4
CORDA-1140 - FOR RPC Client P2P context use AMQP (#2716)
* CORDA-1140 - FOR RPC Client P2P context use AMQP

* Review comments

* Review comments

* review comments

* review comments
2018-03-05 18:05:32 +00:00
Andrzej Cichocki
26fe90c8e9
CORDA-973 Allow deserialization of any checkpoint/storage encoding. (#2693) 2018-03-05 10:11:26 +00:00
Katelyn Baker
799d90b350
CORDA-1134 - Don't use private serializes for all caps public properties (#2692)
* CORDA-1134 - Don't use private serializes for all caps public properties

* Small fix

* Review Comments
2018-03-02 13:21:27 +00:00
Katelyn Baker
06a6eace67
CORDA-1115 - Cannot serialize private nested objects (#2665)
* CORDA-1115 - Cannot serialize private nested objects

Shown up by the simm-valuation-demo the problem was where a private
object field of an object was being serialised within the outer objects
context (see tests added for example)

Fix is to switch from Kotlin reflection back to Java.

Additional fix to the test where it was comparing two lists of state
references in a flow and they weren't equal because they weren't in the
same order... This I assume is just an oversight (in that them being
in a different order but otherwise the same is actually fine) so
converting to set comparison

* Fix forward port issue where fingerprinting has moved

* Review Comments

* Review Comments

* Review Comments

* Gran -> Grab
2018-03-02 13:13:00 +00:00
Shams Asari
8616f24523
CORDA-1048: Making it simpler to move an existing local deployment of nodes to across different machines. (#2672)
This was achieved by having the hash in the node-info file to be just of the node's X.500 name. This also solves existing duplicate node-info file issues that we've been having.

Also updated the docsite.
2018-03-01 21:24:10 +00:00
Michele Sollecito
b580a2ac30
[CORDA-926]: Parsing NodeConfiguration will now fail if unknown properties are present. (#2484) 2018-03-01 14:57:36 +00:00
Christian Sailer
0ff37c0437
CORDA-1122 Switch AMQP bridge to use auto-commit sends and acks (#2661)
* CORDA-1122 Switch AMQP bridge to use auto-commit sends and acks

* CORDA-1122 Codereview: Add comment for extra commit to rollback and add better message sequence logging to tricky test
2018-02-27 15:25:58 +00:00
Maksymilian Pawlak
3066926f0f
Improved classloader closing (#2650)
* Better handling of classloader closing
2018-02-27 11:15:23 +00:00
Maksymilian Pawlak
cc84b34dca
Close classloader to release associated file (#2635)
[CORDA-1113] Close classloader to release associated file
2018-02-26 15:01:57 +00:00
Andrius Dagys
0edfef2409 CORDA-696 - Create separate transaction types for contract upgrade transactions (#2589)
* CORDA-986 and CORDA-985 CompositeKey and Signature verification performance fixes (#2467)

* CORDA-696: Create separate transaction types for contract upgrade transactions.

Add rationale around upgrade transactions

Move contract upgrade transaction resolution logic into internal until it's stabilised.

Throw a better exception when contract attachment not found

Default legacy contract constraint to always accepting - needs to be changed to whitelist constraint before merging

Introduce a new upgraded contract interface that allows specifying the legacy constraint.

Remove StateLoader, make all tx resolution functions take in ServicesForResolution

Contract upgrade transactions can handle whitelist by zone constraints

When creating a contract upgrade transaction, make sure the attachment of the old cordapp gets attached when using hash constraints.
Attachment lookup for a given contract class name only scans currently loaded cordapps, and we don't load old versions of cordapps.

CORDA-696: Update upgrade docs
2018-02-26 11:29:25 +00:00
Michele Sollecito
5be0e4b39e
[CORDA-941]: Add NetworkParameters contract implementation whitelist. (#2580) 2018-02-23 14:29:02 +00:00
Patrick Kuo
1552e992e7
ENT-1443 Add cert role to CSR and doorman issue cert according to the cert role (#2620)
* ENT-1443 Add cert role to CSR and doorman issue cert according to the cert role (#431)

* Doorman and HSM create certificate base on requested cert role specified in the certificate signing request.

(cherry picked from commit 94f7392)

* remove R3 corda code
2018-02-23 13:38:09 +00:00
Andrzej Cichocki
c8672d373f
CORDA-973 Compression support for serialization (#2473)
* Serialization magic is now 7 bytes
* Introduce encoding property and whitelist
2018-02-23 13:07:51 +00:00
Shams Asari
2af0feee04
Various cleanup of the network map code (#2604) 2018-02-23 09:13:00 +00:00
Katelyn Baker
a223fdb8d3
DOCS - Separate parameter names in exceptions in a clear fashion (#2577) 2018-02-20 16:38:47 +00:00
Andras Slemmer
dc268ebe63
Merge pull request #2477 from corda/aslemmer-corda/issues/2300
Add RPC deduplication to client and server
2018-02-19 16:25:36 +00:00
Andras Slemmer
32bcf0a06c Address more comments 2018-02-19 15:16:12 +00:00
Andras Slemmer
7f1bfac8b0 Write better test for dupes 2018-02-19 14:53:28 +00:00
Matthew Nesbit
fee89c044f
Enhance the pluggability of the bridging and messaging code, so that more complex HA and out of process bridges can be written. (#2558) 2018-02-16 16:13:05 +00:00
Matthew Nesbit
cb7a0229a8
Fix a hang in AMQP protocol code that occurs when pausing in debugger causes protocol timeout, but wasn't driving event procesing to actuially kill the socket. (#2557) 2018-02-16 16:03:39 +00:00
Shams Asari
2864ce1384
ENT-1519: Ensure NodeInfo always has at least one address by checking in the c'tor (#2538)
Further, the look up of the node's own node-info from its database has been tightened to ensure there isn't more than one.

Also fixed some brittle code which was assuming exactly one address rather than at least one.
2018-02-15 14:06:41 +00:00
Andras Slemmer
6a4f783106 Hack around database-with-observables issue 2018-02-14 17:30:32 +00:00
Katelyn Baker
5de1ca7127
CORDA-1032 - unnamed ctor param serialization issue (#2532) 2018-02-14 17:22:08 +00:00
Anthony Keenan
3e8d76334e
CORDA-939 Modify Api Scanner to check api for internal exposures (#2510)
* Update check api changes to look for internals

* Update several more uses of internal

* Make check-api-changes script filter out internal class usages

* Make CordaClock part of API

* Update api-current.txt

* Remove exclusion of nodeapi.internal

* Remove access to CordaPersistence from public api

* Don't expose DB Connection from StartedMockNode and remove unnecessary transaction from CustomVaultQueryTest

* Make internal tests that use need db access use InternalMockNetwork

* Make test certificates internal

* Address further review comments

* Revert some accidental changes to api-current.txt

* Address Shams' review comments

* Update Api Scanner to filter out CordaInternal attribute

* Update api-current.txt

* Remove superfluous brackets

* Add transaction to StartedMockNode

* More leaky transaction fixes
2018-02-14 16:42:56 +00:00
Clinton
174ed3c64b
CORDA-556: Added Cordapp Config and a sample (#2469)
* Added per-cordapp configuration 
* Added new API for Cordformation cordapp declarations to support per-cordapp configuration
* Added a cordapp configuration sample
2018-02-14 14:49:59 +00:00
Andras Slemmer
7924a5a834 Add RPC deduplication to client and server 2018-02-13 18:51:59 +00:00
Joel Dudley
ad1be79900
Reorders params to put non-default args first. Creates simpler default constructors. 2018-02-12 17:02:34 +00:00
Michele Sollecito
da591363fd
CORDA-990: Flows Draining Mode (#2483)
[CORDA-990]: Flows draining mode.
2018-02-12 16:13:43 +00:00
Patrick Kuo
ddf0d34147
CORDA-1008 Samples fail to run due to wrongly configured max transaction size in the network bootstrapper (#2509)
* [CORDA-1008] - Samples fail to run due to wrongly configured max transaction size in the network bootstrapper

* address PR issues
2018-02-12 15:33:22 +00:00
Michal Kit
d1627fed5b Backporting introduction of constants for the dev certs from enterprise (#2502) 2018-02-12 12:12:16 +00:00
Katelyn Baker
3c4212a3d6
CORDA-992 - Make the finger printer pluggable for serialization factory (#2479)
Facilitates easier testing
2018-02-12 10:07:25 +00:00
Andras Slemmer
d01b2cbe97 Address comments, fix test 2018-02-09 16:03:36 +00:00
Andras Slemmer
0a88b76e46 r3corda wire compatibility 2018-02-09 14:50:20 +00:00
Andrzej Cichocki
1902a4f11e
CORDA-973 Refactoring for serialization compression support (#2466)
* Use constant for empty byte array
* Less byte array copying
* Fix InputStreamSerializer trailing garbage
* More OO kryo streams
* Introduce SerializationMagic
* Introduce non-copying slice on ByteSequence
2018-02-09 11:54:07 +00:00
Katarzyna Streich
6acff3a7df
First approach to network parameters updates (#2412)
* Network parameters updates

Add two RPC methods networkParametersFeed and
acceptNewNetworkParameters. Implementation of client handling of network
parameters update event. Partial implementation of accepting new
parameters and installing them on the node as well as node startup with
updated parameters.

Move reading of network parameters on startup to separate
NetworkParametersReader class. Add tests.

Move NetworkParameters and NotaryInfo classes to core.

* Ignore evolvability test - to be fixed later

* Add documentation on update process
2018-02-08 14:31:43 +00:00
Katelyn Baker
95f062e8ff
CORDA-904 - Fix evolver to work with setter instantiated classses (#2463)
* CORDA-904 - Make evolver work with classes that use setters

* review comments

* review comments

* small fixs

* don't include systemTest in compiler.xml
2018-02-06 12:55:49 +00:00
Katelyn Baker
69c989478a
CORDA-979 - Make public Java setter accessible within Kotlin (#2464)
* CORDA-979 - Make public Java setter accessible within Kotlin

* Review comments
2018-02-05 16:54:58 +00:00
Katelyn Baker
429da85650
CORDA-946 - Fixes to fingerprinting breaks backward compatibility (#2453)
* CORDA-946 - Fixes to fingerprinting breaks backward compatibility

Demonstrated using the network map parameters signed form as that's
where the problem was first seen

* Review Comments
2018-02-05 12:07:02 +00:00
Katelyn Baker
a08d333d5b
CORDA-978 - Only consider getters that accpet zero parameters (#2462)
* CORDA-978 - Only take getters with zero parameters

* tidy up
2018-02-05 09:48:41 +00:00
Katelyn Baker
57ba9cdf06
CORDA-915 - Replace BEANS introspector with standard reflection (#2400)
* CORDA-915 - Replace BEANS introspector with standard reflection

Removes lib dependency and puts something in place we can better
control

* CORDA-915 - Review comment corrections

* Review Comments
2018-02-02 16:58:43 +00:00
Mike Hearn
38ccd0572c
Use Java reflection for determining if a type is a Kotlin singleton. (#2446)
Kotlin's own reflection has a habit of throwing weird errors and does not work for private objects - thus the unit test which tests this feature has actually never worked properly, but somehow works by accident. An attempt to upgrade to the latest Kotlin revealed the issue so it must have always been unstable.
2018-02-02 17:17:23 +01:00
Katelyn Baker
00b90a98fb CORDA-943 - Cope with multiple generics at str->type conversion in AMQP
Also fixes an odd bug where the inferred type of a getter wasn't
matching the constructor parameter type because that was still unbounded
and seen as T, looking at the raw type allows us to inspect this
properly
2018-02-01 12:19:32 +00:00
Katelyn Baker
222c5b9db8 CORDA-943 - Fix trader demo
This is a multi issue problem
1. Fingerprinting of generics treats <T> and <?> differently, forcing
the evolver to be used when not needed

2. However, the evolver is required sometimes as generics are not
guaranteed to fingerprinting bi-directionally (thanks to type erasure of
deeply nested generic types). However, with serialization now writing
properties in a specific order, we need to ensure they're read back in
that order before applying them to an evolved constructor so as to
not corrupt the object reference cache
2018-01-31 14:58:00 +00:00
Matthew Nesbit
ceff50d656
Refactor location of bridge code to allow out of process bridging (#2431)
Fix some issues Andras has seen
2018-01-30 16:29:59 +00:00
Matthew Nesbit
0ff9c9e2e3
Move to message based bridge control protocol (#2410)
Tidy up

Remove dead RPCSecurity logic from ArtemisMessageServer

Address PR comments

Address PR comments
2018-01-25 17:53:34 +00:00
Shams Asari
0fa6969d5d
Added various X509 utilities to remove some of the existing boilerplate. (#2416) 2018-01-24 18:07:29 +00:00
Shams Asari
61c7de22d6
Replaced KeyStoreWrapper with X509KeyStore, which is still a wrapper but assumes only X509 certs and has better APIs (#2411) 2018-01-24 07:51:55 +00:00
Michele Sollecito
142f52fa82
[CORDA:936]: Enable RPC layer to work with SSL 2018-01-23 16:23:37 +00:00
Anthony Keenan
70f1fdeb2b
CORDA-939 Make SerializationEnvironmentRule.env private so as not to expose internals. (#2404)
* Make SerializationEnvironment private so as not to expose internals.

* Only expose used parts of api

* Make properties lateinit

* Removing java calls to getEnv

* Initialise properties at declaration

* Tidy up imports
2018-01-23 14:42:30 +00:00
Michal Kit
4a3379ac8a
CORDA-937 adding node key pair to utility/testing methods (#2405) 2018-01-22 13:06:22 +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
Katelyn Baker
9df35ae5d3
Merge pull request #2383 from corda/kat/feature/deterministicSerilaizer
CORDA-914 - Deterministic property ordering for AMQP serialization
2018-01-18 10:29:57 +00:00
Andrzej Cichocki
bbcafca959
Retire DatabaseTransactionManager. (#2385) 2018-01-18 10:11:34 +00:00
Katelyn Baker
0e047d9263 CORDA-914 - Deterministic property ordering for AMQP serialization 2018-01-17 17:52:33 +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
Andras Slemmer
91779276fc Use single thread per netty eventgroup during testing 2018-01-15 11:18:29 +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
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
Katelyn Baker
97793447d5 CORDA-855 - Adding tests for wild card generics
Can't actually get something to go through the serializer with a
wild card in place as it seems that's an impossible situation

    * Review Changes
    * CORDA-855 - Review Comments
    * Review Comments
    * Review comments
2018-01-10 15:53:28 +00:00
Katelyn Baker
41220de816 CORDA-855 - Fix for fingerprinting generics in AMQP
* Undo refactor
2018-01-10 15:36:54 +00:00
Katelyn Baker
017f865fa3 CORDA-852 - Fix AMQP serialisation of nested generic 2018-01-10 15:35:47 +00:00
Katelyn Baker
cacdba872e
CORDA-908 - Support private properties in AMQP serialization (#2336)
CORDA-908 - Support private properties in AMQP serialization

* Review comments

* Fix tests

* Review Comments

* review comments

* review comments
2018-01-10 11:41:49 +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
Rick Parker
c5149bab9f
Backport of ENT-1303 applied to 3.0-RC3 (#2332) 2018-01-08 12:11:55 +00:00
Katelyn Baker
3bf84ebbd4 Review Comments 2018-01-05 15:50:24 +00:00
Katelyn Baker
f230e2670b REVIEW COMMENTS 2018-01-05 15:50:24 +00:00
Katelyn Baker
f4ad8d3e70 CORDA-902 - AMQP Setter Construction when empty / no constructor 2018-01-05 15:50:24 +00:00
Anthony Keenan
1661cea816
CORDA-892: Make cordform test use new network bootstrapper logic (#2307)
* Make cordform test use new network bootstrapper logic

* Fixing review comments

* Fix issue with backwards compatibility

* Fix issue with setup not being called from CordformDefinitions

* Make sure node dir is created (as CordformDefinition uses it directly if setup is overridden
Make sure tmp dir is created

* Don't crash if node dir is already created

* Stop overwriting errors
2018-01-05 09:21:59 +00:00
Katelyn Baker
01e4880947 SPELLING: updae error message in tests 2018-01-04 15:49:55 +00:00
Katelyn Baker
6d485a3329 SPELLING ERROR FIX 2018-01-04 10:03:04 +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
Katelyn Baker
fb71a45be5 CORDA-882 - Better err messages when serializer encounters private property 2018-01-03 18:27:14 +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
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
Anthony Keenan
1d66fe9296
[CORDA-879] Generate node directories as part of bootstrapping (#2285)
* Generate node directories as part of bootstrapping

* Include latest corda.jar in bootstrapper package
Remove SLF4J warnings on startup

* Changes post review

* More review changes

* Review changes

* Making docs clearer
2017-12-23 11:22:31 +00:00
Shams Asari
ce4a640835
CORDA-886: Removed the 60s timeout when generating node-info files in the network bootstrapper. Instead a warning is given. (#2290) 2017-12-22 15:15: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
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
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
Shams Asari
e9cead9055 CORDA-833: SignedNodeInfo object for holding a list of signatures, one for each identity in the NodeInfo. This forms part of the network map. 2017-12-17 19:45:58 +00:00
Andrzej Cichocki
8114a20abd
CORDA-716 Move non-API things to internal (#2256) 2017-12-17 18:44:35 +00:00
Andrzej Cichocki
2652ae111a
CORDA-716 Devrel feedback (#2266)
* * Document TestIdentity entropy and enforce that it actually works
* Ledger/transaction DSL default notary with fresh key
* MockServices default identity with fresh key
* makeTestIdentityService now takes vararg
* Require cordappPackages for MockServices
* DSL automatic serialization init
* Improve error when two MockNetworks used

* * Make cordappPackages required by MockNetwork
* Default identity service in MockServices
* Make notarySpecs Java-friendly
2017-12-15 19:18:31 +00:00
Matthew Nesbit
595d41af04
AMQP Bridging between nodes (#2181)
* Able to send hand coded messages to an Artemis node inbox

Get startup race condition fixed. Start cleanup work.

Fixup after rebase

Remove SASL hack for now

Minor tweaks. Enable AMQP mode manually.

Add configuration control

Slight clean up

Stop timeouts that don't work with AMQP

Rename class

Get TLS constants from :node-api

Primitive integration test

Put back commented line

Session per bridge to alow rollback on remote rejects.

Add more tests and handle multiple IP adddresses

Reduce logging

Fixup after rebase

Add a test to verify the remote end AMQP rejection logic works and does cause message replay.

Allow Artemis to duplicate after session rollback

Reduce number of threads

Move legacy bridge related code over to CoreBridgeManager

Shared threadpool for bridges

Add a test to confirm that no side effects when using a shared thread pool.

Address PR comments and remove dead lines

Rebase and add some comments

Remove a couple of blank lines

Ensure AMQP bridges are used in tests

Fixup after removal of testNodeConfiguration

Add a couple of doc comments

Add a couple of doc comments

Make things internal and use CordaFuture

Address some PR comments

Change comment type

* Use Artemis 2.2 to fix AMQP problems. Add explicit test of legacy core bridges, as marking the factory class private had silently broken them.

* Fix change due to using Artemis 2.2
2017-12-15 17:48:33 +00:00
Katarzyna Streich
02ad2b8b60
Fix LargeTransactionTest (#2265) 2017-12-15 16:53:57 +00:00
Katarzyna Streich
550469ea38
Wire part of network parameters (#2187)
* Take maximum message size from network parameters

* Add epoch handling

* Add handling of network parameters mismatch

Change NetworkMapClient and updater, add handle in
AbstractNode that results in node shutdown on parameters mismatch. Later
on we should implement proper handling of parameters updates.
Add tests of NetworkParameters wiring.

When node starts with compatibilityZone url configured it takes
networkParameters from the networkMap.

* Permit only one network parameters file

On node startup network parameters are read from node's base directory,
we permit only zero or one files to be there. If network map server is
configured the parameters can be downloaded at startup (if not present
in the directory already).

* Update docs on network map endpoints
2017-12-15 11:13:15 +00:00
Andrzej Cichocki
05bc05a936
CORDA-716 Retire withTestSerialization (#2240) 2017-12-14 12:42:18 +00:00
Katarzyna Streich
0df846148d
SignedNetworkMap verification fix (#2255)
* SignedNetworkMap verification fix

SignedNetworkMap verification should also include cert path validation,
which was probably moved away by accident, because docs say about the
exception CertPathValidatorException.
2017-12-14 12:06:44 +00:00
Shams Asari
2319bf396c Renamed TestIdentity.key to keyPair and pubkey to publicKey (#2249) 2017-12-14 11:30:55 +00:00
Shams Asari
e781d816a8 Removed remaining uses of KRYO_P2P_CONTEXT 2017-12-13 18:24:05 +00:00
Andrzej Cichocki
c3b9955344
CORDA-716 Fix split packages in testing (#2232) 2017-12-12 19:37:01 +00:00
Andrzej Cichocki
905c8252a6
CORDA-654 Remaining key constants (#2226) 2017-12-12 18:03:06 +00:00
Alberto Arri
2dc73ecf3b
Changed logic to check for initial certificate, now using the truststore instead of the .cer file (#2213) 2017-12-12 10:39:52 +00:00
Shams Asari
5b12c5177e Correct version strings 2017-12-11 21:11:29 +00:00
Shams Asari
6d6393d984 Merge branch 'feature-network-parameters' into shams-merge-feature-network-parameters 2017-12-11 21:10:34 +00:00
Katelyn Baker
1fb1d6fb72 CORDA-852 - Fix AMQP serialisation of nested generic 2017-12-11 20:12:32 +00:00
Katelyn Baker
4b5c60637c
Merge pull request #2017 from corda/kat/feature/enableAMQP
CORDA-780 - Enable AMQP for P2P and Storage Contexts
2017-12-11 11:37:16 +00:00
Shams Asari
e25158301f Merge branch 'master' into shams-master-merge-081217 2017-12-11 10:49:11 +00:00
Katelyn Baker
042cfee863
Merge pull request #2215 from corda/smallFixs2
Code Cleanup
2017-12-11 10:23:24 +00:00
Shams Asari
d6054e4b4f Merge branch 'master' into shams-master-merge-081217
# Conflicts:
#	node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/DriverDSLImpl.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/RPCDriver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/demorun/DemoRunner.kt
#	verifier/src/integration-test/kotlin/net/corda/verifier/VerifierDriver.kt
2017-12-11 10:23:16 +00:00
Katelyn Baker
c994a913a2
Merge pull request #2211 from corda/renameTransformTypes
Rename Tansform -> Transform in filename
2017-12-11 10:20:48 +00:00
igor nitto
da38e6f673
Configurable authorization/authentication data sources [CORDA-827] (#2145)
* Add support for external data source of access control data (RPC/Shell users credential and permissions), with optional in-memory caching.
* Support password encoded with Apache Shiro fully reversible Modular Crypt Format.
* Introduce 'security' field in Node configuration and related docsite page.
2017-12-11 08:39:09 +00:00
Katelyn Baker
89d452819f Rename Tansform -> Transform in filename 2017-12-08 17:31:14 +00:00
Katelyn Baker
2329254390 Additional comment corrections 2017-12-08 17:30:32 +00:00
Katelyn Baker
c66026e54b Code Cleanup 2017-12-08 17:30:32 +00:00
josecoll
4762569200
CORDA-822 - JMX Jolokia instrumentation (#2197)
* JMX Jolokia instrumentation WIP (driverDSL, webserver, cordformation, hibernate statistics, access policy config file hardening)

* Cordformation changes to support jolokia agent instrumentation at JVM startup.

* Minor updates to reflect usage of Jolokia 1.3.7 (which uses slightly different .war naming)

* Use relative path reference in -javaagent to prevent problem with long path names with spaces.

* Fixed incorrect regex pattern and added assertion to test.

* Enable JMX monitoring.

* Reporting of Hibernate JMX statistics is configurable (by default, only switched on in devMode)

* Make Artemis JMX enablement configurable.

* Re-instate banning of java serialization.

* Improve JUnit.

* Fixes following rebase from master.

* Re-instated correct regex for picking up Jolokia agent jar.

* Fixed broken integration test.

* Updated documentation

* Updated following PR review feedback.

* Fixed compilation error caused by change in DriverDSL argument type.

* Fixed compilation error caused by change in DriverDSL argument type.

* Fail fast if jolokia-agent-jvm.jar is not located.

* Applied changes in cordformation following review feedback from CA.
2017-12-08 16:27:12 +00:00
Shams Asari
65ff931f53 Merge branch 'master' into shams-master-merge-081217
# Conflicts:
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/crypto/KeyStoreWrapper.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/services/config/ConfigUtilities.kt
#	node/src/test/kotlin/net/corda/node/services/identity/InMemoryIdentityServiceTests.kt
#	node/src/test/kotlin/net/corda/node/services/identity/PersistentIdentityServiceTests.kt
#	samples/irs-demo/src/integration-test/kotlin/net/corda/test/spring/SpringDriver.kt
#	testing/node-driver/src/integration-test/kotlin/net/corda/testing/driver/DriverTests.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/DriverDSL.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/DriverDSLImpl.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/NodeBasedTest.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/RPCDriver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/demorun/DemoRunner.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/CoreTestUtils.kt
#	verifier/src/integration-test/kotlin/net/corda/verifier/VerifierDriver.kt
2017-12-08 16:03:16 +00:00
Katelyn Baker
75ea23d193
Merge pull request #2212 from corda/smallFixs
Code tidy up, auto reformat, IntelliJ suggestions
2017-12-08 15:44:06 +00:00
Katelyn Baker
c396842b0e CORDA-553 - Review comments 2017-12-08 14:37:41 +00:00
Katelyn Baker
afdf5fb717 Code tidy up, auto reformat, IntelliJ suggestions 2017-12-08 14:21:30 +00:00
Ross Nicoll
e6adbe7137
CORDA-831: Add confidential identity certificate type (#2198)
* Rename certificate types
* Create separate certificate type for confidential identities
* Add name constraints to dev node CA
* Move dev node CA into getTestPartyAndCertificate()
2017-12-08 13:17:29 +00:00
Katelyn Baker
8878fa99a0 CORDA-553 - Remove CordaCustomSerializer annotation
It isn't actually needed as we can scan the jar for classes implementing
the interface.
2017-12-07 21:15:33 +00:00
Katelyn Baker
fcec60e232 CORDA-786 - Use reflection to infer proxy and proxied types in CorDapp custom serializers
This removes any need for the user implement and override types from the
super class

    * CORDA-786 - Docs update
    * CORDA-786 - Remove unneeded second annotation on the proxy objects
    * Fix merge conflicts
2017-12-07 21:15:14 +00:00
Katelyn Baker
d25b7f560c CORDA-786 - Genericise the CorDapp Proxy 2017-12-07 21:15:14 +00:00
Katelyn Baker
6881350493 CORDA-786 - Add whitelist testing for external custom serializers
Update Docs
2017-12-07 21:14:45 +00:00
Katelyn Baker
81eb0c1898 CORDA-780 / CORDA-786 - Enable AMQP for P2P and Storage Contexts
Add plugable mechanism for CorDapps such that they can add their own
custom serializers
2017-12-07 21:13:59 +00:00
Andrzej Cichocki
c36bea3af5
CORDA-654 MockServices no longer has hard-coded identities (#2192)
* Resurrect a test
* Fix a broken test
* Pass in the initial identity
* Make IdentityService easier to mock
2017-12-07 11:55:18 +00:00
Shams Asari
4a677815ef Removing NetworkParametersGenerator as an interface 2017-12-07 10:42:52 +00:00
Shams Asari
cb11379d98 Addressing some of the technical debt 2017-12-06 22:01:41 +00:00