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

[v13] Fix moderated session presence checking #28456

Merged
merged 2 commits into from Jun 29, 2023

Conversation

jakule
Copy link
Contributor

@jakule jakule commented Jun 29, 2023

Backport of #25988 and #28055

This backport will be merged into the v13.2 release. Any additional related patches will be merged separately.

* Fix moderated session presence checking

Addresses all of the issues that were preventing presence checking during
moderated sessions from working as described in
[#18092](#18092 (comment)).

Closes #18092

* make presence test clearer

* fix presence checking on the web ui

* Refactor web socket message handling

A single message processing loop handles retrieving the envelope
and passing it off to individual message handlers. This allows all
messages to be processed outside of `Read` which was dependent on
the terminal being active to process any messages.

The webauthn challenge response was also moved from a raw message
to a webauthn message. By sending it as a raw message it made
presence checking fail because the response has a `t` in it which
caused the session to be killed during moderated sessions.

* enforce mfa ceremony when joining and cluster wide mfa is enabled

* fix conflicts with master

* moderated tests

* Add moderated session tests for the UI

* Add moderated session integration test

* fix lints

* clean up presence test

* refactor envelope handling

* fix build

* fix: revert test debug timeout

* fix: use local context in tests

* simplify closing streams

* generalize waitForOutput to work with an io.Reader

* fix error handling in stream close

* unexport PresenceOptions

* Improve waitForOutput to match against output in successive reads
@jakule jakule requested a review from rosstimothy June 29, 2023 06:08
@github-actions github-actions bot added backport desktop-access size/lg tsh tsh - Teleport's command line tool for logging into nodes running Teleport. ui labels Jun 29, 2023
@jakule jakule changed the title [v13] Fix moderated session presence checking (#25988) [v13] Fix moderated session presence checking Jun 29, 2023
@jakule
Copy link
Contributor Author

jakule commented Jun 29, 2023

Added #28055 to fix test flakiness.

@jakule jakule enabled auto-merge June 29, 2023 19:53
@zmb3
Copy link
Collaborator

zmb3 commented Jun 29, 2023

/excludeflake TestModeratedSession TestModeratedSessionWithMFA

@jakule jakule added this pull request to the merge queue Jun 29, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 29, 2023
@jakule jakule added this pull request to the merge queue Jun 29, 2023
Merged via the queue into branch/v13 with commit df6c981 Jun 29, 2023
30 of 31 checks passed
@jakule jakule deleted the jakule/v13/ws-presence-check branch June 29, 2023 21:22
@r0mant r0mant mentioned this pull request Jul 14, 2023
@fheinecke fheinecke mentioned this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport desktop-access size/lg tsh tsh - Teleport's command line tool for logging into nodes running Teleport. ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants