IBM / nodejs-itoolkit

A JavaScript (Node.js) library for communicating with IBM i
MIT License
43 stars 37 forks source link

NEW CASE FOR IBMi : *CURRENT for user profile and password is not accepted . #388

Closed KobiSaada closed 1 month ago

KobiSaada commented 7 months ago

Describe the bug To clear things out: we are not trying to change the user profile and password, we are trying to connect to IBM i via NodeJS running on the IBM i.

Connection procedure as described in the documentation of XMLSERVICES using *CURRENT in username and password. This does not work. If instead we specify an IBM i user and password it works.

Screenshots const { Connection} = require('itoolkit'); //xml services const connection = new Connection({ transport: 'ssh', transportOptions: { database: 'LOCAL', username: CURRENT, password: *CURRENT, host: 'localhost', }, });

and its not connected even im already connected to the system and even i run it from the ibmi/as400 system.

I would appreciate a solution, thanks.

kadler commented 7 months ago

The IBM i Access ODBC driver has a limitation that using CURRENT does not work if the user has PASSWORD(NONE). Does the user have a password assigned?

KobiSaada commented 6 months ago

Yes the user have a password

בתאריך יום ב׳, 18 במרץ 2024 ב-17:18 מאת Kevin Adler < @.***>:

The IBM i Access ODBC driver has a limitation that using CURRENT does not work if the user has PASSWORD(NONE). Does the user have a password assigned?

— Reply to this email directly, view it on GitHub https://github.com/IBM/nodejs-itoolkit/issues/388#issuecomment-2004196037, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARUMXHLWSDBZR6NIKCBYHXTYY4AVZAVCNFSM6AAAAABE3WXWDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBUGE4TMMBTG4 . You are receiving this because you authored the thread.Message ID: @.***>

kadler commented 6 months ago

Oh I missed that you were using SSH, yeah you need to provide a username and password in that case or use an SSH key. See the examples: https://nodejs-itoolkit.readthedocs.io/en/latest/Connection.html#examples

KobiSaada commented 6 months ago

There is any way to use *CURRENT for user and password in nodejs -toolkit-xmlservices?

בתאריך יום ג׳, 19 במרץ 2024 ב-15:49 מאת Kevin Adler < @.***>:

Oh I missed that you were using SSH, yeah you need to provide a username and password in that case or use an SSH key. See the examples: https://nodejs-itoolkit.readthedocs.io/en/latest/Connection.html#examples

— Reply to this email directly, view it on GitHub https://github.com/IBM/nodejs-itoolkit/issues/388#issuecomment-2007232441, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARUMXHKT2WNGDOCQCKLEFF3YZA7APAVCNFSM6AAAAABE3WXWDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBXGIZTENBUGE . You are receiving this because you authored the thread.Message ID: @.***>

kadler commented 6 months ago

Yes, but only with ODBC as the *CURRENT thing is a special feature of the ODBC driver. No other transport supports it.

abmusse commented 1 month ago

*CURRENT is a special odbc feature. The SSH transport requires passing the password or using key authentication.

Please see the using key based authentication if you don't want to use a password with SSH transport: https://nodejs-itoolkit.readthedocs.io/en/latest/Connection.html#examples