Thursday, October 20, 2011

Use WLST script without clear text user/password

If you want to connect with wlst against a WebLogic domain without providing username and password in clear text, you can generate an user configuration file with encrypted credentials in it:

wls:/offline> connect(url='t3://localhost:7001')
Please enter your username :weblogic
Please enter your password :********
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'soa'.
wls:/soa/serverConfig> storeUserConfig()
Creating the key file can reduce the security of your system...
Do you want to cre
ate the key file? y
The username and password that were used for this WebLogic Server connection are stored in
>/<user> and

The file now contains a key and the file the encrypted credentials. You'll find both in your user's hone directory. Now you can connect with wlst without providing credentials, but keep an eye on these files!

No comments:

Post a Comment