solution: configure rpc server TLS certificate

This commit is contained in:
Igor Artamonov
2019-08-15 18:54:17 -04:00
parent e2520f4dbf
commit 38afb2a1a4
9 changed files with 43 additions and 50 deletions

View File

@@ -39,9 +39,8 @@ class UpstreamsConfigReaderSpec extends Specification {
connection instanceof UpstreamsConfig.EthereumConnection
with((UpstreamsConfig.EthereumConnection)connection) {
rpc.url == new URI("https://mainnet.infura.io/v3/fa28c968191849c1aff541ad1d8511f2")
rpc.auth != null
rpc.auth instanceof UpstreamsConfig.BasicAuth
with((UpstreamsConfig.BasicAuth)rpc.auth) {
rpc.basicAuth != null
with((UpstreamsConfig.BasicAuth)rpc.basicAuth) {
username == "4fc258fe41a68149c199ad8f281f2015"
password == "1a68f20154fc258fe4149c199ad8f281"
}
@@ -65,8 +64,8 @@ class UpstreamsConfigReaderSpec extends Specification {
connection instanceof UpstreamsConfig.GrpcConnection
with((UpstreamsConfig.GrpcConnection)connection) {
host == "10.2.0.15"
auth instanceof UpstreamsConfig.TlsAuth
with((UpstreamsConfig.TlsAuth)auth) {
auth != null
with(auth) {
ca == "/etc/ca.myservice.com.crt"
certificate == "/etc/client1.myservice.com.crt"
key == "/etc/client1.myservice.com.key"

View File

@@ -22,7 +22,6 @@ upstreams:
ethereum:
rpc:
url: "https://mainnet.infura.io/v3/fa28c968191849c1aff541ad1d8511f2"
auth:
type: basic
basic-auth:
username: 4fc258fe41a68149c199ad8f281f2015
password: 1a68f20154fc258fe4149c199ad8f281

View File

@@ -11,8 +11,7 @@ upstreams:
connection:
grpc:
host: "10.2.0.15"
auth:
type: tls
tls:
ca: /etc/ca.myservice.com.crt
certificate: /etc/client1.myservice.com.crt
key: /etc/client1.myservice.com.key

View File

@@ -11,8 +11,7 @@ upstreams:
connection:
grpc:
host: "10.2.0.15"
auth:
type: tls
tls:
ca: /etc/ca.myservice.com.crt
certificate: /etc/client1.myservice.com.crt
key: /etc/client1.myservice.com.key

View File

@@ -26,7 +26,6 @@ upstreams:
ethereum:
rpc:
url: "https://mainnet.infura.io/v3/fa28c968191849c1aff541ad1d8511f2"
auth:
type: basic
basic-auth:
username: 4fc258fe41a68149c199ad8f281f2015
password: 1a68f20154fc258fe4149c199ad8f281