mirror of
https://github.com/corda/corda.git
synced 2025-05-01 16:29:50 +00:00
Merge pull request #4525 from corda/wn-redo-node-conf-docs
Redo Corda Operation docs [CORDA-2251]
This commit is contained in:
commit
78a70d2355
@ -1,385 +1,561 @@
|
||||
Configuring a node
|
||||
Node configuration
|
||||
==================
|
||||
|
||||
.. contents::
|
||||
|
||||
File location
|
||||
-------------
|
||||
When starting a node, the ``corda.jar`` file defaults to reading the node's configuration from a ``node.conf`` file in
|
||||
the directory from which the command to launch Corda is executed. There are two command-line options to override this
|
||||
behaviour:
|
||||
Configuration file location
|
||||
---------------------------
|
||||
When starting a node, the ``corda.jar`` file defaults to reading the node's configuration from a ``node.conf`` file in the directory from which the command to launch Corda is executed.
|
||||
There are two command-line options to override this behaviour:
|
||||
|
||||
* The ``--config-file`` command line option allows you to specify a configuration file with a different name, or at
|
||||
different file location. Paths are relative to the current working directory
|
||||
* The ``--config-file`` command line option allows you to specify a configuration file with a different name, or in a different file location.
|
||||
Paths are relative to the current working directory
|
||||
|
||||
* The ``--base-directory`` command line option allows you to specify the node's workspace location. A ``node.conf``
|
||||
configuration file is then expected in the root of this workspace
|
||||
* The ``--base-directory`` command line option allows you to specify the node's workspace location.
|
||||
A ``node.conf`` configuration file is then expected in the root of this workspace.
|
||||
|
||||
If you specify both command line arguments at the same time, the node will fail to start.
|
||||
|
||||
Format
|
||||
------
|
||||
Configuration file format
|
||||
-------------------------
|
||||
The Corda configuration file uses the HOCON format which is a superset of JSON. Please visit
|
||||
`<https://github.com/typesafehub/config/blob/master/HOCON.md>`_ for further details.
|
||||
|
||||
Please do NOT use double quotes (``"``) in configuration keys.
|
||||
|
||||
Node setup will log `Config files should not contain \" in property names. Please fix: [key]` as an error
|
||||
when it finds double quotes around keys.
|
||||
This prevents configuration errors when mixing keys containing ``.`` wrapped with double quotes and without them
|
||||
e.g.:
|
||||
The property `"dataSourceProperties.dataSourceClassName" = "val"` in ``reference.conf``
|
||||
would be not overwritten by the property `dataSourceProperties.dataSourceClassName = "val2"` in ``node.conf``.
|
||||
Node setup will log ``Config files should not contain " in property names. Please fix: [key]`` as an error when it finds double quotes around keys.
|
||||
This prevents configuration errors when mixing keys containing ``.`` wrapped with double quotes and without them e.g.: The property ``"dataSourceProperties.dataSourceClassName" = "val"`` in :ref:`reference.conf` would be not overwritten by the property ``dataSourceProperties.dataSourceClassName = "val2"`` in *node.conf*.
|
||||
|
||||
By default the node will fail to start in presence of unknown property keys. To alter this behaviour, program line argument
|
||||
``on-unknown-config-keys`` can be set to ``IGNORE``. Default is ``FAIL`` if unspecified.
|
||||
By default the node will fail to start in presence of unknown property keys.
|
||||
To alter this behaviour, the ``on-unknown-config-keys`` command-line argument can be set to ``IGNORE`` (default is ``FAIL``).
|
||||
|
||||
Defaults
|
||||
--------
|
||||
Overriding values from node.conf
|
||||
--------------------------------
|
||||
|
||||
Environment variables
|
||||
For example: ``${NODE_TRUST_STORE_PASSWORD}`` would be replaced by the contents of environment variable ``NODE_TRUST_STORE_PASSWORD`` (see: :ref:`hiding-sensitive-data` section).
|
||||
|
||||
JVM options
|
||||
JVM options or environmental variables prefixed with ``corda.`` can override ``node.conf`` fields.
|
||||
Provided system properties can also set values for absent fields in ``node.conf``.
|
||||
This is an example of adding/overriding the keyStore password :
|
||||
|
||||
.. sourcecode:: shell
|
||||
|
||||
java -Dcorda.rpcSettings.ssl.keyStorePassword=mypassword -jar node.jar
|
||||
|
||||
Configuration file fields
|
||||
-------------------------
|
||||
|
||||
.. note :: The available configuration fields are listed below in alphabetic order.
|
||||
|
||||
additionalP2PAddresses
|
||||
An array of additional host:port values, which will be included in the advertised NodeInfo in the network map in addition to the :ref:`p2pAddress <corda_configuration_file_p2pAddress>`.
|
||||
Nodes can use this configuration option to advertise HA endpoints and aliases to external parties.
|
||||
|
||||
*Default:* empty list
|
||||
|
||||
|
||||
attachmentContentCacheSizeMegaBytes
|
||||
Optionally specify how much memory should be used to cache attachment contents in memory.
|
||||
|
||||
*Default:* 10MB
|
||||
|
||||
attachmentCacheBound
|
||||
Optionally specify how many attachments should be cached locally. Note that this includes only the key and metadata, the content is cached separately and can be loaded lazily.
|
||||
|
||||
*Default:* 1024
|
||||
|
||||
|
||||
compatibilityZoneURL (deprecated)
|
||||
The root address of the Corda compatibility zone network management services, it is used by the Corda node to register with the network and obtain a Corda node certificate, (See :doc:`permissioning` for more information.) and also is used by the node to obtain network map information.
|
||||
Cannot be set at the same time as the :ref:`networkServices <corda_configuration_file_networkServices>` option.
|
||||
|
||||
**Important: old configuration value, please use networkServices**
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
.. _corda_configuration_file_signer_blacklist:
|
||||
|
||||
cordappSignerKeyFingerprintBlacklist
|
||||
List of the public keys fingerprints (SHA-256 of public key hash) not allowed as Cordapp JARs signers.
|
||||
The node will not load Cordapps signed by those keys.
|
||||
The option takes effect only in production mode and defaults to Corda development keys (``["56CA54E803CB87C8472EBD3FBC6A2F1876E814CEEBF74860BD46997F40729367", "83088052AF16700457AE2C978A7D8AC38DD6A7C713539D00B897CD03A5E5D31D"]``), in development mode any key is allowed to sign Cordpapp JARs.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
crlCheckSoftFail
|
||||
This is a boolean flag that when enabled (i.e. ``true`` value is set) causes the certificate revocation list (CRL) checking will use the soft fail mode.
|
||||
The soft fail mode allows the revocation check to succeed if the revocation status cannot be determined because of a network error.
|
||||
If this parameter is set to ``false`` rigorous CRL checking takes place, involving each certificate in the certificate path being checked needs to have the CRL distribution point extension set and pointing to a URL serving a valid CRL.
|
||||
|
||||
*Default:* true
|
||||
|
||||
custom
|
||||
Set custom command line attributes (e.g. Java system properties) on the node process via the capsule launcher
|
||||
|
||||
jvmArgs:
|
||||
A list of JVM arguments to apply to the node process. This removes any defaults specified from ``corda.jar``, but can be overridden from the command line.
|
||||
See :ref:`setting_jvm_args` for examples and details on the precedence of the different approaches to settings arguments.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
.. _databaseConfiguration:
|
||||
|
||||
database
|
||||
Database configuration
|
||||
|
||||
transactionIsolationLevel:
|
||||
Transaction isolation level as defined by the ``TRANSACTION_`` constants in ``java.sql.Connection``, but without the ``TRANSACTION_`` prefix.
|
||||
|
||||
*Default:* ``REPEATABLE_READ``
|
||||
|
||||
exportHibernateJMXStatistics:
|
||||
Whether to export Hibernate JMX statistics.
|
||||
|
||||
**Caution: enabling this option causes expensive run-time overhead**
|
||||
|
||||
*Default:* false
|
||||
|
||||
initialiseSchema
|
||||
Boolean which indicates whether to update the database schema at startup (or create the schema when node starts for the first time).
|
||||
If set to ``false`` on startup, the node will validate if it's running against a compatible database schema.
|
||||
|
||||
*Default:* true
|
||||
|
||||
initialiseAppSchema
|
||||
The property allows to override ``database.initialiseSchema`` for the Hibernate DDL generation for CorDapp schemas.
|
||||
``UPDATE`` performs an update of CorDapp schemas, while ``VALID`` only verifies their integrity and ``NONE`` performs no check.
|
||||
When ``initialiseSchema`` is set to ``false``, then ``initialiseAppSchema`` may be set as ``VALID`` or ``NONE`` only.
|
||||
|
||||
*Default:* CorDapp schema creation is controlled with ``initialiseSchema``.
|
||||
|
||||
dataSourceProperties
|
||||
This section is used to configure the jdbc connection and database driver used for the nodes persistence.
|
||||
This is currently the only configuration that has been tested, although in the future full support for other storage layers will be validated.
|
||||
Currently the defaults in ``/node/src/main/resources/reference.conf`` are as shown in the Reference.conf_ below.
|
||||
|
||||
*Default:*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
dataSourceClassName = org.h2.jdbcx.JdbcDataSource
|
||||
dataSource.url = "jdbc:h2:file:"${baseDirectory}"/persistence;DB_CLOSE_ON_EXIT=FALSE;WRITE_DELAY=0;LOCK_TIMEOUT=10000"
|
||||
dataSource.user = sa
|
||||
dataSource.password = ""```
|
||||
|
||||
detectPublicIp
|
||||
This flag toggles the auto IP detection behaviour.
|
||||
If enabled, on startup the node will attempt to discover its externally visible IP address first by looking for any public addresses on its network interfaces, and then by sending an IP discovery request to the network map service.
|
||||
Set to ``true`` to enable.
|
||||
|
||||
*Default:* false
|
||||
|
||||
devMode
|
||||
This flag sets the node to run in development mode.
|
||||
On startup, if the keystore ``<workspace>/certificates/sslkeystore.jks``
|
||||
does not exist, a developer keystore will be used if ``devMode`` is true.
|
||||
The node will exit if ``devMode`` is false and the keystore does not exist.
|
||||
``devMode`` also turns on background checking of flow checkpoints to shake out any bugs in the checkpointing process.
|
||||
Also, if ``devMode`` is true, Hibernate will try to automatically create the schema required by Corda or update an existing schema in the SQL database; if ``devMode`` is false, Hibernate will simply validate the existing schema, failing on node start if the schema is either not present or not compatible.
|
||||
If no value is specified in the node configuration file, the node will attempt to detect if it's running on a developer machine and set ``devMode=true`` in that case.
|
||||
This value can be overridden from the command line using the ``--dev-mode`` option.
|
||||
|
||||
*Default:* Corda will try to establish based on OS environment
|
||||
|
||||
devModeOptions
|
||||
Allows modification of certain ``devMode`` features
|
||||
|
||||
**Important: This is an unsupported configuration.**
|
||||
|
||||
allowCompatibilityZone
|
||||
Allows a node configured to operate in development mode to connect to a compatibility zone.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
|
||||
emailAddress
|
||||
The email address responsible for node administration, used by the Compatibility Zone administrator.
|
||||
|
||||
*Default:* company@example.com
|
||||
|
||||
extraNetworkMapKeys
|
||||
An optional list of private network map UUIDs. Your node will fetch the public network and private network maps based on these keys.
|
||||
Private network UUID should be provided by network operator and lets you see nodes not visible on public network.
|
||||
|
||||
**Important: This is a temporary feature for onboarding network participants that limits their visibility for privacy reasons.**
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
|
||||
flowMonitorPeriodMillis
|
||||
Duration of the period suspended flows waiting for IO are logged.
|
||||
|
||||
*Default:* 60 seconds
|
||||
|
||||
flowMonitorSuspensionLoggingThresholdMillis
|
||||
Threshold duration suspended flows waiting for IO need to exceed before they are logged.
|
||||
|
||||
*Default:* 60 seconds
|
||||
|
||||
flowTimeout
|
||||
When a flow implementing the ``TimedFlow`` interface and setting the ``isTimeoutEnabled`` flag does not complete within a defined elapsed time, it is restarted from the initial checkpoint.
|
||||
Currently only used for notarisation requests with clustered notaries: if a notary cluster member dies while processing a notarisation request, the client flow eventually times out and gets restarted.
|
||||
On restart the request is resent to a different notary cluster member in a round-robin fashion. Note that the flow will keep retrying forever.
|
||||
|
||||
timeout
|
||||
The initial flow timeout period.
|
||||
|
||||
*Default:* 30 seconds
|
||||
|
||||
maxRestartCount
|
||||
The number of retries the back-off time keeps growing for.
|
||||
For subsequent retries, the timeout value will remain constant.
|
||||
|
||||
*Default:* 6
|
||||
|
||||
backoffBase
|
||||
The base of the exponential backoff, `t_{wait} = timeout * backoffBase^{retryCount}`
|
||||
|
||||
*Default:* 1.8
|
||||
|
||||
h2Port (deprecated)
|
||||
Defines port for h2 DB.
|
||||
|
||||
**Important: Deprecated please use h2Setting instead**
|
||||
|
||||
h2Settings
|
||||
Sets the H2 JDBC server host and port.
|
||||
See :doc:`node-database-access-h2`.
|
||||
For non-localhost address the database password needs to be set in ``dataSourceProperties``.
|
||||
|
||||
*Default:* NULL
|
||||
|
||||
jarDirs
|
||||
An optional list of file system directories containing JARs to include in the classpath when launching via ``corda.jar`` only.
|
||||
Each should be a string.
|
||||
Only the JARs in the directories are added, not the directories themselves.
|
||||
This is useful for including JDBC drivers and the like. e.g. ``jarDirs = [ '${baseDirectory}/lib' ]``.
|
||||
(Note that you have to use the ``baseDirectory`` substitution value when pointing to a relative path).
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
jmxMonitoringHttpPort
|
||||
If set, will enable JMX metrics reporting via the Jolokia HTTP/JSON agent on the corresponding port.
|
||||
Default Jolokia access url is http://127.0.0.1:port/jolokia/
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
jmxReporterType
|
||||
Provides an option for registering an alternative JMX reporter.
|
||||
Available options are ``JOLOKIA`` and ``NEW_RELIC``.
|
||||
|
||||
The Jolokia configuration is provided by default.
|
||||
The New Relic configuration leverages the Dropwizard_ NewRelicReporter solution.
|
||||
See `Introduction to New Relic for Java`_ for details on how to get started and how to install the New Relic Java agent.
|
||||
|
||||
*Default:* ``JOLOKIA``
|
||||
|
||||
.. _Dropwizard: https://metrics.dropwizard.io/3.2.3/manual/third-party.html
|
||||
.. _Introduction to New Relic for Java: https://docs.newrelic.com/docs/agents/java-agent/getting-started/introduction-new-relic-java
|
||||
|
||||
keyStorePassword
|
||||
The password to unlock the KeyStore file (``<workspace>/certificates/sslkeystore.jks``) containing the node certificate and private key.
|
||||
|
||||
**Important: This is the non-secret value for the development certificates automatically generated during the first node run.
|
||||
Longer term these keys will be managed in secure hardware devices.**
|
||||
|
||||
*Default:* cordacadevpass
|
||||
|
||||
lazyBridgeStart
|
||||
Internal option.
|
||||
|
||||
**Important: Please do not change.**
|
||||
|
||||
*Default:* true
|
||||
|
||||
messagingServerAddress
|
||||
The address of the ArtemisMQ broker instance.
|
||||
If not provided the node will run one locally.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
messagingServerExternal
|
||||
If ``messagingServerAddress`` is specified the default assumption is that the artemis broker is running externally.
|
||||
Setting this to ``false`` overrides this behaviour and runs the artemis internally to the node, but bound to the address specified in ``messagingServerAddress``.
|
||||
This allows the address and port advertised in ``p2pAddress`` to differ from the local binding, especially if there is external remapping by firewalls, load balancers , or routing rules. Note that ``detectPublicIp`` should be set to ``false`` to ensure that no translation of the ``p2pAddress`` occurs before it is sent to the network map.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
myLegalName
|
||||
The legal identity of the node.
|
||||
This acts as a human-readable alias to the node's public key and can be used with the network map to look up the node's info.
|
||||
This is the name that is used in the node's certificates (either when requesting them from the doorman, or when auto-generating them in dev mode).
|
||||
At runtime, Corda checks whether this name matches the name in the node's certificates.
|
||||
For more details please read :ref:`node-naming` chapter.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
notary
|
||||
Optional configuration object which if present configures the node to run as a notary.
|
||||
|
||||
validating
|
||||
Boolean to determine whether the notary is a validating or non-validating one.
|
||||
|
||||
*Default:* false
|
||||
|
||||
serviceLegalName
|
||||
If the node is part of a distributed cluster, specify the legal name of the cluster.
|
||||
At runtime, Corda checks whether this name matches the name of the certificate of the notary cluster.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
className
|
||||
The fully qualified class name of the notary service to run.
|
||||
The class is expected to be loaded from a notary CorDapp.
|
||||
|
||||
*Default:* ``SimpleNotaryService`` (which is built in).
|
||||
|
||||
extraConfig
|
||||
an optional configuration block for providing notary implementation-specific values.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
networkParameterAcceptanceSettings
|
||||
Optional settings for managing the network parameter auto-acceptance behaviour.
|
||||
If not provided then the defined defaults below are used.
|
||||
|
||||
autoAcceptEnabled
|
||||
This flag toggles auto accepting of network parameter changes.
|
||||
If a network operator issues a network parameter change which modifies only auto-acceptable options and this behaviour is enabled then the changes will be accepted without any manual intervention from the node operator.
|
||||
See :doc:`network-map` for more information on the update process and current auto-acceptable parameters.
|
||||
Set to ``false`` to disable.
|
||||
|
||||
*Default:* true
|
||||
|
||||
excludedAutoAcceptableParameters
|
||||
List of auto-acceptable parameter names to explicitly exclude from auto-accepting.
|
||||
Allows a node operator to control the behaviour at a more granular level.
|
||||
|
||||
*Default:* empty list
|
||||
|
||||
.. _corda_configuration_file_networkServices:
|
||||
|
||||
networkServices
|
||||
If the Corda compatibility zone services, both network map and registration (doorman), are not running on the same endpoint
|
||||
and thus have different URLs then this option should be used in place of the ``compatibilityZoneURL`` setting.
|
||||
|
||||
**Important: Only one of ``compatibilityZoneURL`` or ``networkServices`` should be used.**
|
||||
|
||||
doormanURL
|
||||
Root address of the network registration service.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
networkMapURL
|
||||
Root address of the network map service.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
pnm
|
||||
Optional UUID of the private network operating within the compatibility zone this node should be joining.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
.. _corda_configuration_file_p2pAddress:
|
||||
|
||||
p2pAddress
|
||||
The host and port on which the node is available for protocol operations over ArtemisMQ.
|
||||
|
||||
In practice the ArtemisMQ messaging services bind to **all local addresses** on the specified port.
|
||||
However, note that the host is the included as the advertised entry in the network map.
|
||||
As a result the value listed here must be **externally accessible when running nodes across a cluster of machines.**
|
||||
If the provided host is unreachable, the node will try to auto-discover its public one.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
rpcAddress (deprecated)
|
||||
The address of the RPC system on which RPC requests can be made to the node.
|
||||
If not provided then the node will run without RPC.
|
||||
|
||||
**Important: Deprecated. Use rpcSettings instead.**
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
rpcSettings
|
||||
Options for the RPC server exposed by the Node.
|
||||
|
||||
**Important: The RPC SSL certificate is used by RPC clients to authenticate the connection. The Node operator must provide RPC clients with a truststore containing the certificate they can trust. We advise Node operators to not use the P2P keystore for RPC. The node can be run with the "generate-rpc-ssl-settings" command, which generates a secure keystore and truststore that can be used to secure the RPC connection. You can use this if you have no special requirements.**
|
||||
|
||||
address
|
||||
host and port for the RPC server binding.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
adminAddress
|
||||
host and port for the RPC admin binding (this is the endpoint that the node process will connect to).
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
standAloneBroker
|
||||
boolean, indicates whether the node will connect to a standalone broker for RPC.
|
||||
|
||||
*Default:* false
|
||||
|
||||
useSsl
|
||||
boolean, indicates whether or not the node should require clients to use SSL for RPC connections.
|
||||
|
||||
*Default:* false
|
||||
|
||||
ssl
|
||||
(mandatory if ``useSsl=true``) SSL settings for the RPC server.
|
||||
|
||||
keyStorePath
|
||||
Absolute path to the key store containing the RPC SSL certificate.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
keyStorePassword
|
||||
Password for the key store.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
rpcUsers
|
||||
A list of users who are authorised to access the RPC system.
|
||||
Each user in the list is a configuration object with the following fields:
|
||||
|
||||
username
|
||||
Username consisting only of word characters (a-z, A-Z, 0-9 and _)
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
password
|
||||
The password
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
permissions
|
||||
A list of permissions for starting flows via RPC.
|
||||
To give the user the permission to start the flow ``foo.bar.FlowClass``, add the string ``StartFlow.foo.bar.FlowClass`` to the list.
|
||||
If the list contains the string ``ALL``, the user can start any flow via RPC.
|
||||
This value is intended for administrator users and for development.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
security
|
||||
Contains various nested fields controlling user authentication/authorization, in particular for RPC accesses.
|
||||
See :doc:`clientrpc` for details.
|
||||
|
||||
sshd
|
||||
If provided, node will start internal SSH server which will provide a management shell.
|
||||
It uses the same credentials and permissions as RPC subsystem.
|
||||
It has one required parameter.
|
||||
|
||||
port
|
||||
The port to start SSH server on e.g. ``sshd { port = 2222 }``.
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
systemProperties
|
||||
An optional map of additional system properties to be set when launching via ``corda.jar`` only.
|
||||
Keys and values of the map should be strings. e.g. ``systemProperties = { visualvm.display.name = FooBar }``
|
||||
|
||||
*Default:* not defined
|
||||
|
||||
transactionCacheSizeMegaBytes
|
||||
Optionally specify how much memory should be used for caching of ledger transactions in memory.
|
||||
|
||||
*Default:* 8 MB plus 5% of all heap memory above 300MB.
|
||||
|
||||
tlsCertCrlDistPoint
|
||||
CRL distribution point (i.e. URL) for the TLS certificate.
|
||||
Default value is NULL, which indicates no CRL availability for the TLS certificate.
|
||||
|
||||
**Important: This needs to be set if crlCheckSoftFail is false (i.e. strict CRL checking is on).**
|
||||
|
||||
*Default:* NULL
|
||||
|
||||
|
||||
tlsCertCrlIssuer
|
||||
CRL issuer (given in the X500 name format) for the TLS certificate.
|
||||
Default value is NULL, which indicates that the issuer of the TLS certificate is also the issuer of the CRL.
|
||||
|
||||
**Important: If this parameter is set then `tlsCertCrlDistPoint` needs to be set as well.**
|
||||
|
||||
*Default:* NULL
|
||||
|
||||
|
||||
trustStorePassword
|
||||
The password to unlock the Trust store file (``<workspace>/certificates/truststore.jks``) containing the Corda network root certificate.
|
||||
This is the non-secret value for the development certificates automatically generated during the first node run.
|
||||
|
||||
*Default:* trustpass
|
||||
|
||||
|
||||
useTestClock
|
||||
Internal option.
|
||||
|
||||
**Important: Please do not change.**
|
||||
|
||||
*Default:* false
|
||||
|
||||
|
||||
verfierType
|
||||
Internal option.
|
||||
|
||||
**Important: Please do not change.**
|
||||
|
||||
*Default:* InMemory
|
||||
|
||||
Reference.conf
|
||||
--------------
|
||||
A set of default configuration options are loaded from the built-in resource file ``/node/src/main/resources/reference.conf``.
|
||||
This file can be found in the ``:node`` gradle module of the `Corda repository <https://github.com/corda/corda>`_. Any
|
||||
options you do not specify in your own ``node.conf`` file will use these defaults.
|
||||
This file can be found in the ``:node`` gradle module of the `Corda repository <https://github.com/corda/corda>`_.
|
||||
Any options you do not specify in your own ``node.conf`` file will use these defaults.
|
||||
|
||||
Here are the contents of the ``reference.conf`` file:
|
||||
|
||||
.. literalinclude:: ../../node/src/main/resources/reference.conf
|
||||
:language: javascript
|
||||
|
||||
Fields
|
||||
------
|
||||
|
||||
.. note:: All fields can be used with placeholders for environment variables. For example: ``${NODE_TRUST_STORE_PASSWORD}`` would be replaced by the contents of environment variable ``NODE_TRUST_STORE_PASSWORD``. See: `Hiding Sensitive Data`_
|
||||
Configuration examples
|
||||
----------------------
|
||||
|
||||
The available config fields are listed below.
|
||||
|
||||
:myLegalName: The legal identity of the node. This acts as a human-readable alias to the node's public key and can be used with
|
||||
the network map to look up the node's info. This is the name that is used in the node's certificates (either when requesting them
|
||||
from the doorman, or when auto-generating them in dev mode). At runtime, Corda checks whether this name matches the
|
||||
name in the node's certificates.
|
||||
|
||||
:keyStorePassword: The password to unlock the KeyStore file (``<workspace>/certificates/sslkeystore.jks``) containing the
|
||||
node certificate and private key.
|
||||
|
||||
.. note:: This is the non-secret value for the development certificates automatically generated during the first node run.
|
||||
Longer term these keys will be managed in secure hardware devices.
|
||||
|
||||
:trustStorePassword: The password to unlock the Trust store file (``<workspace>/certificates/truststore.jks``) containing
|
||||
the Corda network root certificate. This is the non-secret value for the development certificates automatically
|
||||
generated during the first node run.
|
||||
|
||||
.. note:: Longer term these keys will be managed in secure hardware devices.
|
||||
|
||||
:crlCheckSoftFail: This is a boolean flag that when enabled (i.e. `true` value is set) the certificate revocation list (CRL) checking will use the soft fail mode.
|
||||
The soft fail mode allows the revocation check to succeed if the revocation status cannot be determined because of a network error.
|
||||
If this parameter is set to `false` the rigorous CRL checking takes place, meaning that each certificate in the
|
||||
certificate path being checked needs to have the CRL distribution point extension set and pointing to a URL serving a valid CRL.
|
||||
|
||||
.. _databaseConfiguration:
|
||||
|
||||
:database: Database configuration:
|
||||
|
||||
:transactionIsolationLevel: Transaction isolation level as defined by the ``TRANSACTION_`` constants in
|
||||
``java.sql.Connection``, but without the ``TRANSACTION_`` prefix. Defaults to ``REPEATABLE_READ``.
|
||||
:exportHibernateJMXStatistics: Whether to export Hibernate JMX statistics (caution: expensive run-time overhead)
|
||||
|
||||
:initialiseSchema: Boolean on whether to update database schema at startup (or create when node starts for the first time).
|
||||
Defaults to ``true``. If set to ``false`` on startup, the node will validate if it's running against the compatible database schema.
|
||||
|
||||
:initialiseAppSchema: The property allows to override (downgrade) ``database.initialiseSchema`` for the Hibernate
|
||||
DDL generation for CorDapp schemas. ``UPDATE`` performs an update of CorDapp schemas, while ``VALID`` only verifies
|
||||
their integrity and ``NONE`` performs no check. By default (if the property is not specified) CorDapp schemas
|
||||
creation is controlled by ``initialiseSchema``. When ``initialiseSchema`` is set to false then ``initialiseAppSchema``
|
||||
may be set as ``VALID`` or ``NONE`` only.
|
||||
|
||||
:dataSourceProperties: This section is used to configure the jdbc connection and database driver used for the nodes persistence.
|
||||
Currently the defaults in ``/node/src/main/resources/reference.conf`` are as shown in the first example. This is currently
|
||||
the only configuration that has been tested, although in the future full support for other storage layers will be validated.
|
||||
|
||||
:h2Port: Deprecated. Use ``h2Settings`` instead.
|
||||
|
||||
:h2Settings: Sets the H2 JDBC server host and port. See :doc:`node-database-access-h2`. For non-localhost address the database passowrd needs to be set in ``dataSourceProperties``.
|
||||
|
||||
:messagingServerAddress: The address of the ArtemisMQ broker instance. If not provided the node will run one locally.
|
||||
|
||||
:messagingServerExternal: If ``messagingServerAddress`` is specified the default assumption is that the artemis broker is running externally.
|
||||
Setting this to ``false`` overrides this behaviour and runs the artemis internally to the node, but bound to the address specified in ``messagingServerAddress``.
|
||||
This allows the address and port advertised in ``p2pAddress`` to differ from the local binding,
|
||||
especially if there is external remapping by firewalls, load balancers , or routing rules. Note that ``detectPublicIp`` should be set to ``false`` to ensure
|
||||
that no translation of the ``p2pAddress`` occurs before it is sent to the network map.
|
||||
|
||||
:p2pAddress: The host and port on which the node is available for protocol operations over ArtemisMQ.
|
||||
|
||||
.. note:: In practice the ArtemisMQ messaging services bind to all local addresses on the specified port. However,
|
||||
note that the host is the included as the advertised entry in the network map. As a result the value listed
|
||||
here must be externally accessible when running nodes across a cluster of machines. If the provided host is unreachable,
|
||||
the node will try to auto-discover its public one.
|
||||
|
||||
:additionalP2PAddresses: An array of additional host:port values, which will be included in the advertised NodeInfo in the network map in addition to the ``p2pAddress``.
|
||||
Nodes can use this configuration option to advertise HA endpoints and aliases to external parties. If not specified the default value is an empty list.
|
||||
|
||||
:flowTimeout: When a flow implementing the ``TimedFlow`` interface and setting the ``isTimeoutEnabled`` flag does not complete within a
|
||||
defined elapsed time, it is restarted from the initial checkpoint. Currently only used for notarisation requests with clustered
|
||||
notaries: if a notary cluster member dies while processing a notarisation request, the client flow eventually times out and gets
|
||||
restarted. On restart the request is resent to a different notary cluster member in a round-robin fashion. Note that the flow will
|
||||
keep retrying forever.
|
||||
|
||||
:timeout: The initial flow timeout period, e.g. `30 seconds`.
|
||||
:maxRestartCount: The number of retries the back-off time keeps growing for. For subsequent retries, the timeout value will remain
|
||||
constant.
|
||||
:backoffBase: The base of the exponential backoff, `t_{wait} = timeout * backoffBase^{retryCount}`.
|
||||
|
||||
:rpcAddress: (Deprecated) The address of the RPC system on which RPC requests can be made to the node. If not provided then the node will run without RPC. This is now deprecated in favour of the ``rpcSettings`` block.
|
||||
|
||||
:rpcSettings: Options for the RPC server exposed by the Node.
|
||||
|
||||
:address: host and port for the RPC server binding.
|
||||
:adminAddress: host and port for the RPC admin binding (this is the endpoint that the node process will connect to).
|
||||
:standAloneBroker: (optional) boolean, indicates whether the node will connect to a standalone broker for RPC, defaulted to ``false``.
|
||||
:useSsl: (optional) boolean, indicates whether or not the node should require clients to use SSL for RPC connections, defaulted to ``false``.
|
||||
:ssl: (mandatory if ``useSsl=true``) SSL settings for the RPC server.
|
||||
|
||||
:keyStorePath: Absolute path to the key store containing the RPC SSL certificate.
|
||||
:keyStorePassword: Password for the key store.
|
||||
|
||||
.. note:: The RPC SSL certificate is used by RPC clients to authenticate the connection.
|
||||
The Node operator must provide RPC clients with a truststore containing the certificate they can trust.
|
||||
We advise Node operators to not use the P2P keystore for RPC.
|
||||
The node can be run with the "generate-rpc-ssl-settings" command, which generates a secure keystore
|
||||
and truststore that can be used to secure the RPC connection. You can use this if you have no special requirements.
|
||||
|
||||
|
||||
:security: Contains various nested fields controlling user authentication/authorization, in particular for RPC accesses. See
|
||||
:doc:`clientrpc` for details.
|
||||
|
||||
:notary: Optional configuration object which if present configures the node to run as a notary.
|
||||
|
||||
:validating: Boolean to determine whether the notary is a validating or non-validating one.
|
||||
|
||||
:serviceLegalName: If the node is part of a distributed cluster, specify the legal name of the cluster. At runtime, Corda
|
||||
checks whether this name matches the name of the certificate of the notary cluster.
|
||||
|
||||
:className: The fully qualified class name of the notary service to run. The class is expected to be loaded from
|
||||
a notary CorDapp. Defaults to run the ``SimpleNotaryService``, which is built in.
|
||||
|
||||
:extraConfig: an optional configuration block for providing notary implementation-specific values.
|
||||
|
||||
:rpcUsers: A list of users who are authorised to access the RPC system. Each user in the list is a config object with the
|
||||
following fields:
|
||||
|
||||
:username: Username consisting only of word characters (a-z, A-Z, 0-9 and _)
|
||||
:password: The password
|
||||
:permissions: A list of permissions for starting flows via RPC. To give the user the permission to start the flow
|
||||
``foo.bar.FlowClass``, add the string ``StartFlow.foo.bar.FlowClass`` to the list. If the list
|
||||
contains the string ``ALL``, the user can start any flow via RPC. This value is intended for administrator
|
||||
users and for development.
|
||||
|
||||
:devMode: This flag sets the node to run in development mode. On startup, if the keystore ``<workspace>/certificates/sslkeystore.jks``
|
||||
does not exist, a developer keystore will be used if ``devMode`` is true. The node will exit if ``devMode`` is false
|
||||
and the keystore does not exist. ``devMode`` also turns on background checking of flow checkpoints to shake out any
|
||||
bugs in the checkpointing process.
|
||||
Also, if ``devMode`` is true, Hibernate will try to automatically create the schema required by Corda
|
||||
or update an existing schema in the SQL database; if ``devMode`` is false, Hibernate will simply validate the existing schema,
|
||||
failing on node start if the schema is either not present or not compatible.
|
||||
If no value is specified in the node config file, the node will attempt to detect if it's running on a developer machine and set ``devMode=true`` in that case.
|
||||
This value can be overridden from the command line using the ``--dev-mode`` option.
|
||||
|
||||
:detectPublicIp: This flag toggles the auto IP detection behaviour, it is disabled by default. If enabled, on startup the node will
|
||||
attempt to discover its externally visible IP address first by looking for any public addresses on its network
|
||||
interfaces, and then by sending an IP discovery request to the network map service. Set to ``true`` to enable.
|
||||
|
||||
:compatibilityZoneURL: The root address of Corda compatibility zone network management services, it is used by the Corda node to register with the network and
|
||||
obtain Corda node certificate, (See :doc:`permissioning` for more information.) and also used by the node to obtain network map information. Cannot be
|
||||
set at the same time as the ``networkServices`` option.
|
||||
|
||||
:networkServices: If the Corda compatibility zone services, both network map and registration (doorman), are not running on the same endpoint
|
||||
and thus have different URLs then this option should be used in place of the ``compatibilityZoneURL`` setting.
|
||||
|
||||
:doormanURL: Root address of the network registration service.
|
||||
:networkMapURL: Root address of the network map service.
|
||||
:pnm: Optional UUID of the private network operating within the compatibility zone this node should be joinging.
|
||||
|
||||
.. note:: Only one of ``compatibilityZoneURL`` or ``networkServices`` should be used.
|
||||
|
||||
:devModeOptions: Allows modification of certain ``devMode`` features
|
||||
|
||||
:allowCompatibilityZone: Allows a node configured to operate in development mode to connect to a compatibility zone.
|
||||
|
||||
.. note:: This is an unsupported configuration.
|
||||
|
||||
:systemProperties: An optional map of additional system properties to be set when launching via ``corda.jar`` only. Keys and values
|
||||
of the map should be strings. e.g. ``systemProperties = { visualvm.display.name = FooBar }``
|
||||
|
||||
:jarDirs: An optional list of file system directories containing JARs to include in the classpath when launching via ``corda.jar`` only.
|
||||
Each should be a string. Only the JARs in the directories are added, not the directories themselves. This is useful
|
||||
for including JDBC drivers and the like. e.g. ``jarDirs = [ '${baseDirectory}/lib' ]`` (Note that you have to use the ``baseDirectory``
|
||||
substitution value when pointing to a relative path)
|
||||
|
||||
:sshd: If provided, node will start internal SSH server which will provide a management shell. It uses the same credentials and permissions as RPC subsystem. It has one required parameter.
|
||||
|
||||
:port: The port to start SSH server on e.g. ``sshd { port = 2222 }``.
|
||||
|
||||
:jmxMonitoringHttpPort: If set, will enable JMX metrics reporting via the Jolokia HTTP/JSON agent on the corresponding port.
|
||||
Default Jolokia access url is http://127.0.0.1:port/jolokia/
|
||||
|
||||
:transactionCacheSizeMegaBytes: Optionally specify how much memory should be used for caching of ledger transactions in memory.
|
||||
Otherwise defaults to 8MB plus 5% of all heap memory above 300MB.
|
||||
|
||||
:attachmentContentCacheSizeMegaBytes: Optionally specify how much memory should be used to cache attachment contents in memory.
|
||||
Otherwise defaults to 10MB
|
||||
|
||||
:attachmentCacheBound: Optionally specify how many attachments should be cached locally. Note that this includes only the key and
|
||||
metadata, the content is cached separately and can be loaded lazily. Defaults to 1024.
|
||||
|
||||
:extraNetworkMapKeys: An optional list of private network map UUIDs. Your node will fetch the public network and private network maps based on
|
||||
these keys. Private network UUID should be provided by network operator and lets you see nodes not visible on public network.
|
||||
|
||||
.. note:: This is temporary feature for onboarding network participants that limits their visibility for privacy reasons.
|
||||
|
||||
:tlsCertCrlDistPoint: CRL distribution point (i.e. URL) for the TLS certificate. Default value is NULL, which indicates no CRL availability for the TLS certificate.
|
||||
|
||||
.. note:: This needs to be set if crlCheckSoftFail is false (i.e. strict CRL checking is on).
|
||||
|
||||
:tlsCertCrlIssuer: CRL issuer (given in the X500 name format) for the TLS certificate. Default value is NULL,
|
||||
which indicates that the issuer of the TLS certificate is also the issuer of the CRL.
|
||||
|
||||
.. note:: If this parameter is set then `tlsCertCrlDistPoint` needs to be set as well.
|
||||
|
||||
:flowMonitorPeriodMillis: ``Duration`` of the period suspended flows waiting for IO are logged. Default value is ``60 seconds``.
|
||||
|
||||
:flowMonitorSuspensionLoggingThresholdMillis: Threshold ``Duration`` suspended flows waiting for IO need to exceed before they are logged. Default value is ``60 seconds``.
|
||||
|
||||
:jmxReporterType: Provides an option for registering an alternative JMX reporter. Available options are ``JOLOKIA`` and ``NEW_RELIC``. If no value is provided, ``JOLOKIA`` will be used.
|
||||
|
||||
.. note:: The Jolokia configuration is provided by default. The New Relic configuration leverages the Dropwizard_ NewRelicReporter solution. See `Introduction to New Relic for Java`_ for details on how to get started and how to install the New Relic Java agent.
|
||||
|
||||
.. _Dropwizard: https://metrics.dropwizard.io/3.2.3/manual/third-party.html
|
||||
.. _Introduction to New Relic for Java: https://docs.newrelic.com/docs/agents/java-agent/getting-started/introduction-new-relic-java
|
||||
|
||||
.. _corda_configuration_file_signer_blacklist:
|
||||
|
||||
:cordappSignerKeyFingerprintBlacklist: List of public keys fingerprints (SHA-256 of public key hash) not allowed as Cordapp JARs signers.
|
||||
Node will not load Cordapps signed by those keys.
|
||||
The option takes effect only in production mode and defaults to Corda development keys (``["56CA54E803CB87C8472EBD3FBC6A2F1876E814CEEBF74860BD46997F40729367",
|
||||
"83088052AF16700457AE2C978A7D8AC38DD6A7C713539D00B897CD03A5E5D31D"]``), in development mode any key is allowed to sign Cordpapp JARs.
|
||||
|
||||
:networkParameterAcceptanceSettings: Optional settings for managing the network parameter auto-acceptance behaviour. If not provided then the defined defaults below are used.
|
||||
|
||||
:autoAcceptEnabled: This flag toggles auto accepting of network parameter changes. If a network operator issues a network parameter change which modifies only
|
||||
auto-acceptable options and this behaviour is enabled then the changes will be accepted without any manual intervention from the node operator. See
|
||||
:doc:`network-map` for more information on the update process and current auto-acceptable parameters. Set to ``false`` to disable. Defaults to true.
|
||||
|
||||
:excludedAutoAcceptableParameters: List of auto-acceptable parameter names to explicitly exclude from auto-accepting. Allows a node operator to control the behaviour at a
|
||||
more granular level. Defaults to an empty list.
|
||||
|
||||
:custom: Set custom command line attributes (e.g. Java system properties) on the node process via the capsule launcher
|
||||
|
||||
:jvmArgs: A list of JVM arguments to apply to the node process. This removes any defaults specified from ``corda.jar``, but can be
|
||||
overriden from the command line. See :ref:`setting_jvm_args` for examples and details on the precedence of the different
|
||||
approaches to settings arguments.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
General node configuration file for hosting the IRSDemo services:
|
||||
Node configuration hosting the IRSDemo services
|
||||
````````````````````````````````````````````````````````````````
|
||||
General node configuration file for hosting the IRSDemo services
|
||||
|
||||
.. literalinclude:: example-code/src/main/resources/example-node.conf
|
||||
|
||||
Simple notary configuration file:
|
||||
Simple notary configuration file
|
||||
`````````````````````````````````
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
myLegalName : "O=Notary Service,OU=corda,L=London,C=GB"
|
||||
keyStorePassword : "cordacadevpass"
|
||||
trustStorePassword : "trustpass"
|
||||
p2pAddress : "localhost:12345"
|
||||
rpcSettings = {
|
||||
myLegalName = "O=Notary Service,OU=corda,L=London,C=GB"
|
||||
keyStorePassword = "cordacadevpass"
|
||||
trustStorePassword = "trustpass"
|
||||
p2pAddress = "localhost:12345"
|
||||
rpcSettings {
|
||||
useSsl = false
|
||||
standAloneBroker = false
|
||||
address : "my-corda-node:10003"
|
||||
adminAddress : "my-corda-node:10004"
|
||||
address = "my-corda-node:10003"
|
||||
adminAddress = "my-corda-node:10004"
|
||||
}
|
||||
notary : {
|
||||
validating : false
|
||||
notary {
|
||||
validating = false
|
||||
}
|
||||
devMode : false
|
||||
compatibilityZoneURL : "https://cz.corda.net"
|
||||
devMode = false
|
||||
networkServices {
|
||||
doormanURL = "https://cz.example.com"
|
||||
networkMapURL = "https://cz.example.com"
|
||||
}
|
||||
|
||||
Node configuration with diffrent URL for NetworkMap and Doorman
|
||||
```````````````````````````````````````````````````````````````
|
||||
|
||||
Configuring a node where the Corda Compatibility Zone's registration and Network Map services exist on different URLs
|
||||
|
||||
.. literalinclude:: example-code/src/main/resources/example-node-with-networkservices.conf
|
||||
|
||||
Fields override
|
||||
---------------
|
||||
JVM options or environmental variables prefixed with ``corda.`` can override ``node.conf`` fields.
|
||||
Provided system properties can also set values for absent fields in ``node.conf``.
|
||||
|
||||
This is an example of adding/overriding the keyStore password :
|
||||
|
||||
.. sourcecode:: shell
|
||||
|
||||
java -Dcorda.rpcSettings.ssl.keyStorePassword=mypassword -jar node.jar
|
||||
|
||||
CRL configuration
|
||||
-----------------
|
||||
The Corda Network provides an endpoint serving an empty certificate revocation list for the TLS-level certificates.
|
||||
This is intended for deployments that do not provide a CRL infrastructure but still require a strict CRL mode checking.
|
||||
In such a case use the following URL in `tlsCertCrlDistPoint` option configuration:
|
||||
|
||||
.. sourcecode:: kotlin
|
||||
|
||||
"https://crl.cordaconnect.org/cordatls.crl"
|
||||
|
||||
Together with the above configuration `tlsCertCrlIssuer` option needs to be set to the following value:
|
||||
|
||||
.. sourcecode:: kotlin
|
||||
|
||||
"C=US, L=New York, O=R3 HoldCo LLC, OU=Corda, CN=Corda Root CA"
|
||||
|
||||
This set-up ensures that the TLS-level certificates are embedded with the CRL distribution point referencing the CRL issued by R3.
|
||||
In cases where a proprietary CRL infrastructure is provided those values need to be changed accordingly.
|
||||
|
||||
.. _corda-configuration-hiding-sensitive-data:
|
||||
|
||||
Hiding sensitive data
|
||||
---------------------
|
||||
A frequent requirement is that configuration files must not expose passwords to unauthorised readers. By leveraging environment variables, it is possible to hide passwords and other similar fields.
|
||||
|
||||
Take a simple node config that wishes to protect the node cryptographic stores:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
myLegalName : "O=PasswordProtectedNode,OU=corda,L=London,C=GB"
|
||||
keyStorePassword : ${KEY_PASS}
|
||||
trustStorePassword : ${TRUST_PASS}
|
||||
p2pAddress : "localhost:12345"
|
||||
devMode : false
|
||||
compatibilityZoneURL : "https://cz.corda.net"
|
||||
|
||||
By delegating to a password store, and using `command substitution` it is possible to ensure that sensitive passwords never appear in plain text.
|
||||
The below examples are of loading Corda with the KEY_PASS and TRUST_PASS variables read from a program named ``corporatePasswordStore``.
|
||||
|
||||
|
||||
Bash
|
||||
~~~~
|
||||
|
||||
.. sourcecode:: shell
|
||||
|
||||
KEY_PASS=$(corporatePasswordStore --cordaKeyStorePassword) TRUST_PASS=$(corporatePasswordStore --cordaTrustStorePassword) java -jar corda.jar
|
||||
|
||||
Windows PowerShell
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. sourcecode:: shell
|
||||
|
||||
$env:KEY_PASS=$(corporatePasswordStore --cordaKeyStorePassword); $env:TRUST_PASS=$(corporatePasswordStore --cordaTrustStorePassword); java -jar corda.jar
|
||||
|
||||
|
||||
For launching on Windows without PowerShell, it is not possible to perform command substitution, and so the variables must be specified manually, for example:
|
||||
|
||||
.. sourcecode:: shell
|
||||
|
||||
SET KEY_PASS=mypassword & SET TRUST_PASS=mypassword & java -jar corda.jar
|
||||
|
||||
.. warning:: If this approach is taken, the passwords will appear in the windows command prompt history.
|
||||
|
||||
|
||||
|
@ -57,7 +57,22 @@ Business network operators and network participants may choose to enter into leg
|
||||
of such digital signatures when determining whether a transaction to which they are party, or upon the details of which they
|
||||
otherwise rely, is to be treated as 'confirmed' in accordance with the terms of the underlying agreement.
|
||||
|
||||
|
||||
Support Service
|
||||
---------------
|
||||
The Support Service is provided to participants and business network operators to manage and resolve inquiries and incidents
|
||||
relating to the Identity Service, Network Map Service and Notary Services.
|
||||
|
||||
CRL configuration
|
||||
-----------------
|
||||
The Corda Network provides an endpoint serving an empty certificate revocation list for TLS-level certificates.
|
||||
This is intended for deployments that do not provide a CRL infrastructure but still require strict CRL mode checking.
|
||||
In order to use this, add the following to your configuration file:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
tlsCertCrlDistPoint = "https://crl.cordaconnect.org/cordatls.crl"
|
||||
tlsCertCrlIssuer = "C=US, L=New York, O=R3 HoldCo LLC, OU=Corda, CN=Corda Root CA"
|
||||
|
||||
This set-up ensures that the TLS-level certificates are embedded with the CRL distribution point referencing the CRL issued by R3.
|
||||
In cases where a proprietary CRL infrastructure is provided those values need to be changed accordingly.
|
||||
|
@ -5,13 +5,14 @@ Nodes
|
||||
:maxdepth: 1
|
||||
|
||||
node-structure
|
||||
generating-a-node
|
||||
docker-image
|
||||
running-a-node
|
||||
deploying-a-node
|
||||
node-naming
|
||||
corda-configuration-file
|
||||
clientrpc
|
||||
shell
|
||||
node-commandline
|
||||
node-administration
|
||||
deploying-a-node
|
||||
node-database
|
||||
node-database-access-h2
|
||||
node-administration
|
||||
shell
|
||||
clientrpc
|
||||
generating-a-node
|
||||
running-a-node
|
||||
|
@ -1,5 +1,5 @@
|
||||
Deploying a node
|
||||
================
|
||||
Deploying a node to a server
|
||||
============================
|
||||
|
||||
.. contents::
|
||||
|
||||
@ -14,7 +14,7 @@ handling, and ensures the Corda service is run at boot.
|
||||
|
||||
**Prerequisites**:
|
||||
|
||||
* Oracle Java 8. The supported versions are listed in :doc:`getting-set-up`
|
||||
* A supported Java distribution. The supported versions are listed in :doc:`getting-set-up`
|
||||
|
||||
1. As root/sys admin user - add a system user which will be used to run Corda:
|
||||
|
||||
@ -36,18 +36,18 @@ handling, and ensures the Corda service is run at boot.
|
||||
|
||||
6. Save the below as ``/opt/corda/node.conf``. See :doc:`corda-configuration-file` for a description of these options::
|
||||
|
||||
p2pAddress : "example.com:10002"
|
||||
p2pAddress = "example.com:10002"
|
||||
rpcSettings {
|
||||
address: "example.com:10003"
|
||||
adminAddress: "example.com:10004"
|
||||
}
|
||||
h2port : 11000
|
||||
emailAddress : "you@example.com"
|
||||
myLegalName : "O=Bank of Breakfast Tea, L=London, C=GB"
|
||||
keyStorePassword : "cordacadevpass"
|
||||
trustStorePassword : "trustpass"
|
||||
devMode : false
|
||||
rpcUsers=[
|
||||
h2port = 11000
|
||||
emailAddress = "you@example.com"
|
||||
myLegalName = "O=Bank of Breakfast Tea, L=London, C=GB"
|
||||
keyStorePassword = "cordacadevpass"
|
||||
trustStorePassword = "trustpass"
|
||||
devMode = false
|
||||
rpcUsers= [
|
||||
{
|
||||
user=corda
|
||||
password=portal_password
|
||||
@ -66,13 +66,8 @@ handling, and ensures the Corda service is run at boot.
|
||||
* Change the ports if necessary, for example if you are running multiple nodes on one server (see below).
|
||||
* Enter an email address which will be used as an administrative contact during the registration process. This is
|
||||
only visible to the permissioning service.
|
||||
* Enter your node's desired legal name. This will be used during the issuance of your certificate and should rarely
|
||||
change as it should represent the legal identity of your node.
|
||||
|
||||
* Organization (``O=``) should be a unique and meaningful identifier (e.g. Bank of Breakfast Tea)
|
||||
* Location (``L=``) is your nearest city
|
||||
* Country (``C=``) is the `ISO 3166-1 alpha-2 code <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`_
|
||||
* Change the RPC username and password.
|
||||
* Enter your node's desired legal name (see :ref:`node-naming` for more details).
|
||||
* If required, add RPC users
|
||||
|
||||
.. note:: Ubuntu 16.04 and most current Linux distributions use SystemD, so if you are running one of these
|
||||
distributions follow the steps marked **SystemD**.
|
||||
@ -116,8 +111,6 @@ handling, and ensures the Corda service is run at boot.
|
||||
* Make sure the service description is informative - particularly if you plan to run multiple nodes.
|
||||
* Change the username to the user account you want to use to run Corda. **We recommend that this user account is
|
||||
not root**
|
||||
* Set the maximum amount of memory available to the Corda process by changing the ``-Xmx2048m`` parameter in
|
||||
the config file
|
||||
* **SystemD**: Make sure the ``corda.service`` file is owned by root with the correct permissions:
|
||||
|
||||
* ``sudo chown root:root /etc/systemd/system/corda.service``
|
||||
@ -192,7 +185,7 @@ at boot, and means the Corda service stays running with no users connected to th
|
||||
|
||||
**Prerequisites**:
|
||||
|
||||
* Oracle Java 8. The supported versions are listed in :doc:`getting-set-up`
|
||||
* A supported Java distribution. The supported versions are listed in :doc:`getting-set-up`
|
||||
|
||||
1. Create a Corda directory and download the Corda jar. Replace ``VERSION_NUMBER`` with the desired version. Here's an
|
||||
example using PowerShell::
|
||||
@ -205,26 +198,24 @@ at boot, and means the Corda service stays running with no users connected to th
|
||||
|
||||
3. Save the below as ``C:\Corda\node.conf``. See :doc:`corda-configuration-file` for a description of these options::
|
||||
|
||||
p2pAddress : "example.com:10002"
|
||||
p2pAddress = "example.com:10002"
|
||||
rpcSettings {
|
||||
address: "example.com:10003"
|
||||
adminAddress: "example.com:10004"
|
||||
address = "example.com:10003"
|
||||
adminAddress = "example.com:10004"
|
||||
}
|
||||
h2port : 11000
|
||||
emailAddress: "you@example.com"
|
||||
myLegalName : "O=Bank of Breakfast Tea, L=London, C=GB"
|
||||
keyStorePassword : "cordacadevpass"
|
||||
trustStorePassword : "trustpass"
|
||||
devMode : false
|
||||
rpcUsers=[
|
||||
{
|
||||
user=corda
|
||||
password=portal_password
|
||||
permissions=[
|
||||
ALL
|
||||
]
|
||||
}
|
||||
]
|
||||
h2port = 11000
|
||||
emailAddress = "you@example.com"
|
||||
myLegalName = "O=Bank of Breakfast Tea, L=London, C=GB"
|
||||
keyStorePassword = "cordacadevpass"
|
||||
trustStorePassword = "trustpass"
|
||||
devMode = false
|
||||
rpcSettings {
|
||||
useSsl = false
|
||||
standAloneBroker = false
|
||||
address = "example.com:10003"
|
||||
adminAddress = "example.com:10004"
|
||||
}
|
||||
custom { jvmArgs = [ '-Xmx2048m', '-XX:+UseG1GC' ] }
|
||||
|
||||
4. Make the following changes to ``C:\Corda\node.conf``:
|
||||
|
||||
@ -234,13 +225,8 @@ at boot, and means the Corda service stays running with no users connected to th
|
||||
* Change the ports if necessary, for example if you are running multiple nodes on one server (see below).
|
||||
* Enter an email address which will be used as an administrative contact during the registration process. This is
|
||||
only visible to the permissioning service.
|
||||
* Enter your node's desired legal name. This will be used during the issuance of your certificate and should rarely
|
||||
change as it should represent the legal identity of your node.
|
||||
|
||||
* Organization (``O=``) should be a unique and meaningful identifier (e.g. Bank of Breakfast Tea)
|
||||
* Location (``L=``) is your nearest city
|
||||
* Country (``C=``) is the `ISO 3166-1 alpha-2 code <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`_
|
||||
* Change the RPC username and password.
|
||||
* Enter your node's desired legal name (see :ref:`node-naming` for more details).
|
||||
* If required, add RPC users
|
||||
|
||||
5. Copy the required Java keystores to the node. See :doc:`permissioning`
|
||||
|
||||
@ -254,7 +240,6 @@ at boot, and means the Corda service stays running with no users connected to th
|
||||
|
||||
nssm install cordanode1 C:\ProgramData\Oracle\Java\javapath\java.exe
|
||||
nssm set cordanode1 AppDirectory C:\Corda
|
||||
nssm set cordanode1 AppParameters "-Xmx2048m -jar corda.jar --config-file=C:\corda\node.conf"
|
||||
nssm set cordanode1 AppStdout C:\Corda\service.log
|
||||
nssm set cordanode1 AppStderr C:\Corda\service.log
|
||||
nssm set cordanode1 Description Corda Node - Bank of Breakfast Tea
|
||||
@ -264,7 +249,6 @@ at boot, and means the Corda service stays running with no users connected to th
|
||||
9. Modify the batch file:
|
||||
|
||||
* If you are installing multiple nodes, use a different service name (``cordanode1``) for each node
|
||||
* Set the amount of Java heap memory available to this node by modifying the -Xmx argument
|
||||
* Set an informative description
|
||||
|
||||
10. Provision the required certificates to your node. Contact the network permissioning service or see
|
||||
|
@ -1,7 +1,7 @@
|
||||
Official Corda Docker Image
|
||||
===========================
|
||||
|
||||
Running a Node connected to a Compatibility Zone in Docker
|
||||
Running a node connected to a Compatibility Zone in Docker
|
||||
----------------------------------------------------------
|
||||
|
||||
.. note:: Requirements: A valid node.conf and a valid set of certificates - (signed by the CZ)
|
||||
@ -33,7 +33,7 @@ If using the H2 database
|
||||
|
||||
5. Persistence - the folder to hold the H2 database files must be mounted at location ``/opt/corda/persistence``
|
||||
|
||||
Running a Node connected to a Bootstrapped Network
|
||||
Running a node connected to a Bootstrapped Network
|
||||
--------------------------------------------------
|
||||
|
||||
.. note:: Requirements: A valid node.conf, a valid set of certificates, and an existing network-parameters file
|
||||
@ -61,8 +61,8 @@ There is a new mount ``/home/user/sharedFolder/node-infos:/opt/corda/additional-
|
||||
As the node within the container starts up, it will place it's own nodeInfo into this directory. This will allow other nodes also using this folder to see this new node.
|
||||
|
||||
|
||||
Generating Configs and Certificates
|
||||
===================================
|
||||
Generating configs and certificates
|
||||
-----------------------------------
|
||||
|
||||
It is possible to utilize the image to automatically generate a sensible minimal configuration for joining an existing Corda network.
|
||||
|
||||
@ -107,7 +107,7 @@ It is now possible to start the node using the generated config and certificates
|
||||
corda/corda-4.0-snapshot:latest
|
||||
|
||||
|
||||
Joining An Existing Compatibility Zone
|
||||
Joining an existing Compatibility Zone
|
||||
--------------------------------------
|
||||
|
||||
.. note:: Requirements: A Compatibility Zone, the Zone Trust Root and authorisation to join said Zone.
|
||||
|
7
docs/source/docker.rst
Normal file
7
docs/source/docker.rst
Normal file
@ -0,0 +1,7 @@
|
||||
Docker
|
||||
=====
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
docker-image
|
@ -1,25 +1,25 @@
|
||||
myLegalName : "O=Bank A,L=London,C=GB"
|
||||
keyStorePassword : "cordacadevpass"
|
||||
trustStorePassword : "trustpass"
|
||||
crlCheckSoftFail: true
|
||||
dataSourceProperties : {
|
||||
dataSourceClassName : org.h2.jdbcx.JdbcDataSource
|
||||
dataSource.url : "jdbc:h2:file:"${baseDirectory}"/persistence"
|
||||
dataSource.user : sa
|
||||
dataSource.password : ""
|
||||
myLegalName = "O=Bank A,L=London,C=GB"
|
||||
keyStorePassword = "cordacadevpass"
|
||||
trustStorePassword = "trustpass"
|
||||
crlCheckSoftFail = true
|
||||
dataSourceProperties {
|
||||
dataSourceClassName = org.h2.jdbcx.JdbcDataSource
|
||||
dataSource.url = "jdbc:h2:file:"${baseDirectory}"/persistence"
|
||||
dataSource.user = sa
|
||||
dataSource.password = ""
|
||||
}
|
||||
p2pAddress : "my-corda-node:10002"
|
||||
rpcSettings = {
|
||||
p2pAddress = "my-corda-node:10002"
|
||||
rpcSettings {
|
||||
useSsl = false
|
||||
standAloneBroker = false
|
||||
address : "my-corda-node:10003"
|
||||
adminAddress : "my-corda-node:10004"
|
||||
address = "my-corda-node:10003"
|
||||
adminAddress = "my-corda-node:10004"
|
||||
}
|
||||
rpcUsers : [
|
||||
rpcUsers = [
|
||||
{ username=user1, password=letmein, permissions=[ StartFlow.net.corda.protocols.CashProtocol ] }
|
||||
]
|
||||
devMode : false
|
||||
networkServices : {
|
||||
doormanURL = "https://registration.corda.net"
|
||||
networkMapURL = "https://cz.corda.net"
|
||||
devMode = false
|
||||
networkServices {
|
||||
doormanURL = "https://registration.example.com"
|
||||
networkMapURL = "https://cz.example.com"
|
||||
}
|
||||
|
@ -1,21 +1,21 @@
|
||||
myLegalName : "O=Bank A,L=London,C=GB"
|
||||
keyStorePassword : "cordacadevpass"
|
||||
trustStorePassword : "trustpass"
|
||||
crlCheckSoftFail: true
|
||||
dataSourceProperties : {
|
||||
dataSourceClassName : org.h2.jdbcx.JdbcDataSource
|
||||
dataSource.url : "jdbc:h2:file:"${baseDirectory}"/persistence"
|
||||
dataSource.user : sa
|
||||
dataSource.password : ""
|
||||
myLegalName = "O=Bank A,L=London,C=GB"
|
||||
keyStorePassword = "cordacadevpass"
|
||||
trustStorePassword = "trustpass"
|
||||
crlCheckSoftFail = true
|
||||
dataSourceProperties {
|
||||
dataSourceClassName = org.h2.jdbcx.JdbcDataSource
|
||||
dataSource.url = "jdbc:h2:file:"${baseDirectory}"/persistence"
|
||||
dataSource.user = sa
|
||||
dataSource.password = ""
|
||||
}
|
||||
p2pAddress : "my-corda-node:10002"
|
||||
rpcSettings = {
|
||||
p2pAddress = "my-corda-node:10002"
|
||||
rpcSettings {
|
||||
useSsl = false
|
||||
standAloneBroker = false
|
||||
address : "my-corda-node:10003"
|
||||
adminAddress : "my-corda-node:10004"
|
||||
address = "my-corda-node:10003"
|
||||
adminAddress = "my-corda-node:10004"
|
||||
}
|
||||
rpcUsers : [
|
||||
rpcUsers = [
|
||||
{ username=user1, password=letmein, permissions=[ StartFlow.net.corda.protocols.CashProtocol ] }
|
||||
]
|
||||
devMode : true
|
||||
devMode = true
|
||||
|
@ -1,3 +1,3 @@
|
||||
nodeHostAndPort: "my-corda-node:10002"
|
||||
keyStorePassword : "cordacadevpass"
|
||||
trustStorePassword : "trustpass"
|
||||
nodeHostAndPort = "my-corda-node:10002"
|
||||
keyStorePassword = "cordacadevpass"
|
||||
trustStorePassword = "trustpass"
|
||||
|
@ -55,6 +55,7 @@ We look forward to seeing what you can do with Corda!
|
||||
|
||||
corda-nodes-index.rst
|
||||
corda-networks-index.rst
|
||||
docker.rst
|
||||
azure-vm.rst
|
||||
aws-vm.rst
|
||||
loadtesting.rst
|
||||
|
@ -1,6 +1,9 @@
|
||||
Node administration
|
||||
===================
|
||||
|
||||
.. _hiding-sensitive-data:
|
||||
|
||||
|
||||
Logging
|
||||
-------
|
||||
|
||||
@ -151,6 +154,55 @@ The example command above would give a 1 gigabyte Java heap.
|
||||
|
||||
.. note:: Unfortunately the JVM does not let you limit the total memory usage of Java program, just the heap size.
|
||||
|
||||
Hiding sensitive data
|
||||
---------------------
|
||||
A frequent requirement is that configuration files must not expose passwords to unauthorised readers. By leveraging environment variables, it is possible to hide passwords and other similar fields.
|
||||
|
||||
Take a simple node config that wishes to protect the node cryptographic stores:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
myLegalName = "O=PasswordProtectedNode,OU=corda,L=London,C=GB"
|
||||
keyStorePassword = ${KEY_PASS}
|
||||
trustStorePassword = ${TRUST_PASS}
|
||||
p2pAddress = "localhost:12345"
|
||||
devMode = false
|
||||
networkServices {
|
||||
doormanURL = "https://cz.example.com"
|
||||
networkMapURL = "https://cz.example.com"
|
||||
}
|
||||
|
||||
By delegating to a password store, and using `command substitution` it is possible to ensure that sensitive passwords never appear in plain text.
|
||||
The below examples are of loading Corda with the KEY_PASS and TRUST_PASS variables read from a program named ``corporatePasswordStore``.
|
||||
|
||||
|
||||
Bash
|
||||
~~~~
|
||||
|
||||
.. sourcecode:: shell
|
||||
|
||||
KEY_PASS=$(corporatePasswordStore --cordaKeyStorePassword) TRUST_PASS=$(corporatePasswordStore --cordaTrustStorePassword) java -jar corda.jar
|
||||
|
||||
.. warning:: If this approach is taken, the passwords will appear in the shell history.
|
||||
|
||||
|
||||
Windows PowerShell
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. sourcecode:: shell
|
||||
|
||||
$env:KEY_PASS=$(corporatePasswordStore --cordaKeyStorePassword); $env:TRUST_PASS=$(corporatePasswordStore --cordaTrustStorePassword); java -jar corda.jar
|
||||
|
||||
|
||||
For launching on Windows without PowerShell, it is not possible to perform command substitution, and so the variables must be specified manually, for example:
|
||||
|
||||
.. sourcecode:: shell
|
||||
|
||||
SET KEY_PASS=mypassword & SET TRUST_PASS=mypassword & java -jar corda.jar
|
||||
|
||||
.. warning:: If this approach is taken, the passwords will appear in the windows command prompt history.
|
||||
|
||||
|
||||
Backup recommendations
|
||||
----------------------
|
||||
|
||||
|
49
docs/source/node-commandline.rst
Normal file
49
docs/source/node-commandline.rst
Normal file
@ -0,0 +1,49 @@
|
||||
Node command-line options
|
||||
====================
|
||||
|
||||
The node can optionally be started with the following command-line options:
|
||||
|
||||
* ``--base-directory``, ``-b``: The node working directory where all the files are kept (default: ``.``).
|
||||
* ``--config-file``, ``-f``: The path to the config file. Defaults to ``node.conf``.
|
||||
* ``--dev-mode``, ``-d``: Runs the node in development mode. Unsafe in production. Defaults to true on MacOS and desktop versions of Windows. False otherwise.
|
||||
* ``--no-local-shell``, ``-n``: Do not start the embedded shell locally.
|
||||
* ``--on-unknown-config-keys <[FAIL,INFO]>``: How to behave on unknown node configuration. Defaults to FAIL.
|
||||
* ``--sshd``: Enables SSH server for node administration.
|
||||
* ``--sshd-port``: Sets the port for the SSH server. If not supplied and SSH server is enabled, the port defaults to 2222.
|
||||
* ``--verbose``, ``--log-to-console``, ``-v``: If set, prints logging to the console as well as to a file.
|
||||
* ``--logging-level=<loggingLevel>``: Enable logging at this level and higher. Possible values: ERROR, WARN, INFO, DEBUG, TRACE. Default: INFO.
|
||||
* ``--help``, ``-h``: Show this help message and exit.
|
||||
* ``--version``, ``-V``: Print version information and exit.
|
||||
|
||||
Sub-commands
|
||||
------------
|
||||
|
||||
``clear-network-cache``: Clears local copy of network map, on node startup it will be restored from server or file system.
|
||||
|
||||
``initial-registration``: Starts initial node registration with the compatibility zone to obtain a certificate from the Doorman.
|
||||
|
||||
Parameters:
|
||||
|
||||
* ``--network-root-truststore``, ``-t`` **required**: Network root trust store obtained from network operator.
|
||||
* ``--network-root-truststore-password``, ``-p``: Network root trust store password obtained from network operator.
|
||||
|
||||
``generate-node-info``: Performs the node start-up tasks necessary to generate the nodeInfo file, saves it to disk, then exits.
|
||||
|
||||
``generate-rpc-ssl-settings``: Generates the SSL keystore and truststore for a secure RPC connection.
|
||||
|
||||
``install-shell-extensions``: Install ``corda`` alias and auto completion for bash and zsh. See :doc:`cli-application-shell-extensions` for more info.
|
||||
|
||||
|
||||
``validate-configuration``: Validates the actual configuration without starting the node.
|
||||
|
||||
.. _enabling-remote-debugging:
|
||||
|
||||
Enabling remote debugging
|
||||
-------------------------
|
||||
To enable remote debugging of the node, run the node with the following JVM arguments:
|
||||
|
||||
``java -Dcapsule.jvm.args="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" -jar corda.jar``
|
||||
|
||||
This will allow you to attach a debugger to your node on port 5005.
|
||||
|
||||
|
60
docs/source/node-naming.rst
Normal file
60
docs/source/node-naming.rst
Normal file
@ -0,0 +1,60 @@
|
||||
.. _node-naming:
|
||||
|
||||
Node identity
|
||||
=============
|
||||
A node's name must be a valid X.500 distinguished name. In order to be compatible with other implementations
|
||||
(particularly TLS implementations), we constrain the allowed X.500 name attribute types to a subset of the minimum
|
||||
supported set for X.509 certificates (specified in RFC 3280), plus the locality attribute:
|
||||
|
||||
* Organization (O)
|
||||
* State (ST)
|
||||
* Locality (L)
|
||||
* Country (C)
|
||||
* Organizational-unit (OU)
|
||||
* Common name (CN)
|
||||
|
||||
Note that the serial number is intentionally excluded from Corda certificates in order to minimise scope for uncertainty in
|
||||
the distinguished name format. The distinguished name qualifier has been removed due to technical issues; consideration was
|
||||
given to "Corda" as qualifier, however the qualifier needs to reflect the Corda compatibility zone, not the technology involved.
|
||||
There may be many Corda namespaces, but only one R3 namespace on Corda. The ordering of attributes is important.
|
||||
|
||||
``State`` should be avoided unless required to differentiate from other ``localities`` with the same or similar names at the
|
||||
country level. For example, London (GB) would not need a ``state``, but St Ives would (there are two, one in Cornwall, one
|
||||
in Cambridgeshire). As legal entities in Corda are likely to be located in major cities, this attribute is not expected to be
|
||||
present in the majority of names, but is an option for the cases which require it.
|
||||
|
||||
The name must also obey the following constraints:
|
||||
|
||||
* The ``organisation``, ``locality`` and ``country`` attributes are present
|
||||
|
||||
* The ``state``, ``organisational-unit`` and ``common name`` attributes are optional
|
||||
|
||||
* The fields of the name have the following maximum character lengths:
|
||||
|
||||
* Common name: 64
|
||||
* Organisation: 128
|
||||
* Organisation unit: 64
|
||||
* Locality: 64
|
||||
* State: 64
|
||||
|
||||
* The ``country`` attribute is a valid `ISO 3166-1<https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>` two letter code in upper-case
|
||||
|
||||
* The ``organisation`` field of the name obeys the following constraints:
|
||||
* Has at least two letters
|
||||
* Does not include the following characters: ``,`` , ``"``, ``\``
|
||||
* Is in NFKC normalization form
|
||||
* Does not contain the null character
|
||||
* Only the latin, common and inherited unicode scripts are supported
|
||||
* No double-spacing
|
||||
|
||||
This is to avoid right-to-left issues, debugging issues when we can't pronounce names over the phone, and
|
||||
character confusability attacks.
|
||||
|
||||
.. note:: The network operator of a Corda Network may put additional constraints on node naming in place.
|
||||
|
||||
External identifiers
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
Mappings to external identifiers such as Companies House nos., LEI, BIC, etc. should be stored in custom X.509
|
||||
certificate extensions. These values may change for operational reasons, without the identity they're associated with
|
||||
necessarily changing, and their inclusion in the distinguished name would cause significant logistical complications.
|
||||
The OID and format for these extensions will be described in a further specification.
|
@ -1,9 +1,7 @@
|
||||
Node structure
|
||||
==============
|
||||
Node folder structure
|
||||
=====================
|
||||
|
||||
.. contents::
|
||||
|
||||
A Corda node has the following structure:
|
||||
A folder containing a Corda node files has the following structure:
|
||||
|
||||
.. sourcecode:: none
|
||||
|
||||
@ -12,11 +10,11 @@ A Corda node has the following structure:
|
||||
├── artemis // Stores buffered P2P messages
|
||||
├── brokers // Stores buffered RPC messages
|
||||
├── certificates // The node's certificates
|
||||
├── corda-webserver.jar // The built-in node webserver
|
||||
├── corda.jar // The core Corda libraries
|
||||
├── corda-webserver.jar // The built-in node webserver (DEPRECATED)
|
||||
├── corda.jar // The core Corda libraries (This is the actual Corda node implementation)
|
||||
├── cordapps // The CorDapp JARs installed on the node
|
||||
├── drivers // Contains a Jolokia driver used to export JMX metrics, the node loads any additional JAR files from this directory at startup.
|
||||
├── logs // The node logs
|
||||
├── logs // The node's logs
|
||||
├── network-parameters // The network parameters automatically downloaded from the network map server
|
||||
├── node.conf // The node's configuration files
|
||||
├── persistence.mv.db // The node's database
|
||||
@ -40,63 +38,3 @@ If no password is configured, it defaults to ``cordacadevpass``.
|
||||
|
||||
To learn more, see :doc:`permissioning`.
|
||||
|
||||
.. _node_naming:
|
||||
|
||||
Node naming
|
||||
-----------
|
||||
A node's name must be a valid X.500 distinguished name. In order to be compatible with other implementations
|
||||
(particularly TLS implementations), we constrain the allowed X.500 name attribute types to a subset of the minimum
|
||||
supported set for X.509 certificates (specified in RFC 3280), plus the locality attribute:
|
||||
|
||||
* Organization (O)
|
||||
* State (ST)
|
||||
* Locality (L)
|
||||
* Country (C)
|
||||
* Organizational-unit (OU)
|
||||
* Common name (CN)
|
||||
|
||||
Note that the serial number is intentionally excluded in order to minimise scope for uncertainty in the distinguished name format.
|
||||
The distinguished name qualifier has been removed due to technical issues; consideration was given to "Corda" as qualifier,
|
||||
however the qualifier needs to reflect the compatibility zone, not the technology involved. There may be many Corda namespaces,
|
||||
but only one R3 namespace on Corda. The ordering of attributes is important.
|
||||
|
||||
``State`` should be avoided unless required to differentiate from other ``localities`` with the same or similar names at the
|
||||
country level. For example, London (GB) would not need a ``state``, but St Ives would (there are two, one in Cornwall, one
|
||||
in Cambridgeshire). As legal entities in Corda are likely to be located in major cities, this attribute is not expected to be
|
||||
present in the majority of names, but is an option for the cases which require it.
|
||||
|
||||
The name must also obey the following constraints:
|
||||
|
||||
* The ``organisation``, ``locality`` and ``country`` attributes are present
|
||||
|
||||
* The ``state``, ``organisational-unit`` and ``common name`` attributes are optional
|
||||
|
||||
* The fields of the name have the following maximum character lengths:
|
||||
|
||||
* Common name: 64
|
||||
* Organisation: 128
|
||||
* Organisation unit: 64
|
||||
* Locality: 64
|
||||
* State: 64
|
||||
|
||||
* The ``country`` attribute is a valid ISO 3166-1 two letter code in upper-case
|
||||
|
||||
* The ``organisation`` field of the name obeys the following constraints:
|
||||
* Has at least two letters
|
||||
* Does not include the following characters: ``,`` , ``"``, ``\``
|
||||
* Is in NFKC normalization form
|
||||
* Does not contain the null character
|
||||
* Only the latin, common and inherited unicode scripts are supported
|
||||
* No double-spacing
|
||||
|
||||
This is to avoid right-to-left issues, debugging issues when we can't pronounce names over the phone, and
|
||||
character confusability attacks.
|
||||
|
||||
.. note:: The network operator of a Corda Network may put additional constraints on node naming in place.
|
||||
|
||||
External identifiers
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
Mappings to external identifiers such as Companies House nos., LEI, BIC, etc. should be stored in custom X.509
|
||||
certificate extensions. These values may change for operational reasons, without the identity they're associated with
|
||||
necessarily changing, and their inclusion in the distinguished name would cause significant logistical complications.
|
||||
The OID and format for these extensions will be described in a further specification.
|
||||
|
@ -26,15 +26,6 @@ By default, the node will look for a configuration file called ``node.conf`` and
|
||||
in the current working directory. You can override the configuration file and workspace paths on the command line (e.g.
|
||||
``./corda.jar --config-file=test.conf --base-directory=/opt/corda/nodes/test``).
|
||||
|
||||
You can increase the amount of Java heap memory available to the node using the ``-Xmx`` command line argument. For
|
||||
example, the following would run the node with a heap size of 2048MB:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
java -Xmx2048m -jar corda.jar
|
||||
|
||||
You should do this if you receive an ``OutOfMemoryError`` exception when interacting with the node.
|
||||
|
||||
Optionally run the node's webserver as well by opening a terminal window in the node's folder and running:
|
||||
|
||||
.. code-block:: shell
|
||||
@ -77,54 +68,6 @@ anything set earlier.
|
||||
:Command line flag: You can set JVM args on the command line that apply to the launcher process and the node process as in the example
|
||||
above. This will override any value for the same flag set any other way, but will leave any other JVM arguments alone.
|
||||
|
||||
|
||||
Command-line options
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
The node can optionally be started with the following command-line options:
|
||||
|
||||
* ``--base-directory``, ``-b``: The node working directory where all the files are kept (default: ``.``).
|
||||
* ``--config-file``, ``-f``: The path to the config file. Defaults to ``node.conf``.
|
||||
* ``--dev-mode``, ``-d``: Runs the node in development mode. Unsafe in production. Defaults to true on MacOS and desktop versions of Windows. False otherwise.
|
||||
* ``--no-local-shell``, ``-n``: Do not start the embedded shell locally.
|
||||
* ``--on-unknown-config-keys <[FAIL,INFO]>``: How to behave on unknown node configuration. Defaults to FAIL.
|
||||
* ``--sshd``: Enables SSH server for node administration.
|
||||
* ``--sshd-port``: Sets the port for the SSH server. If not supplied and SSH server is enabled, the port defaults to 2222.
|
||||
* ``--verbose``, ``--log-to-console``, ``-v``: If set, prints logging to the console as well as to a file.
|
||||
* ``--logging-level=<loggingLevel>``: Enable logging at this level and higher. Possible values: ERROR, WARN, INFO, DEBUG, TRACE. Default: INFO.
|
||||
* ``--help``, ``-h``: Show this help message and exit.
|
||||
* ``--version``, ``-V``: Print version information and exit.
|
||||
|
||||
Sub-commands
|
||||
^^^^^^^^^^^^
|
||||
|
||||
``clear-network-cache``: Clears local copy of network map, on node startup it will be restored from server or file system.
|
||||
|
||||
``initial-registration``: Starts initial node registration with the compatibility zone to obtain a certificate from the Doorman.
|
||||
|
||||
Parameters:
|
||||
|
||||
* ``--network-root-truststore``, ``-t`` **required**: Network root trust store obtained from network operator.
|
||||
* ``--network-root-truststore-password``, ``-p``: Network root trust store password obtained from network operator.
|
||||
|
||||
``generate-node-info``: Performs the node start-up tasks necessary to generate the nodeInfo file, saves it to disk, then exits.
|
||||
|
||||
``generate-rpc-ssl-settings``: Generates the SSL keystore and truststore for a secure RPC connection.
|
||||
|
||||
``install-shell-extensions``: Install ``corda`` alias and auto completion for bash and zsh. See :doc:`cli-application-shell-extensions` for more info.
|
||||
|
||||
|
||||
``validate-configuration``: Validates the actual configuration without starting the node.
|
||||
|
||||
.. _enabling-remote-debugging:
|
||||
|
||||
Enabling remote debugging
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
To enable remote debugging of the node, run the node with the following JVM arguments:
|
||||
|
||||
``java -Dcapsule.jvm.args="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" -jar corda.jar``
|
||||
|
||||
This will allow you to attach a debugger to your node on port 5005.
|
||||
|
||||
Starting all nodes at once on a local machine from the command line
|
||||
-------------------------------------------------------------------
|
||||
|
||||
|
@ -1,30 +1,28 @@
|
||||
emailAddress = "admin@company.com"
|
||||
keyStorePassword = "cordacadevpass"
|
||||
trustStorePassword = "trustpass"
|
||||
crlCheckSoftFail = true
|
||||
lazyBridgeStart = true
|
||||
additionalP2PAddresses = []
|
||||
crlCheckSoftFail = true
|
||||
database = {
|
||||
transactionIsolationLevel = "REPEATABLE_READ"
|
||||
exportHibernateJMXStatistics = "false"
|
||||
}
|
||||
dataSourceProperties = {
|
||||
dataSourceClassName = org.h2.jdbcx.JdbcDataSource
|
||||
dataSource.url = "jdbc:h2:file:"${baseDirectory}"/persistence;DB_CLOSE_ON_EXIT=FALSE;WRITE_DELAY=0;LOCK_TIMEOUT=10000"
|
||||
dataSource.user = sa
|
||||
dataSource.password = ""
|
||||
}
|
||||
database = {
|
||||
transactionIsolationLevel = "REPEATABLE_READ"
|
||||
exportHibernateJMXStatistics = "false"
|
||||
}
|
||||
|
||||
useTestClock = false
|
||||
verifierType = InMemory
|
||||
rpcSettings = {
|
||||
useSsl = false
|
||||
standAloneBroker = false
|
||||
}
|
||||
emailAddress = "admin@company.com"
|
||||
flowTimeout {
|
||||
timeout = 30 seconds
|
||||
maxRestartCount = 6
|
||||
backoffBase = 1.8
|
||||
}
|
||||
jmxReporterType = JOLOKIA
|
||||
|
||||
keyStorePassword = "cordacadevpass"
|
||||
lazyBridgeStart = true
|
||||
rpcSettings = {
|
||||
useSsl = false
|
||||
standAloneBroker = false
|
||||
}
|
||||
trustStorePassword = "trustpass"
|
||||
useTestClock = false
|
||||
verifierType = InMemory
|
||||
|
Loading…
x
Reference in New Issue
Block a user