Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
swap to better detection
x0322053d8941eda6d0
diff --git a/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts b/backend/src/services/app-connection/shared/sql/sql-connection-fns.tsindex d97ea45568..0c852bdcd5 100644--- a/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts+++ b/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts@@ -81,28 +81,21 @@ const getConnectionConfig = ({}};-const ORACLE_WALLET_REGEX = /^[a-z0-9]+_[a-z]+$/i;--const isOracleWalletConnection = (app: AppConnection, database: string): boolean => {- return app === AppConnection.OracleDB && ORACLE_WALLET_REGEX.test(database);+// if TNS_ADMIN is set and the directory exists, we assume it's a wallet connection for OracleDB+const isOracleWalletConnection = (app: AppConnection): boolean => {+ return app === AppConnection.OracleDB && !!process.env.TNS_ADMIN && fs.existsSync(process.env.TNS_ADMIN);};const getOracleWalletKnexClient = (credentials: Pick<TSqlConnection["credentials"], "username" | "password" | "database">): Knex => {- if (!process.env.TNS_ADMIN || !fs.existsSync(process.env.TNS_ADMIN)) {- throw new BadRequestError({- message:- "Oracle wallet is not configured correctly. See documentation for instructions: https://infisical.com/docs/integrations/app-connections/oracledb#mtls-wallet"- });- }if (oracledb.thin) {try {oracledb.initOracleClient();} catch (err) {const errorMessage = err instanceof Error ? err.message : String(err);throw new BadRequestError({- message: `Failed to initialize Oracle client: ${errorMessage}. See documentation for instructions: https://infisical.com/docs/integrations/app-connections/oracledb#mtls-wallet`+ message: `Failed to initialize Oracle client: ${errorMessage}. See documentation for instructions: https://infisical.com/docs/integrations/app-connections/oracledb#mutual-tls-wallet`});}}@@ -122,7 +115,7 @@ export const getSqlConnectionClient = async (appConnection: Pick<TSqlConnection,credentials: { host: baseHost, database, port, password, username }} = appConnection;- if (isOracleWalletConnection(app, database)) {+ if (isOracleWalletConnection(app)) {return getOracleWalletKnexClient({ username, password, database });}@@ -162,7 +155,7 @@ export const executeWithPotentialGateway = async <T>(const createClient = (proxyPort: number): Knex => {const { database, username, password } = credentials;- if (isOracleWalletConnection(app, database)) {+ if (isOracleWalletConnection(app)) {return getOracleWalletKnexClient({ username, password, database });}diff --git a/docs/integrations/app-connections/oracledb.mdx b/docs/integrations/app-connections/oracledb.mdxindex d570af91d9..6e850d37d2 100644--- a/docs/integrations/app-connections/oracledb.mdx+++ b/docs/integrations/app-connections/oracledb.mdx@@ -45,7 +45,7 @@ Infisical supports connecting to OracleDB using a database user.</Step><Step title="Get Connection Details"><Tabs>- <Tab title="Without mTLS">+ <Tab title="One-way TLS">You'll need the following information to create your Oracle Database connection:- `host` - The hostname or IP address of your Oracle Database server- `port` - The port number your Oracle Database server is listening on (default: 1521)@@ -58,7 +58,7 @@ Infisical supports connecting to OracleDB using a database user.If you are self-hosting Infisical and intend to connect to an internal/private IP address, be sure to set the `ALLOW_INTERNAL_IP_CONNECTIONS` environment variable to `true`.</Note></Tab>- <Tab title="mTLS (Wallet)">+ <Tab title="Mutual TLS (Wallet)"><Info>This configuration can only be done on self-hosted or dedicated instances of Infisical.</Info>