Skip to content

Allow /@TNS connections using Oracle Wallet (Secure External Password Store) - #230

Merged
jgebal merged 6 commits into
developfrom
feature/add_support_for_wallet
Sep 27, 2026
Merged

jgebal merged 6 commits into
developfrom
feature/add_support_for_wallet

Conversation

@jgebal

@jgebal jgebal commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Closes #225. Partly addresses #172: the password no longer has to appear on the command line.

Summary

utplsql now accepts a connect string with no user or password. The JDBC driver then reads the credentials from an Oracle Wallet, the same way sqlplus /@MYDB and SQLcl do:

utplsql run /@MYDATABASE
utplsql run "/@MYDATABASE?TNS_ADMIN=/path/to/network/admin"

Details

  • TNS_ADMIN handling (DataSourceProvider)
    • The JDBC driver resolves tnsnames.ora and ojdbc.properties (where the wallet location goes) from the TNS_ADMIN environment variable on its own.
    • The CLI now sets oracle.net.tns_admin to ORACLE_HOME/network/admin only when neither -Doracle.net.tns_admin nor TNS_ADMIN is set. Previously it set the property whenever ORACLE_HOME was set, and because the property takes precedence in the driver, that silently overrode TNS_ADMIN.
    • An explicit -Doracle.net.tns_admin still overrides everything.

Behaviour change

If both TNS_ADMIN and ORACLE_HOME are set and point to different directories, TNS_ADMIN now wins, because the CLI no longer overrides it with the ORACLE_HOME path. This matches how Oracle client tools resolve it. Connect strings that worked before are parsed the same way.

Jacek Gębal added 6 commits September 27, 2026 14:15
…d automatically by jdbc driver. So `cli` will only use the ORACLE_HOME resolution when TNS_ADMIN is not defined.

Removed `oraclepki` as pom dependency. It is now delivered together with jdbc as part of java-api 3.2.5.
@jgebal
jgebal merged commit 8c83e6a into develop Sep 27, 2026
8 checks passed
@jgebal
jgebal deleted the feature/add_support_for_wallet branch September 27, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant