diff --git a/integration/integration_test.go b/integration/integration_test.go index adf9028771df9..f7807c236c224 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -1123,7 +1123,7 @@ func testLeafProxySessionRecording(t *testing.T, suite *integrationTestSuite) { nodeClient, err := tc.ConnectToNode( ctx, clt, - client.NodeDetails{Addr: "leaf-zero:0", Namespace: tc.Namespace, Cluster: clt.ClusterName()}, + client.NodeDetails{Addr: "leaf-zero:0", Cluster: clt.ClusterName()}, tc.Config.HostLogin, ) assert.NoError(t, err) @@ -1487,7 +1487,7 @@ func testIPPropagation(t *testing.T, suite *integrationTestSuite) { nodeClient, err := tc.ConnectToNode( ctx, clt, - client.NodeDetails{Addr: nodeName, Namespace: tc.Namespace, Cluster: clt.ClusterName()}, + client.NodeDetails{Addr: nodeName, Cluster: clt.ClusterName()}, tc.Config.HostLogin, ) require.NoError(t, err) @@ -1656,7 +1656,7 @@ func verifySessionJoin(t *testing.T, username string, teleport *helpers.TeleInst return case <-ticker.C: - err := cl.Join(context.TODO(), types.SessionPeerMode, defaults.Namespace, session.ID(sessionID), personB) + err := cl.Join(context.TODO(), types.SessionPeerMode, session.ID(sessionID), personB) if err == nil { sessionB <- nil return @@ -5955,7 +5955,7 @@ func testWindowChange(t *testing.T, suite *integrationTestSuite) { } for i := 0; i < 10; i++ { - err = cl.Join(ctx, types.SessionPeerMode, defaults.Namespace, session.ID(sessionID), personB) + err = cl.Join(ctx, types.SessionPeerMode, session.ID(sessionID), personB) if err == nil || isSSHError(err) { err = nil break @@ -7871,9 +7871,8 @@ func testModeratedSFTP(t *testing.T, suite *integrationTestSuite) { }) nodeDetails := client.NodeDetails{ - Addr: instance.Config.SSH.Addr.Addr, - Namespace: peerClient.Namespace, - Cluster: helpers.Site, + Addr: instance.Config.SSH.Addr.Addr, + Cluster: helpers.Site, } peerNodeClient, err := peerClient.ConnectToNode( ctx, @@ -7936,7 +7935,6 @@ func testModeratedSFTP(t *testing.T, suite *integrationTestSuite) { close(emptyCh) modNodeCli := client.NodeClient{ Client: tracessh.NewClient(modSSHConn, modSSHChans, emptyCh), - Namespace: nodeDetails.Namespace, TC: modTC, Tracer: modTC.Tracer, FIPSEnabled: details.FIPS, @@ -8133,9 +8131,8 @@ func testSFTP(t *testing.T, suite *integrationTestSuite) { ctx, clusterClient, client.NodeDetails{ - Addr: teleport.Config.SSH.Addr.Addr, - Namespace: teleportClient.Namespace, - Cluster: helpers.Site, + Addr: teleport.Config.SSH.Addr.Addr, + Cluster: helpers.Site, }, suite.Me.Username, ) @@ -8338,9 +8335,8 @@ func testAgentlessConn(t *testing.T, tc, joinTC *client.TeleportClient, node *ty ctx, clt, client.NodeDetails{ - Addr: uuidAddr, - Namespace: tc.Namespace, - Cluster: tc.SiteName, + Addr: uuidAddr, + Cluster: tc.SiteName, }, tc.Username, ) @@ -8399,7 +8395,7 @@ func testAgentlessConn(t *testing.T, tc, joinTC *client.TeleportClient, node *ty }, 3*time.Second, 100*time.Millisecond) // test that attempting to join the session returns an error - err = joinTC.Join(ctx, types.SessionPeerMode, tc.Namespace, session.ID(sessTracker.GetSessionID()), nil) + err = joinTC.Join(ctx, types.SessionPeerMode, session.ID(sessTracker.GetSessionID()), nil) require.True(t, trace.IsBadParameter(err)) require.ErrorContains(t, err, "session joining is only supported for Teleport nodes, not OpenSSH nodes") @@ -9041,7 +9037,7 @@ func testModeratedSessions(t *testing.T, suite *integrationTestSuite) { cl.WebauthnLogin = customWebauthnLogin cl.Stdout = moderatorTerminal cl.Stdin = moderatorTerminal - if err := cl.Join(ctx, types.SessionModeratorMode, defaults.Namespace, session.ID(sessionID), moderatorTerminal); err != nil { + if err := cl.Join(ctx, types.SessionModeratorMode, session.ID(sessionID), moderatorTerminal); err != nil { cancel(trace.Wrap(err, "moderator session failed")) } } diff --git a/lib/benchmark/db/db.go b/lib/benchmark/db/db.go index d261ea4b9d908..43419142ac1ae 100644 --- a/lib/benchmark/db/db.go +++ b/lib/benchmark/db/db.go @@ -27,6 +27,7 @@ import ( "github.com/gravitational/trace" "github.com/gravitational/teleport/api/client/proto" + "github.com/gravitational/teleport/api/defaults" "github.com/gravitational/teleport/api/types" "github.com/gravitational/teleport/lib/client" "github.com/gravitational/teleport/lib/srv/alpnproxy" @@ -61,7 +62,7 @@ func retrieveDatabaseCertificates(ctx context.Context, tc *client.TeleportClient // getDatabase loads the database which the name matches. func getDatabase(ctx context.Context, tc *client.TeleportClient, serviceName string, protocol string) (types.Database, error) { databases, err := tc.ListDatabases(ctx, &proto.ListResourcesRequest{ - Namespace: tc.Namespace, + Namespace: defaults.Namespace, ResourceType: types.KindDatabaseServer, PredicateExpression: fmt.Sprintf(`name == "%s" && resource.spec.protocol == "%s"`, serviceName, protocol), }) diff --git a/lib/client/api.go b/lib/client/api.go index 8b4c317265573..23b04790cdc70 100644 --- a/lib/client/api.go +++ b/lib/client/api.go @@ -209,9 +209,6 @@ type Config struct { // Labels represent host Labels Labels map[string]string - // Namespace is nodes namespace - Namespace string - // HostLogin is a user login on a remote host HostLogin string @@ -1192,7 +1189,7 @@ func (c *Config) ProxySpecified() bool { func (c *Config) ResourceFilter(kind string) *proto.ListResourcesRequest { return &proto.ListResourcesRequest{ ResourceType: kind, - Namespace: c.Namespace, + Namespace: apidefaults.Namespace, Labels: c.Labels, SearchKeywords: c.SearchKeywords, PredicateExpression: c.PredicateExpression, @@ -1261,8 +1258,6 @@ func NewClient(c *Config) (tc *TeleportClient, err error) { log.InfoContext(context.Background(), "no host login given, using default", "default_host_login", c.HostLogin) } - c.Namespace = types.ProcessNamespace(c.Namespace) - if c.Tracer == nil { c.Tracer = tracing.NoopProvider().Tracer(teleport.ComponentTeleport) } @@ -2166,7 +2161,7 @@ func (tc *TeleportClient) runShellOrCommandOnSingleNode(ctx context.Context, clt nodeClient, err := tc.ConnectToNode( ctx, clt, - NodeDetails{Addr: nodeAddr, Namespace: tc.Namespace, Cluster: cluster}, + NodeDetails{Addr: nodeAddr, Cluster: cluster}, tc.Config.HostLogin, ) if err != nil { @@ -2284,7 +2279,7 @@ func (tc *TeleportClient) startPortForwarding(ctx context.Context, nodeClient *N } // Join connects to the existing/active SSH session -func (tc *TeleportClient) Join(ctx context.Context, mode types.SessionParticipantMode, namespace string, sessionID session.ID, input io.Reader) (err error) { +func (tc *TeleportClient) Join(ctx context.Context, mode types.SessionParticipantMode, sessionID session.ID, input io.Reader) (err error) { ctx, span := tc.Tracer.Start( ctx, "teleportClient/Join", @@ -2296,9 +2291,6 @@ func (tc *TeleportClient) Join(ctx context.Context, mode types.SessionParticipan ) defer span.End() - if namespace == "" { - return trace.BadParameter(authclient.MissingNamespaceError) - } tc.Stdin = input if sessionID.Check() != nil { return trace.Errorf("Invalid session ID format: %s", string(sessionID)) @@ -2347,7 +2339,7 @@ func (tc *TeleportClient) Join(ctx context.Context, mode types.SessionParticipan // connect to server: nc, err := tc.ConnectToNode(ctx, clt, - NodeDetails{Addr: session.GetAddress() + ":0", Namespace: tc.Namespace, Cluster: clt.ClusterName()}, + NodeDetails{Addr: session.GetAddress() + ":0", Cluster: clt.ClusterName()}, tc.Config.HostLogin, ) if err != nil { @@ -2607,9 +2599,8 @@ func (tc *TeleportClient) TransferFiles(ctx context.Context, clt *ClusterClient, ctx, clt, NodeDetails{ - Addr: nodeAddr, - Namespace: tc.Namespace, - Cluster: clt.ClusterName(), + Addr: nodeAddr, + Cluster: clt.ClusterName(), }, hostLogin, ) @@ -2946,11 +2937,10 @@ func (tc *TeleportClient) runCommandOnNodes(ctx context.Context, clt *ClusterCli ctx, clt, NodeDetails{ - Addr: node.Addr, - Namespace: tc.Namespace, - Cluster: cluster, - MFACheck: mfaRequiredCheck, - hostname: node.Hostname, + Addr: node.Addr, + Cluster: cluster, + MFACheck: mfaRequiredCheck, + hostname: node.Hostname, }, tc.Config.HostLogin, ) diff --git a/lib/client/client.go b/lib/client/client.go index ffa41d5fcbc5f..6d6d08f09f559 100644 --- a/lib/client/client.go +++ b/lib/client/client.go @@ -61,7 +61,6 @@ import ( // NodeClient implements ssh client to a ssh node (teleport or any regular ssh node) // NodeClient can run shell and commands or upload and download files. type NodeClient struct { - Namespace string Tracer oteltrace.Tracer Client *tracessh.Client TC *TeleportClient @@ -257,8 +256,6 @@ func nodeName(node TargetNode) string { type NodeDetails struct { // Addr is an address to dial Addr string - // Namespace is the node namespace - Namespace string // Cluster is the name of the target cluster Cluster string @@ -282,10 +279,7 @@ func (n NodeDetails) String() string { // ProxyFormat returns the address in the format // used by the proxy subsystem func (n *NodeDetails) ProxyFormat() string { - parts := []string{n.Addr} - if n.Namespace != "" { - parts = append(parts, n.Namespace) - } + parts := []string{n.Addr, apidefaults.Namespace} if n.Cluster != "" { parts = append(parts, n.Cluster) } @@ -351,7 +345,6 @@ func NewNodeClient(ctx context.Context, sshConfig *ssh.ClientConfig, conn net.Co nc := &NodeClient{ Client: tracessh.NewClient(sshconn, chans, emptyCh), - Namespace: apidefaults.Namespace, TC: tc, Tracer: tc.Tracer, FIPSEnabled: fipsEnabled, diff --git a/lib/client/client_test.go b/lib/client/client_test.go index 4aaa1f516d27f..ffda5a6d2ee6a 100644 --- a/lib/client/client_test.go +++ b/lib/client/client_test.go @@ -47,8 +47,7 @@ func TestHelperFunctions(t *testing.T) { func TestNewSession(t *testing.T) { nc := &NodeClient{ - Namespace: "blue", - Tracer: tracing.NoopProvider().Tracer("test"), + Tracer: tracing.NoopProvider().Tracer("test"), } ctx := context.Background() @@ -57,7 +56,6 @@ func TestNewSession(t *testing.T) { require.NoError(t, err) require.NotNil(t, ses) require.Equal(t, nc, ses.NodeClient()) - require.Equal(t, nc.Namespace, ses.namespace) require.NotNil(t, ses.env) require.Equal(t, os.Stderr, ses.terminal.Stderr()) require.Equal(t, os.Stdout, ses.terminal.Stdout()) diff --git a/lib/client/session.go b/lib/client/session.go index 2ee4aad8227b5..b35921cbd575c 100644 --- a/lib/client/session.go +++ b/lib/client/session.go @@ -56,9 +56,6 @@ const ( ) type NodeSession struct { - // namespace is a session this namespace belongs to - namespace string - // id is the Teleport session ID id session.ID @@ -129,7 +126,6 @@ func newSession(ctx context.Context, ns := &NodeSession{ env: env, nodeClient: client, - namespace: client.Namespace, closer: utils.NewCloseBroadcaster(), closeWait: &sync.WaitGroup{}, enableEscapeSequences: enableEscapeSequences, @@ -146,7 +142,6 @@ func newSession(ctx context.Context, } ns.id = session.ID(sessionID) - ns.namespace = joinSession.GetMetadata().Namespace if ns.terminal.IsAttached() { err = ns.terminal.Resize(int16(terminalSize.Width), int16(terminalSize.Height)) diff --git a/lib/web/files.go b/lib/web/files.go index 1c48dbf4f745e..048236d320449 100644 --- a/lib/web/files.go +++ b/lib/web/files.go @@ -30,7 +30,6 @@ import ( "github.com/gravitational/teleport/api/client/proto" "github.com/gravitational/teleport/api/defaults" - "github.com/gravitational/teleport/api/types" "github.com/gravitational/teleport/api/utils/keys" "github.com/gravitational/teleport/api/utils/sshutils" "github.com/gravitational/teleport/lib/auth/authclient" @@ -46,8 +45,6 @@ type fileTransferRequest struct { serverID string // Login is Linux username to connect as. login string - // Namespace is node namespace. - namespace string // Cluster is the name of the remote cluster to connect to. cluster string // remoteLocation is file remote location @@ -71,7 +68,6 @@ func (h *Handler) transferFile(w http.ResponseWriter, r *http.Request, p httprou serverID: p.ByName("server"), remoteLocation: query.Get("location"), filename: query.Get("filename"), - namespace: defaults.Namespace, mfaResponse: query.Get("mfaResponse"), fileTransferRequestID: query.Get("fileTransferRequestId"), moderatedSessionID: query.Get("moderatedSessionId"), @@ -186,15 +182,11 @@ type fileTransfer struct { } func (f *fileTransfer) createClient(req fileTransferRequest, httpReq *http.Request, proxySigner multiplexer.PROXYHeaderSigner) (*client.TeleportClient, error) { - if !types.IsValidNamespace(req.namespace) { - return nil, trace.BadParameter("invalid namespace %q", req.namespace) - } - if req.login == "" { return nil, trace.BadParameter("missing login") } - servers, err := f.authClient.GetNodes(httpReq.Context(), req.namespace) + servers, err := f.authClient.GetNodes(httpReq.Context(), defaults.Namespace) if err != nil { return nil, trace.Wrap(err) } @@ -211,7 +203,6 @@ func (f *fileTransfer) createClient(req fileTransferRequest, httpReq *http.Reque cfg.HostLogin = req.login cfg.SiteName = req.cluster - cfg.Namespace = req.namespace if err := cfg.ParseProxyHost(f.proxyHostPort); err != nil { return nil, trace.BadParameter("failed to parse proxy address: %v", err) } diff --git a/lib/web/terminal.go b/lib/web/terminal.go index 9b3a109714eed..abe762fa46135 100644 --- a/lib/web/terminal.go +++ b/lib/web/terminal.go @@ -44,7 +44,6 @@ import ( "github.com/gravitational/teleport" authproto "github.com/gravitational/teleport/api/client/proto" - apidefaults "github.com/gravitational/teleport/api/defaults" "github.com/gravitational/teleport/api/mfa" "github.com/gravitational/teleport/api/observability/tracing" tracessh "github.com/gravitational/teleport/api/observability/tracing/ssh" @@ -507,7 +506,6 @@ func (t *TerminalHandler) makeClient(ctx context.Context, stream *terminal.Strea clientConfig.HostLogin = t.sessionData.Login clientConfig.ForwardAgent = client.ForwardAgentLocal - clientConfig.Namespace = apidefaults.Namespace clientConfig.Stdout = stream clientConfig.Stderr = stderrWriter{stream: stream} clientConfig.Stdin = stream diff --git a/tool/tsh/common/db.go b/tool/tsh/common/db.go index bc888ba9c98c0..f15b263f0cc25 100644 --- a/tool/tsh/common/db.go +++ b/tool/tsh/common/db.go @@ -42,6 +42,7 @@ import ( "github.com/gravitational/teleport" apiclient "github.com/gravitational/teleport/api/client" "github.com/gravitational/teleport/api/client/proto" + apidefaults "github.com/gravitational/teleport/api/defaults" "github.com/gravitational/teleport/api/types" apiutils "github.com/gravitational/teleport/api/utils" "github.com/gravitational/teleport/api/utils/keys" @@ -1131,7 +1132,7 @@ func getDatabaseServers(ctx context.Context, tc *client.TeleportClient, name str logger.DebugContext(ctx, "Listing databases with predicate and labels", "predicate", predicate, "labels", tc.Labels) databases, err = tc.ListDatabaseServersWithFilters(ctx, &proto.ListResourcesRequest{ - Namespace: tc.Namespace, + Namespace: apidefaults.Namespace, ResourceType: types.KindDatabaseServer, PredicateExpression: predicate, Labels: tc.Labels, @@ -1193,7 +1194,7 @@ func listDatabasesWithPredicate(ctx context.Context, tc *client.TeleportClient, predicate := makePredicateConjunction(predicate, tc.PredicateExpression) logger.DebugContext(ctx, "Listing databases with predicate and labels", "predicate", predicate, "labels", tc.Labels) databases, err = tc.ListDatabases(ctx, &proto.ListResourcesRequest{ - Namespace: tc.Namespace, + Namespace: apidefaults.Namespace, ResourceType: types.KindDatabaseServer, PredicateExpression: predicate, Labels: tc.Labels, diff --git a/tool/tsh/common/kube.go b/tool/tsh/common/kube.go index f14ef5b420b23..bbf89d94808a1 100644 --- a/tool/tsh/common/kube.go +++ b/tool/tsh/common/kube.go @@ -1170,8 +1170,9 @@ func newKubeLoginCommand(parent *kingpin.CmdClause) *kubeLoginCommand { c.Flag("query", queryHelp).StringVar(&c.predicateExpression) c.Flag("as", "Configure custom Kubernetes user impersonation.").StringVar(&c.impersonateUser) c.Flag("as-groups", "Configure custom Kubernetes group impersonation.").StringsVar(&c.impersonateGroups) - // TODO (tigrato): move this back to namespace once teleport drops the namespace flag. - c.Flag("kube-namespace", "Configure the default Kubernetes namespace.").Short('n').StringVar(&c.namespace) + // kube-namespace exists for backwards compatibility. + c.Flag("kube-namespace", "Configure the default Kubernetes namespace.").Hidden().StringVar(&c.namespace) + c.Flag("namespace", "Configure the default Kubernetes namespace.").Short('n').StringVar(&c.namespace) c.Flag("all", "Generate a kubeconfig with every cluster the user has access to. Mutually exclusive with --labels or --query.").BoolVar(&c.all) c.Flag("set-context-name", "Define a custom context name. To use it with --all include \"{{.KubeName}}\""). // Use the default context name template if --set-context-name is not set. diff --git a/tool/tsh/common/kube_proxy.go b/tool/tsh/common/kube_proxy.go index 5e627a6303dbf..a10bef2d87c12 100644 --- a/tool/tsh/common/kube_proxy.go +++ b/tool/tsh/common/kube_proxy.go @@ -74,8 +74,9 @@ func newProxyKubeCommand(parent *kingpin.CmdClause) *proxyKubeCommand { c.Arg("kube-cluster", "Name of the Kubernetes cluster to proxy. Check 'tsh kube ls' for a list of available clusters. If not specified, all clusters previously logged in through `tsh kube login` will be used.").StringsVar(&c.kubeClusters) c.Flag("as", "Configure custom Kubernetes user impersonation.").StringVar(&c.impersonateUser) c.Flag("as-groups", "Configure custom Kubernetes group impersonation.").StringsVar(&c.impersonateGroups) - // TODO (tigrato): move this back to namespace once teleport drops the namespace flag. - c.Flag("kube-namespace", "Configure the default Kubernetes namespace.").Short('n').StringVar(&c.namespace) + // kube-namespace exists for backwards compatibility. + c.Flag("kube-namespace", "Configure the default Kubernetes namespace.").Hidden().StringVar(&c.namespace) + c.Flag("namespace", "Configure the default Kubernetes namespace.").Short('n').StringVar(&c.namespace) c.Flag("port", "Specifies the source port used by the proxy listener").Short('p').StringVar(&c.port) c.Flag("format", envVarFormatFlagDescription()).Short('f').Default(envVarDefaultFormat()).EnumVar(&c.format, envVarFormats...) c.Flag("labels", labelHelp).StringVar(&c.labels) diff --git a/tool/tsh/common/tsh.go b/tool/tsh/common/tsh.go index f9d4a038a9ae6..3339a74ab5509 100644 --- a/tool/tsh/common/tsh.go +++ b/tool/tsh/common/tsh.go @@ -260,8 +260,6 @@ type CLIConf struct { ShowVersion bool // Quiet mode, -q command (disables progress printing) Quiet bool - // Namespace is used to select cluster namespace - Namespace string // NoCache is used to turn off client cache for nodes discovery NoCache bool // BenchDuration is a duration for the benchmark @@ -774,7 +772,6 @@ func Run(ctx context.Context, args []string, opts ...CliOption) error { } app.Flag("auth", "Specify the name of authentication connector to use.").Envar(authEnvVar).StringVar(&cf.AuthConnector) - app.Flag("namespace", "Namespace of the cluster").Default(apidefaults.Namespace).Hidden().StringVar(&cf.Namespace) app.Flag("skip-version-check", "Skip version checking between server and client.").BoolVar(&cf.SkipVersionCheck) // we don't want to add `.Envar(debugEnvVar)` here: // - we already process TELEPORT_DEBUG with initLogger(), so we don't need to do it second time @@ -1135,7 +1132,9 @@ func Run(ctx context.Context, args []string, opts ...CliOption) error { var benchKubeOpts benchKubeOptions benchKube := bench.Command("kube", "Run Kube benchmark tests").Hidden() - benchKube.Flag("kube-namespace", "Selects the ").Default("default").StringVar(&benchKubeOpts.namespace) + // kube-namespace exists for backwards compatibility. + benchKube.Flag("kube-namespace", "Selects the ").Default("default").Hidden().StringVar(&benchKubeOpts.namespace) + benchKube.Flag("namespace", "Selects the ").Default("default").StringVar(&benchKubeOpts.namespace) benchListKube := benchKube.Command("ls", "Run a benchmark test to list Pods").Hidden() benchListKube.Arg("kube_cluster", "Kubernetes cluster to use").Required().StringVar(&cf.KubernetesCluster) benchExecKube := benchKube.Command("exec", "Run a benchmark test to exec into the specified Pod").Hidden() @@ -1214,7 +1213,9 @@ func Run(ctx context.Context, args []string, opts ...CliOption) error { reqSearch.Flag("query", queryHelp).StringVar(&cf.PredicateExpression) reqSearch.Flag("labels", labelHelp).StringVar(&cf.Labels) reqSearch.Flag("kube-cluster", "Kubernetes Cluster to search for Pods").StringVar(&cf.KubernetesCluster) - reqSearch.Flag("kube-namespace", "Kubernetes Namespace to search for Pods").Default(corev1.NamespaceDefault).StringVar(&cf.kubeNamespace) + // kube-namespace exists for backwards compatibility. + reqSearch.Flag("kube-namespace", "Kubernetes Namespace to search for Pods").Hidden().Default(corev1.NamespaceDefault).StringVar(&cf.kubeNamespace) + reqSearch.Flag("namespace", "Kubernetes Namespace to search for Pods").Default(corev1.NamespaceDefault).StringVar(&cf.kubeNamespace) reqSearch.Flag("all-kube-namespaces", "Search Pods in every namespace").BoolVar(&cf.kubeAllNamespaces) reqSearch.Flag("verbose", "Verbose table output, shows full label output").Short('v').BoolVar(&cf.Verbose) @@ -3781,7 +3782,7 @@ func onSSHLatency(cf *CLIConf) error { nodeClient, err := tc.ConnectToNode( cf.Context, clt, - client.NodeDetails{Addr: target.Addr, Namespace: tc.Namespace, Cluster: tc.SiteName}, + client.NodeDetails{Addr: target.Addr, Cluster: tc.SiteName}, tc.Config.HostLogin, ) if err != nil { @@ -4081,7 +4082,7 @@ func onJoin(cf *CLIConf) error { return trace.BadParameter("'%v' is not a valid session ID (must be GUID)", cf.SessionID) } err = client.RetryWithRelogin(cf.Context, tc, func() error { - return tc.Join(cf.Context, types.SessionParticipantMode(cf.JoinMode), cf.Namespace, *sid, nil) + return tc.Join(cf.Context, types.SessionParticipantMode(cf.JoinMode), *sid, nil) }) if err != nil { return trace.Wrap(err) @@ -4393,10 +4394,6 @@ func loadClientConfigFromCLIConf(cf *CLIConf, proxy string) (*client.Config, err fmt.Printf("WARNING: Failed to load tsh profile for %q: %v\n", proxy, profileErr) } - // 3: override with the CLI flags - if cf.Namespace != "" { - c.Namespace = cf.Namespace - } if cf.Username != "" { c.Username = cf.Username }