Hi
Guys,
It's been a long
time, let's pump up the channel again :-)
I want to discuss
the password-issues again.
As you all know we
have to provide tn5250j or any jython
script we create
with a valid password over and over again.
Since yesterday i
finally saw you're able to provide the
AS400 class
com.ibm.as400.access.AS400 with the
next statement to
keep the password in cache.
AS400.setPasswordCache(1) --> in jython
AS400.setPasswordCache(true) --> in
java
is the statement to
let the jtopen toolkit store the
password in cache.
So if we can change tn5250j
somewhat so that
when we give username and
password for the
first time (for example when we
provide the data for
the first login-session) and then
imediately let
jtopen open an iSeries connection and
also close it right
away then we're sure the password
is in cache, which
means that when we have to open
a new connection to
the iSeries, that we simply can
use the next command
to logon without the password
dialog popping
up...
AS400("as400.stafa.nl",
System.getProperty("user.name"))
On our systems, the
user.name of the windows-box is
the same as the
profile on the iSeries, but for other
users it should be
possible to store the username in
a variable by the
first logon-session. In other words,
if we should do it
that way, and for example create a
variable that hold
the username (read profilename) then
we could just use
AS400("as400.stafa.nl",
ProfileVar)
to open a connection to the iSeries and users are
happy cause they do not have to provide that
freaking
password over and over
again.
What do you guys think about that
?
The password needs only to be referenced once,
when
we get the logonscreen for the first time and only
then,
so there is no need to store the password into a
variable
like we do for the username, cause the password
is
stored in the cache we do not need a variable for it
and
we are save again in the view of security, cause
you're
not able to obtain the password in any way, except
for
logging in with jtopen cause it stored that password
in
cache the very first time.
If all this above is not clear, read it over and over
again,
and just ask if something is unclear. If this all is
possible
i get new power in mood again, cause i do not have
to
worry anymore about users providing the password
over
and over again, and we can focus on extending
tn5250j
ever further, and programming java, jython and our
iSeries
becomes fun again. Cause that was the only thing
why
i always programmed my apps in VB.NET cause
CA
stored the password in cache also, and you only had
to
provide it once. So think about it and let me
know.
Met vriendelijke groeten,
Best Regards,
Best Regards,
Patrick Bielen
System-Administrator Stafa Holland
BV
Microsoft Certified Professional
Sun Certified Java Programmer
Microsoft Certified Professional
Sun Certified Java Programmer