Send more info on KMS connect (#2182)

pull/2192/head
Jeff Mitchell 4 years ago committed by GitHub
parent 9dde83aea7
commit 8fd663af47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -36,6 +36,7 @@ type WorkerAuthInfo struct {
Name string `json:"name"`
Description string `json:"description"`
ConnectionNonce string `json:"connection_nonce"`
ProxyAddress string `json:"proxy_address"`
}
// Factory is the factory function to create a listener.

@ -113,7 +113,7 @@ func (m *interceptingListener) Accept() (net.Conn, error) {
}
workerInfo := workerInfoRaw.(*workerAuthEntry)
workerInfo.conn = tlsConn
event.WriteSysEvent(ctx, op, "worker successfully authed", "name", workerInfo.Name)
event.WriteSysEvent(ctx, op, "worker successfully authed", "name", workerInfo.Name, "description", workerInfo.Description, "proxy_address", workerInfo.ProxyAddress)
return tlsConn, nil
default:

@ -208,8 +208,9 @@ func (w *Worker) createClientConn(addr string) error {
func (w *Worker) workerAuthTLSConfig() (*tls.Config, *base.WorkerAuthInfo, error) {
var err error
info := &base.WorkerAuthInfo{
Name: w.conf.RawConfig.Worker.Name,
Description: w.conf.RawConfig.Worker.Description,
Name: w.conf.RawConfig.Worker.Name,
Description: w.conf.RawConfig.Worker.Description,
ProxyAddress: w.conf.RawConfig.Worker.PublicAddr,
}
info.ConnectionNonce, err = w.nonceFn(20)

Loading…
Cancel
Save