Skip to content

Use Daemon.ResolveClusterURI instead of Storage.ResolveCluster to set a cluster in the cache#39732

Merged
gzdunek merged 3 commits intomasterfrom
gzdunek/fix-mfa-prompt
Mar 22, 2024
Merged

Use Daemon.ResolveClusterURI instead of Storage.ResolveCluster to set a cluster in the cache#39732
gzdunek merged 3 commits intomasterfrom
gzdunek/fix-mfa-prompt

Conversation

@gzdunek
Copy link
Copy Markdown
Contributor

@gzdunek gzdunek commented Mar 22, 2024

To resolve a cluster in the cache we should use Daemon.ResolveClusterURI instead of Storage.ResolveCluster. Otherwise, the MFA prompt won't work, as we override the default constructor only in Daemon.ResolveClusterURI.

@ravicious in DMs we discussed providing ClientCache as a field in Config to allow overwriting in it tests. I decided to it a bit different, by providing a function that creates a cache struct.
The reason for that is to force the NoCache implementation (that we use in tests) to use Daemon.ResolveClusterURI.
Otherwise, the two cache implementations would use different resolvers, which could result in new undetected errors in the future.

Changelog: Fixed a regression causing MFA prompts to not show up in Teleport Connect

This test fails on master but not on this branch. It's largely based
on existing MFA tests that we have in integration/proxy/teleterm_test.go.
Copy link
Copy Markdown
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like how it all turned out, but at the moment it's the best we can do.

@gzdunek gzdunek added this pull request to the merge queue Mar 22, 2024
Merged via the queue into master with commit 6b79173 Mar 22, 2024
@gzdunek gzdunek deleted the gzdunek/fix-mfa-prompt branch March 22, 2024 17:34
@public-teleport-github-review-bot
Copy link
Copy Markdown

@gzdunek See the table below for backport results.

Branch Result
branch/v15 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants