diff --git a/lib/auth/apiserver.go b/lib/auth/apiserver.go index de53b64c8d3ff..69e1861931030 100644 --- a/lib/auth/apiserver.go +++ b/lib/auth/apiserver.go @@ -158,8 +158,9 @@ func NewAPIServer(config *APIConfig) (http.Handler, error) { srv.POST("/:version/tokens/register", srv.WithAuth(srv.registerUsingToken)) // Active sessions - srv.GET("/:version/namespaces/:namespace/sessions/:id/stream", srv.WithAuth(srv.getSessionChunk)) // DELETE IN 16(zmb3) - srv.GET("/:version/namespaces/:namespace/sessions/:id/events", srv.WithAuth(srv.getSessionEvents)) // DELETE IN 16(zmb3) + // TODO(zmb3): remove these endpoints when Assist no longer needs them + srv.GET("/:version/namespaces/:namespace/sessions/:id/stream", srv.WithAuth(srv.getSessionChunk)) + srv.GET("/:version/namespaces/:namespace/sessions/:id/events", srv.WithAuth(srv.getSessionEvents)) // Namespaces srv.POST("/:version/namespaces", srv.WithAuth(srv.upsertNamespace)) diff --git a/lib/auth/github.go b/lib/auth/github.go index 93ae131ea4e34..eecea47844ac2 100644 --- a/lib/auth/github.go +++ b/lib/auth/github.go @@ -271,7 +271,8 @@ func checkGithubOrgSSOSupport(ctx context.Context, conn types.GithubConnector, u } // Check each organization only once - // DELETE IN 12 (zmb3) + // TODO: this can be removed as of Teleport 12, but we should create cluster + // alerts for anyone using the old teams_to_logins field to avoid breaking anyone for _, mapping := range conn.GetTeamsToLogins() { addOrg(mapping.Organization) } diff --git a/lib/web/apiserver.go b/lib/web/apiserver.go index d89fad67a51dc..ecfa3e40a0a9f 100644 --- a/lib/web/apiserver.go +++ b/lib/web/apiserver.go @@ -766,7 +766,8 @@ func (h *Handler) bindDefaultEndpoints() { h.GET("/webapi/sites/:site/events/search/sessions", h.WithClusterAuth(h.clusterSearchSessionEvents)) // search site session events h.GET("/webapi/sites/:site/ttyplayback/:sid", h.WithClusterAuth(h.ttyPlaybackHandle)) - // DELETE in 16(zmb3): v15+ web UIs use new streaming 'ttyplayback' endpoint + // TODO(zmb3): remove these endpoints when Assist is no longer using them + // (assist calls the proxy's web API, and the proxy uses an HTTP client to call auth's API) h.GET("/webapi/sites/:site/sessions/:sid/events", h.WithClusterAuth(h.siteSessionEventsGet)) // get recorded session's timing information (from events) h.GET("/webapi/sites/:site/sessions/:sid/stream", h.siteSessionStreamGet) // get recorded session's bytes (from events) @@ -3607,8 +3608,6 @@ func queryOrder(query url.Values, name string, def types.EventOrder) (types.Even // It returns the binary stream unencoded, directly in the respose body, // with Content-Type of application/octet-stream, gzipped with up to 95% // compression ratio. -// -// DELETE IN 16(zmb3) func (h *Handler) siteSessionStreamGet(w http.ResponseWriter, r *http.Request, p httprouter.Params) { httplib.SetNoCacheHeaders(w.Header()) diff --git a/web/packages/teleport/src/Assist/service.ts b/web/packages/teleport/src/Assist/service.ts index 9897373e0d8fb..6f0a6f4ff7568 100644 --- a/web/packages/teleport/src/Assist/service.ts +++ b/web/packages/teleport/src/Assist/service.ts @@ -101,8 +101,6 @@ export async function resolveServerMessage( } } -// TODO(zmb3): check with Ryan about replacing this with streaming - export async function getSessionEvents(sessionUrl: string): Promise<{ events: SessionEvent[] | null; }> { diff --git a/web/packages/teleport/src/config.ts b/web/packages/teleport/src/config.ts index 9cefe6f235201..bf29dbb71c59c 100644 --- a/web/packages/teleport/src/config.ts +++ b/web/packages/teleport/src/config.ts @@ -211,7 +211,7 @@ const cfg = { 'wss://:fqdn/v1/webapi/sites/:clusterId/ttyplayback/:sid?access_token=:token', // TODO(zmb3): get token out of URL activeAndPendingSessionsPath: '/v1/webapi/sites/:clusterId/sessions', - // TODO(zmb3): remove this for v15 + // TODO(zmb3): remove this when Assist is no longer using it sshPlaybackPrefix: '/v1/webapi/sites/:clusterId/sessions/:sid', // prefix because this is eventually concatenated with "/stream" or "/events" kubernetesPath: '/v1/webapi/sites/:clusterId/kubernetes?searchAsRoles=:searchAsRoles?&limit=:limit?&startKey=:startKey?&query=:query?&search=:search?&sort=:sort?', @@ -638,7 +638,7 @@ const cfg = { }, getSshPlaybackPrefixUrl({ clusterId, sid }: UrlParams) { - // TODO(zmb3): remove + // TODO(zmb3): remove this when Assist is no longer using it return generatePath(cfg.api.sshPlaybackPrefix, { clusterId, sid }); },