Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v10] Remove duplicate parties in kube and ssh session trackers. #13987

Merged
merged 8 commits into from
Jul 1, 2022
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