mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-10 16:00:19 -04:00
Dynamic grpc client credentials (#204)
* Add an aTLS wrapper for grpc credentials * Move grpc dialers to internal and use aTLS grpc credentials Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
6e9428a234
commit
1e19e64fbc
25 changed files with 291 additions and 189 deletions
|
@ -11,8 +11,8 @@ import (
|
|||
"github.com/edgelesssys/constellation/coordinator/pubapi/pubproto"
|
||||
"github.com/edgelesssys/constellation/coordinator/role"
|
||||
"github.com/edgelesssys/constellation/coordinator/state"
|
||||
"github.com/edgelesssys/constellation/coordinator/util/grpcutil"
|
||||
"github.com/edgelesssys/constellation/coordinator/util/testdialer"
|
||||
"github.com/edgelesssys/constellation/internal/grpc/dialer"
|
||||
"github.com/edgelesssys/constellation/internal/grpc/testdialer"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/zap/zaptest"
|
||||
|
@ -95,7 +95,7 @@ func TestActivateAsAdditionalCoordinator(t *testing.T) {
|
|||
clusterID: []byte("clusterID"),
|
||||
}
|
||||
netDialer := testdialer.NewBufconnDialer()
|
||||
dialer := grpcutil.NewDialer(fakeValidator{}, netDialer)
|
||||
dialer := dialer.New(nil, fakeValidator{}, netDialer)
|
||||
|
||||
getPublicIPAddr := func() (string, error) {
|
||||
return "192.0.2.1", nil
|
||||
|
@ -166,7 +166,7 @@ func TestTriggerCoordinatorUpdate(t *testing.T) {
|
|||
state: tc.state,
|
||||
peers: tc.peers,
|
||||
}
|
||||
dialer := grpcutil.NewDialer(fakeValidator{}, nil)
|
||||
dialer := dialer.New(nil, fakeValidator{}, nil)
|
||||
|
||||
api := New(logger, &logging.NopLogger{}, core, dialer, nil, nil, nil)
|
||||
|
||||
|
@ -240,7 +240,7 @@ func TestActivateAdditionalCoordinators(t *testing.T) {
|
|||
clusterID: []byte("clusterID"),
|
||||
}
|
||||
netDialer := testdialer.NewBufconnDialer()
|
||||
dialer := grpcutil.NewDialer(fakeValidator{}, netDialer)
|
||||
dialer := dialer.New(nil, fakeValidator{}, netDialer)
|
||||
|
||||
getPublicIPAddr := func() (string, error) {
|
||||
return "192.0.2.1", nil
|
||||
|
@ -297,7 +297,7 @@ func TestGetPeerVPNPublicKey(t *testing.T) {
|
|||
vpnPubKey: tc.coordinator.peer.VPNPubKey,
|
||||
getvpnPubKeyErr: tc.getVPNPubKeyErr,
|
||||
}
|
||||
dialer := grpcutil.NewDialer(fakeValidator{}, testdialer.NewBufconnDialer())
|
||||
dialer := dialer.New(nil, fakeValidator{}, testdialer.NewBufconnDialer())
|
||||
|
||||
getPublicIPAddr := func() (string, error) {
|
||||
return "192.0.2.1", nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue