Use Daemon.ResolveClusterURI instead of Storage.ResolveCluster to set a cluster in the cache#39732
Merged
Use Daemon.ResolveClusterURI instead of Storage.ResolveCluster to set a cluster in the cache#39732
Daemon.ResolveClusterURI instead of Storage.ResolveCluster to set a cluster in the cache#39732Conversation
… set a cluster in the cache
avatus
approved these changes
Mar 22, 2024
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.
ravicious
approved these changes
Mar 22, 2024
Member
ravicious
left a comment
There was a problem hiding this comment.
I really don't like how it all turned out, but at the moment it's the best we can do.
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.
To resolve a cluster in the cache we should use
Daemon.ResolveClusterURIinstead ofStorage.ResolveCluster. Otherwise, the MFA prompt won't work, as we override the default constructor only inDaemon.ResolveClusterURI.@ravicious in DMs we discussed providing
ClientCacheas a field inConfigto 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
NoCacheimplementation (that we use in tests) to useDaemon.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