From ed88eac0c1431ba42dcbc7e17ccde02284ab7bd3 Mon Sep 17 00:00:00 2001 From: Gavin Frazar Date: Wed, 6 Nov 2024 18:04:43 -0800 Subject: [PATCH] tsh --cluster saves oracle wallet to leaf dir --- lib/client/db/oracle/oracle.go | 4 ++-- tool/tsh/common/db.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/client/db/oracle/oracle.go b/lib/client/db/oracle/oracle.go index 8b8878b35df3f..a5f570f03945f 100644 --- a/lib/client/db/oracle/oracle.go +++ b/lib/client/db/oracle/oracle.go @@ -42,8 +42,8 @@ import ( // wallet.jks - Java Wallet format used by JDBC Drivers. // sqlnet.ora - Generic Oracle Client Configuration File allowing to specify Wallet Location. // tnsnames.ora - Oracle Net Service mapped to connections descriptors. -func GenerateClientConfiguration(signer crypto.Signer, db tlsca.RouteToDatabase, profile *client.ProfileStatus) error { - walletPath := profile.OracleWalletDir(profile.Cluster, db.ServiceName) +func GenerateClientConfiguration(signer crypto.Signer, db tlsca.RouteToDatabase, profile *client.ProfileStatus, siteName string) error { + walletPath := profile.OracleWalletDir(siteName, db.ServiceName) if err := os.MkdirAll(walletPath, teleport.PrivateDirMode); err != nil { return trace.Wrap(err) } diff --git a/tool/tsh/common/db.go b/tool/tsh/common/db.go index 0dc7b8f21deb7..7f58efa15dbf9 100644 --- a/tool/tsh/common/db.go +++ b/tool/tsh/common/db.go @@ -335,7 +335,7 @@ func databaseLogin(cf *CLIConf, tc *client.TeleportClient, dbInfo *databaseInfo) if err := generateDBLocalProxyCert(keyRing.TLSPrivateKey, profile); err != nil { return trace.Wrap(err) } - err = oracle.GenerateClientConfiguration(keyRing.TLSPrivateKey, dbInfo.RouteToDatabase, profile) + err = oracle.GenerateClientConfiguration(keyRing.TLSPrivateKey, dbInfo.RouteToDatabase, profile, tc.SiteName) if err != nil { return trace.Wrap(err) }