Skip to content

Commit

Permalink
Fix MFA for DB Access (#8796) (#8870)
Browse files Browse the repository at this point in the history
  • Loading branch information
smallinsky authored Nov 5, 2021
1 parent cc469b5 commit d8cea6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tool/tsh/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func getDatabaseInfo(cf *CLIConf, tc *client.TeleportClient, dbName string) (*tl
return &tlsca.RouteToDatabase{
ServiceName: db.GetName(),
Protocol: db.GetProtocol(),
Username: cf.Username,
Username: cf.DatabaseUser,
Database: cf.DatabaseName,
}, nil
}
Expand Down Expand Up @@ -414,7 +414,7 @@ func isMFADatabaseAccessRequired(cf *CLIConf, tc *client.TeleportClient, databas
dbParam := proto.RouteToDatabase{
ServiceName: database.ServiceName,
Protocol: database.Protocol,
Username: cf.Username,
Username: database.Username,
Database: database.Database,
}
mfaResp, err := cluster.IsMFARequired(cf.Context, &proto.IsMFARequiredRequest{
Expand Down

0 comments on commit d8cea6d

Please sign in to comment.