Monday, July 5, 2010

Get rid of the annoying userid and password prompt of the Managed Server start script in SOA Suite 11.1.1.3

The default location of boot.properties in SOA Suite has been changed since 11.1.1.2. The following instructions apply to SOA Suite 11.1.1.3.


To get rid of the username/password prompt during Managed Server startup, place the boot.properties file into the 'security' directory of your managed server. For example, if you managed server name is soa_server1 and your SOA domain is my_soa_domain, then the directory you will place your boot.properties file will be


$MW_HOME/user_projects/domains/my_soa_domain/servers/soa_server1/security


If the 'security' sub-folder does not exist, create it.


The typical content of the boot.properties file will be

username=weblogic
password=welcome123

If you have used different username and password during domain creation, you can specify them here.


Note that upon successful managed server startup, the content of the boot.properties file where you have your username and password in plain text will be encrypted and will look like this

#Mon Jul 05 11:05:31 EST 2010
password={AES}2KPlIqIyN/3Wz8VPawxF+rPyYTBkZ36+mRzgop1VkGU\=
username={AES}QQcQN7tKF7CLFZftjPOq9okkXKSRIfX/BbJVckEv6Xk\=

If you prefer to specify your own location of boot.properties, or even to use a different file name, you can specify them using the JAVA_OPTIONS parameter in the managed server startup script. Open the startManagedServer.sh script located in your $MW_HOME/user_projects/domains/my_soa_domain/bin and add the following lines (preserve the existing JAVA_OPTIONS if there is any).


How-To
- locate the 'export JAVA_OPTIONS' string
- add the following line before the the 'export JAVA_OPTIONS' line
JAVA_OPTIONS="-Dweblogic.system.BootIdentityFile=[your preferred location]/[your preferred properties filename]" ${JAVA_OPTIONS}"
- save the file and exit

Now start the manage server, you will see in the terminal the following java options

/home/kj/Oracle/Middleware/jdk160_18/bin/java -client -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=soa_server1 -Djava.security.policy=/home/kj/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.policy -Dweblogic.system.BootIdentityFile=/home/kj/Oracle/Middleware/user_projects/domains/soapg_domain/soa_server1_boot.properties -Dweblogic.security.SSL.trustedCAKeyStore=/home/kj/Oracle/Middleware/wlserver_10.3/server/lib/cacerts -Xverify:none -da
...
...
...

The following information on the startup console indicates that the original properties file has been encrypted and stored in the same location as the original plain-text soa_server1_boot.properties.
Storing boot identity in the file: /home/kj/Oracle/Middleware/user_projects/domains/soapg_domain/soa_server1_boot.properties
Open the file soa_server1_boot.properties and you shall see the encypted contents and voila, no more username/password nags on Managed Server startup.

password={AES}2KPlIqIyN/3Wz8VPawxF+rPyYTBkZ36+mRzgop1VkGU\=
username={AES}QQcQN7tKF7CLFZftjPOq9okkXKSRIfX/BbJVckEv6Xk\=

Happy playing.

Cheers.

No comments:

Post a Comment