From 482e27a386066b4e0178d9d5140f477c912c2f67 Mon Sep 17 00:00:00 2001 From: joerger Date: Wed, 22 Jun 2022 10:21:03 -0700 Subject: [PATCH 1/2] Remove duplicate parties in kube and ssh session trackers. --- lib/kube/proxy/sess.go | 5 ----- lib/srv/sess.go | 4 ---- 2 files changed, 9 deletions(-) diff --git a/lib/kube/proxy/sess.go b/lib/kube/proxy/sess.go index ebb38f7effc4c..786c32ce70785 100644 --- a/lib/kube/proxy/sess.go +++ b/lib/kube/proxy/sess.go @@ -1071,11 +1071,6 @@ func (s *session) trackSession(p *party, policySet []*types.SessionTrackerPolicy State: types.SessionState_SessionStatePending, Hostname: s.podName, ClusterName: s.ctx.teleportCluster.name, - Participants: []types.Participant{{ - ID: p.ID.String(), - User: p.Ctx.User.GetName(), - LastActive: time.Now().UTC(), - }}, KubernetesCluster: s.ctx.kubeCluster, HostUser: p.Ctx.User.GetName(), HostPolicies: policySet, diff --git a/lib/srv/sess.go b/lib/srv/sess.go index 5b166672ec038..e8b10f43611f2 100644 --- a/lib/srv/sess.go +++ b/lib/srv/sess.go @@ -1075,10 +1075,6 @@ func (s *session) startInteractive(ch ssh.Channel, ctx *ServerContext, tempUser }() } - if err := s.addParty(p, types.SessionPeerMode); err != nil { - return trace.Wrap(err) - } - ctx.Debug("Waiting for continue signal") if tempUser != nil { From c172edb327aa085195fac793e944ca98dbeee312 Mon Sep 17 00:00:00 2001 From: joerger Date: Wed, 22 Jun 2022 15:46:36 -0700 Subject: [PATCH 2/2] Fix spacing. --- lib/kube/proxy/sess.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/kube/proxy/sess.go b/lib/kube/proxy/sess.go index 786c32ce70785..1f761414ea177 100644 --- a/lib/kube/proxy/sess.go +++ b/lib/kube/proxy/sess.go @@ -1066,11 +1066,11 @@ func getRolesByName(forwarder *Forwarder, roleNames []string) ([]types.Role, err // on an interval until the session tracker is closed. func (s *session) trackSession(p *party, policySet []*types.SessionTrackerPolicySet) error { trackerSpec := types.SessionTrackerSpecV1{ - SessionID: s.id.String(), - Kind: string(types.KubernetesSessionKind), - State: types.SessionState_SessionStatePending, - Hostname: s.podName, - ClusterName: s.ctx.teleportCluster.name, + SessionID: s.id.String(), + Kind: string(types.KubernetesSessionKind), + State: types.SessionState_SessionStatePending, + Hostname: s.podName, + ClusterName: s.ctx.teleportCluster.name, KubernetesCluster: s.ctx.kubeCluster, HostUser: p.Ctx.User.GetName(), HostPolicies: policySet,