Skip to content

Commit

Permalink
Remove duplicate parties in kube and ssh session trackers. (#13753)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joerger authored Jun 29, 2022
1 parent 207332d commit fad3943
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
15 changes: 5 additions & 10 deletions lib/kube/proxy/sess.go
Original file line number Diff line number Diff line change
Expand Up @@ -1066,16 +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,
Participants: []types.Participant{{
ID: p.ID.String(),
User: p.Ctx.User.GetName(),
LastActive: time.Now().UTC(),
}},
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,
Expand Down
4 changes: 0 additions & 4 deletions lib/srv/sess.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fad3943

Please sign in to comment.