Skip to content

Commit 6ffbb47

Browse files
author
Nicolás Tallar
authored
Merge branch 'develop' into million-dollars-tool-felix-pays
2 parents 63648d5 + 7031c7f commit 6ffbb47

File tree

78 files changed

+2068
-295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+2068
-295
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,42 @@ projectRoot $ docker build -f ./docker/monitoring-client.Dockerfile -t mantis-mo
130130
projectRoot $ docker run --network=host mantis-monitoring-client
131131
```
132132

133+
### TLS setup
134+
135+
Both the JSON RPC (on the node and faucet) can be additionally protected using TLS.
136+
On the development environment it's already properly configured with a development certificate.
137+
138+
#### Generating a new certificate
139+
140+
If a new certificate is required, create a new keystore with a certificate by running `./tls/gen-cert.sh`
141+
142+
#### Configuring the node
143+
144+
1. Configure the certificate and password file to be used at `mantis.network.rpc.http.certificate` key on the `application.conf` file:
145+
146+
keystore-path: path to the keystore storing the certificates (if generated through our script they are by default located in "./tls/mantisCA.p12")
147+
keystore-type: type of certificate keystore being used (if generated through our script use "pkcs12")
148+
password-file: path to the file with the password used for accessing the certificate keystore (if generated through our script they are by default located in "./tls/password")
149+
2. Enable TLS in specific config:
150+
- For JSON RPC: `mantis.network.rpc.http.mode=https`
151+
152+
#### Configuring the faucet
153+
154+
1. Configure the certificate and password file to be used at `mantis.network.rpc.http.certificate` key on the `faucet.conf` file:
155+
156+
keystore-path: path to the keystore storing the certificates (if generated through our script they are by default located in "./tls/mantisCA.p12")
157+
keystore-type: type of certificate keystore being used (if generated through our script use "pkcs12")
158+
password-file: path to the file with the password used for accessing the certificate keystore (if generated through our script they are by default located in "./tls/password")
159+
2. Enable TLS in specific config:
160+
- For JSON RPC: `mantis.network.rpc.http.mode=https`
161+
3. Configure the certificate used from RpcClient to connect with the node. Necessary if the node uses http secure.
162+
This certificate and password file to be used at `faucet.rpc-client.certificate` key on the `faucet.conf` file:
163+
164+
keystore-path: path to the keystore storing the certificates
165+
keystore-type: type of certificate keystore being used (if generated through our script use "pkcs12")
166+
password-file: path to the file with the password used for accessing the certificate keystore
167+
168+
133169
### Feedback
134170

135171
Feedback gratefully received through the Ethereum Classic Forum (http://forum.ethereumclassic.org/)

src/evmTest/scala/io/iohk/ethereum/vm/PrecompiledContractsSpecEvm.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import akka.util.ByteString
44
import io.iohk.ethereum.crypto
55
import io.iohk.ethereum.crypto._
66
import io.iohk.ethereum.domain.SignedTransaction.{FirstByteOfAddress, LastByteOfAddress}
7-
import io.iohk.ethereum.nodebuilder.SecureRandomBuilder
7+
import io.iohk.ethereum.security.SecureRandomBuilder
88
import io.iohk.ethereum.vm.utils.EvmTestEnv
99
import org.bouncycastle.crypto.params.ECPublicKeyParameters
1010
import org.scalatest.funsuite.AnyFunSuite

src/it/scala/io/iohk/ethereum/sync/util/CommonFakePeer.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import io.iohk.ethereum.db.dataSource.{RocksDbConfig, RocksDbDataSource}
1515
import io.iohk.ethereum.db.storage.pruning.{ArchivePruning, PruningMode}
1616
import io.iohk.ethereum.db.storage.{AppStateStorage, Namespaces}
1717
import io.iohk.ethereum.domain.{Block, Blockchain, BlockchainImpl, ChainWeight}
18+
import io.iohk.ethereum.security.SecureRandomBuilder
1819
import io.iohk.ethereum.ledger.InMemoryWorldStateProxy
1920
import io.iohk.ethereum.mpt.MerklePatriciaTrie
2021
import io.iohk.ethereum.network.EtcPeerManagerActor.PeerInfo
@@ -33,7 +34,7 @@ import io.iohk.ethereum.network.{
3334
PeerManagerActor,
3435
ServerActor
3536
}
36-
import io.iohk.ethereum.nodebuilder.{PruningConfigBuilder, SecureRandomBuilder}
37+
import io.iohk.ethereum.nodebuilder.PruningConfigBuilder
3738
import io.iohk.ethereum.sync.util.SyncCommonItSpec._
3839
import io.iohk.ethereum.sync.util.SyncCommonItSpecUtils._
3940
import io.iohk.ethereum.utils.ServerStatus.Listening

src/it/scala/io/iohk/ethereum/txExecTest/util/DumpChainApp.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ import io.iohk.ethereum.network.handshaker.{EtcHandshaker, EtcHandshakerConfigur
2323
import io.iohk.ethereum.network.p2p.EthereumMessageDecoder
2424
import io.iohk.ethereum.network.rlpx.RLPxConnectionHandler.RLPxConfiguration
2525
import io.iohk.ethereum.network.{ForkResolver, PeerEventBusActor, PeerManagerActor}
26-
import io.iohk.ethereum.nodebuilder.{AuthHandshakerBuilder, NodeKeyBuilder, SecureRandomBuilder}
26+
import io.iohk.ethereum.nodebuilder.{AuthHandshakerBuilder, NodeKeyBuilder}
27+
import io.iohk.ethereum.security.SecureRandomBuilder
2728
import io.iohk.ethereum.utils.{Config, NodeStatus, ServerStatus}
2829
import monix.reactive.Observable
2930
import org.bouncycastle.util.encoders.Hex

src/main/resources/application.conf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,20 @@ mantis {
183183
# Listening port of JSON-RPC HTTP(S) endpoint
184184
port = 8546
185185

186+
certificate = null
187+
#certificate {
186188
# Path to the keystore storing the certificates (used only for https)
187189
# null value indicates HTTPS is not being used
188-
certificate-keystore-path = null
190+
# keystore-path = "tls/mantisCA.p12"
189191

190192
# Type of certificate keystore being used
191193
# null value indicates HTTPS is not being used
192-
certificate-keystore-type = null
194+
# keystore-type = "pkcs12"
193195

194196
# File with the password used for accessing the certificate keystore (used only for https)
195197
# null value indicates HTTPS is not being used
196-
certificate-password-file = null
198+
# password-file = "tls/password"
199+
#}
197200

198201
# Domains allowed to query RPC endpoint. Use "*" to enable requests from
199202
# any domain.

0 commit comments

Comments
 (0)