Forum Stats

  • 3,728,079 Users
  • 2,245,538 Discussions
  • 7,853,304 Comments

Discussions

Wallet location set in VSCode settings is ignored

User_ZZQ0F
User_ZZQ0F Member Posts: 25 Green Ribbon

Wallet location is taken from file: .\client\NETWORK\ADMIN\sqlnet.ora insead of location provided in VSCode settings.

Answers

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,852 Employee

    Is this in a running script where you issued a CONNECT command in the script itself?

    Or are you simply associating a file with a connection shown in Oracle Explorer?

    Finally, can you go to the connection dialog and verify that you checked "Use Wallet File" and verify that the Wallet File Location in the connection dialog is correct?

  • User_ZZQ0F
    User_ZZQ0F Member Posts: 25 Green Ribbon

    I am not using created connections, but I am using CONNECT command directly in scripts.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,852 Employee

    Hi, 

    We just released version 19.3.4 which should fix this issue. Could you please try it out and let me know?

  • User_ZZQ0F
    User_ZZQ0F Member Posts: 25 Green Ribbon

    looks like it is still taking path from: .\client\NETWORK\ADMIN\sqlnet.ora

    instead of setting parameter: changing oracledevtools.connectionConfiguration.walletFileFolder

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,852 Employee

    Can you please provide some more details of what exactly you are doing?

    For example:

    1) what is your connect statement?

    2) Why did you mention sqlnet.ora? Is there a path in the sqlnet.ora itself that is being ignored? If so please provide your sqlnet.ora as well.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,852 Employee

    In addition to my last two questions can you please also let me know:


    3) Please send your settings for "Config Files Folder" and "Wallet File Folder"

    4) In your "Config Files Folder" , do you have a tnsnames.ora and a sqlnet.ora ?

    5) If you have a sqlnet.ora, is WALLET_LOCATION set in sqlnet.ora ?

    6) The connect command you are issuing in your script (without the password)

  • User_ZZQ0F
    User_ZZQ0F Member Posts: 25 Green Ribbon

    I believe that oracledevtools.connectionConfiguration.walletFileFolder is to tell the extension location of the wallet. That means that based on provided path the extension should access the wallet and take passwords while wallet connection is created in VSCode ora while using directly CONNECT /@MY_DB. Please correct me if I am wrong.

    My sqlnet.ora file:

    Setting in VSCode:


    Extension takes "C:\\Dane\\config\\wallet" from sqlnet.ora instead of "C:\\Dane\\config\\second_wallet" provided in extension.

    I believe its a bug. If not the parameter oracledevtools.connectionConfiguration.walletFileFolder is useless and should be deleted.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,852 Employee

    Hi,

    Please see my post in your other thread. I think they are possibly the same issue.

    If you are connecting using:

    CONNECT /@MY_DB

    And your SQLNET.ORA contains:

    SQLNET.AUTHENTICATION_SERVICES =(NTS)

    If so, this means you are on Windows and are using OS Authentication. The password is NOT coming from the wallet. It is coming from the Windows OS. The wallet is not involved. Generally the wallet is used to secure the network connection, not for authentication of a user id (not always - there is something called "global userid" but I don't think that is the case here).

    So the question becomes, did you ever get this working in the past? It may be an OS Authentication issue. If you aren't on Windows, maybe you got this SQLNET.ORA from a Windows system and it is not valid here. If so please let me know what platform you are on, and if any other tools are able to connect on that system and how they are configured.

  • User_ZZQ0F
    User_ZZQ0F Member Posts: 25 Green Ribbon

    Thanks for your answer in my second thread.

    My answers:

    My questions:

    • If I understand correctly the oracle wallet (Secure External Password Store) works kinda like password-less ssh connection, right?
    • Could you please tell me what is the following setting parameter for?:

    changing oracledevtools.connectionConfiguration.walletFileFolder

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,852 Employee
    edited March 25

    Thanks for the detailed response! I am following up with the engineering team.

    One more question: If you put the wallet in a different location can you get this to work with the vs code extension?

    To (try to ) answer your question:

    1) In most cases the wallet secures the connection and then users provide a database user/pass on top of that. So the dialog takes user/pass, tns location, and wallet location. But in your case you are using Secure External Password Store which seems to use the wallet to also store the password. (This is not my area of expertise so I am following up)

    2) oracledevtools.connectionConfiguration.walletFileFolder is just the default folder that any connection that uses a wallet is supposed to get it from. If you specify a wallet and it is not coming from that location, but instead is coming from somewhere else, I believe that is a bug. (that we thought we had fixed in 19.3.4)

  • User_ZZQ0F
    User_ZZQ0F Member Posts: 25 Green Ribbon

    After I change wallet location, I am not able to connect to DB using CONNECT /@my_DB with the vs code extension, SQLcl or SQL Developer

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,852 Employee
    edited March 31

    Hi,

    I just wanted to verify that as long as the path to the wallet in your SQLNET.ORA is correct, that you are able to connect using SEPS with Oracle Developer Tools for VS Code. I think you said that. Is that true?

    After long discussions with the engineering staff, I have been informed that ONLY the path to the wallet inside of SQLNET.ORA is used by SEPS. The WalletFileFolder setting does NOT override it. So if you move the wallet, you will need to modify your SQLNET.ORA.

    (The Walletfilefolder setting is used to override the wallet path for SSL/TSL.)

    Yes, it is a little confusing. Sorry about that.

    And as an aside, as of version 19.3.4 SEPS only works with our extension on Windows (not on macOS or Linux).

  • User_ZZQ0F
    User_ZZQ0F Member Posts: 25 Green Ribbon
    edited March 31

    As long as the path to the wallet in my SQLNET.ORA is correct, I am able to connect using SEPS with Oracle Developer Tools for VS Code ONLY by using command: CONNECT /@My_DB.

    However, I cannot create passwordless connection in Oracle Developer Tools for VS Code. In connection wizard I need always to provide password, despite the fact I have configured SEPS.

    Is it possible to use SEPS and connect passwordless directly in VSCode without using CONNECT /@My_DB? Could you please add that feature in next release?

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,852 Employee

    Hi,

    I confirmed with my team that the connection dialog will work as long as you use "/" as the username in the connection dialog, and no password.

    Also, if you modify the sqlnet.ora, you will need to restart Visual Studio Code to pick it up.

    Have you tried username "/" and no password in the connection dialog?

  • User_ZZQ0F
    User_ZZQ0F Member Posts: 25 Green Ribbon

    I confirm that the trick with "/" allows to skip password.

    Connection is working fine configured that way:

    Only one problem left is that I cannot place to wallet more that 159 connections. If I add even one more connection to the wallet then I cannot connect to none of the connection stored in the wallet by Oracle Developer Tools for VS Code. However I can still connect using SQLcl and SQL Developer. Based on this it looks like it is the extension related issue.

    Issue details here: https://community.oracle.com/tech/developers/discussion/4479585/wallet-stops-working-when-contains-more-than-159-connections#latest)


    Here is the error log when the wallet contains more than 159 connections:


  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,852 Employee
    edited April 1

    Hi, great to hear you are almost there... it turns out that this wallet sizing issue is a known bug. But fortunately it does have a workaround - you can split up the wallet so it is in more than one file.

    Do you know how to do that? (I am looking for an example for you if not)

  • User_ZZQ0F
    User_ZZQ0F Member Posts: 25 Green Ribbon

    So far, I have two wallets and I change folder name according to my needs.

    Do you have a better trick?

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,852 Employee

    I did a lot of research into this and there's no good workaround aside from the obvious which you are already aware of. Hopefully we can fix this in a future release. Sorry it caused you so much hassle.

    By the way, the bug occurs when the wallet file exceeds 64k. I assume your wallet file is larger than 64k when this happens?

    I assume you need all 159 wallet entries? If not you can obviously delete some of them.

  • User_ZZQ0F
    User_ZZQ0F Member Posts: 25 Green Ribbon

    You are right. The working wallet has exactly 60kb and not working one (containing all db connections) has 115kb.

    Lets hope the issue will be fixed in next releases.

    Appreciate your help and thank you for you effort!

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,852 Employee

    Thanks for your help with this. In a coming release (not sure which one) we will remove the 64k wallet size restriction, and we may be able to allow the wallet path in the sqlnet.ora to be overridden. I will update this thread when a release fixes this issue so that you will get a notification. Thanks again!

Sign In or Register to comment.