From ba5e94f14608135b3cea57635d4434fa9eb78280 Mon Sep 17 00:00:00 2001 From: Forrest Marshall Date: Fri, 15 Jan 2021 15:20:12 -0800 Subject: [PATCH] update username on login --- tool/tsh/tsh.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tool/tsh/tsh.go b/tool/tsh/tsh.go index af459910a5f28..93fa368111935 100644 --- a/tool/tsh/tsh.go +++ b/tool/tsh/tsh.go @@ -610,6 +610,10 @@ func onLogin(cf *CLIConf) { utils.FatalError(err) } + // the login operation may update the username and should be considered the more + // "authoritative" source. + cf.Username = tc.Username + // TODO(fspmarshall): Refactor access request & cert reissue logic to allow // access requests to be applied to identity files.