Skip to content
Snippets Groups Projects
Commit a8d408ee authored by Josh Brooks's avatar Josh Brooks
Browse files

Respond to MR commentS

parent 60622bd8
No related branches found
No related tags found
1 merge request!58Revert "Modify waiting lock"
......@@ -38,6 +38,10 @@ type Instance struct {
ipOverride *ds.IpOverrideList
// Determines whether auth is enabled
// on communication with gateways
gatewayAuth bool
// Network Health
networkHealth chan Heartbeat
......@@ -614,9 +618,7 @@ func (i *Instance) updateConns(def *ndf.NetworkDefinition, isGateway, isNode boo
gwParams := connect.GetDefaultHostParams()
gwParams.MaxRetries = 3
gwParams.EnableCoolOff = true
if i.comm.Id.GetType() != id.Gateway {
gwParams.AuthEnabled = false
}
gwParams.AuthEnabled = i.gatewayAuth
_, err := i.comm.AddHost(gwid, addr, []byte(gateway.TlsCertificate), gwParams)
if err != nil {
return errors.WithMessagef(err, "Could not add gateway host %s", gwid)
......@@ -686,3 +688,9 @@ func (i *Instance) updateConns(def *ndf.NetworkDefinition, isGateway, isNode boo
}
return nil
}
// SetGatewayAuth will force authentication on all communications with gateways
// intended for use between Gateway <-> Gateway communications
func (i *Instance) SetGatewayAuthentication() {
i.gatewayAuth = true
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment