Wednesday, March 6, 2013

Generating Configuration and Key Files For Node Manager

Version: WebLogic 10.3.5
Description: This post shows you how to generate a user configuration file and an associated key file for Node Manager. The user configuration file contains an encrypted username and password. The key file contains a secret key that is used to encrypt and decrypt the username and password. When connecting to Node Manager through WLST, you can specify the location of these files instead of supplying the Node Manager's username and password in plain-text.

1. [Optional] Create a directory to store the configuration and key files.
mkdir /home/oracle/nodeManagerConfig

2. Invoke WLST and connect to Node Manager.
sh /home/oracle/Oracle/Middleware/wlserver_10.3/common/bin/wlst.sh
nmConnect('weblogic', 'Password1', 'localhost', '5556', 'oim_domain', '/home/oracle/Oracle/Middleware/user_projects/domains/oim_domain','ssl','false')

3. Create the user configuration and key files by calling storeUserConfig().
#storeUserConfig([userConfigFile],[userKeyFile], [storeNMCred])
storeUserConfig('/home/oracle/nodeManagerConfig/oracle-WebLogicConfig.properties','/home/oracle/nodeManagerConfig/oracle-WebLogicKey.properties', 'true')
Currently connected to Node Manager to monitor the domain oim_domain.
Creating the key file can reduce the security of your system if it is 
not kept in a secured location after it is created. Do you want to create the key file? y or n
y
The username and password that were used for this WebLogic NodeManager connection are stored in 
/home/oracle/nodeManagerConfig/oracle-WebLogicConfig.properties and /home/oracle/nodeManagerConfig/oracle-WebLogicKey.properties.

4. Connect to Node Manager using configuration files.
#nmConnect([userConfigFile, userKeyFile], [host], [port], [domainName], [domainDir], [nmType], [verbose])
nmConnect(userConfigFile='/home/oracle/nodeManagerConfig/oracle-WebLogicConfig.properties',userKeyFile='/home/oracle/nodeManagerConfig/oracle-WebLogicKey.properties',host='localhost',port='5556',domainName='oim_domain',domainDir='/home/oracle/Oracle/Middleware/user_projects/domains/oim_domain',mType='ssl',verbose='false')

No comments:

Post a Comment