Merged
Conversation
9873b1c to
2c50e61
Compare
rosstimothy
approved these changes
Nov 18, 2025
vapopov
approved these changes
Nov 21, 2025
marcoandredinis
approved these changes
Nov 21, 2025
…th synchronous `envs@goteleport.com` requests (#59206)
* Generalize PrepareToReceiveSessionID. * Initialize session ID in the connection context and update it from node current-session-id request. * Add session-id-query-v2@goteleport.com request and ensure new session ID is correctly set in proxy recording mode during the channel request. * Replace PrepareToReceiveSessionID with simpler in-place logic. * Don't emit session events or tracker when proxy forwarding to a Teleport Node. * Fix missing session tracker for outdated Teleport Node. * Remove extra major version grace period. * Update integration test. * Cleanup current session ID handling and fix failing tests. * Fix tests. * Address comments. * Restructure currentSessionID handling. * Set newSessionID in test server context. * Fix integration test. * Fix AuditOn integration test. * Address comment on channel close. * Track session on forwarding node. * Fix web shutdown. * Fix nil pointer dereference in test. * Fix test flake. * Fix nil pointer in test. * Fix test flake. * Update lib/srv/ctx.go Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com> * Forwarding Node accepts client connection after receiving preparing session ID from node. This way, the forwarder can reject client connections if there is an issue preparing the session ID (impossible join sessions). * Remove check for session.data event which may not be emitted in time for the test. * Address comments. --------- Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2c50e61 to
8ca4420
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog: Fix a bug in Proxy recording mode where Teleport Node sessions would result in duplicate audit events with a different session ID.
Backport #58707, #59610, #59206, #59850 to branch/v18
I decided to backport these together so that I can manually test them all together, since many of the changes overlap and build upon each other.
Manual Tests
Last run: 2c50e61
teleport statusto get the session ID. it should appear in the session list (e.g.tsh session ls).start,end,data, andleaveevents are emitted with the same session ID.forwarded_byandrecording_mode: proxyfields.addr.local,server_id,server_addr)teleport statusto get the session ID. it should appear in the session list (e.g.tsh session ls).start,end,data, andleaveevents are emitted with the same session ID.forwarded_byandrecording_mode: proxyfields.addr.local,server_id,server_addr)teleport statusto get the session ID. it should appear in the session list (e.g.tsh session ls).start,end,data, andleaveevents are emitted with the same session ID.forwarded_byandrecording_mode: proxyfields.addr.local,server_id,server_addr)teleport statusto get the session ID. it should appear in the session list (e.g.tsh session ls).start,end,data, andleaveevents are emitted with the same session ID.forwarded_byandrecording_mode: proxyfields.addr.local,server_id,server_addr)teleport statusto get the session ID. it should appear in the session list (e.g.tsh session ls).start,end,data, andleaveevents are emitted with the same session ID.forwarded_byandrecording_mode: proxyfields.addr.local,server_id,server_addr)teleport statusto get the session ID. it should appear in the session list (e.g.tsh session ls).start,end,data, andleaveevents are emitted with the same session ID.forwarded_byandrecording_mode: proxyfields.addr.local,server_id,server_addr)Backwards compatibility:
Teleport Cloud smoke tests: