Skip to content

Commit

Permalink
Improve NewHardwareKeyPromptConstructor comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gzdunek committed Nov 13, 2024
1 parent f25141b commit d4ec48a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/teleterm/daemon/hardwarekeyprompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ import (

// NewHardwareKeyPromptConstructor returns a new hardware key prompt constructor
// for this service and the given root cluster URI.
// Unlike other modals triggered by tshd events, we do not acquire the singleImportantModalSemaphore here.
// This allows these prompts to show up while a relogin modal is still opened.
//
// TODO(gzdunek): Improve multi-cluster and multi-hardware keys support.
// The code in yubikey.go doesn't really support using multiple hardware keys (like one per cluster):
// 1. We don't offer a choice which key should be used on the initial login.
Expand All @@ -42,8 +45,8 @@ import (
// It seems that the better option would be to have a prompt per physical key, not per cluster.
// But I will leave that for the future, it's hard to say how common these scenarios will be in Connect.
//
// Because of the above, we don't have any mutex here. I don't expect receiving prompts
// from different hardware keys at the same time.
// Because the code in yubikey.go assumes you use a single key, we don't have any mutex here.
// We don't expect receiving prompts from different hardware keys.
func (s *Service) NewHardwareKeyPromptConstructor(rootClusterURI uri.ResourceURI) keys.HardwareKeyPrompt {
return &hardwareKeyPrompter{s: s, rootClusterURI: rootClusterURI}
}
Expand Down

0 comments on commit d4ec48a

Please sign in to comment.