Send more info on KMS connect (#2182)
This commit is contained in:
1 parent
9dde83aea7
commit
8fd663af47
3 files changed
+5
-3
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user