I have a glassfish 3.1.2.2 installation with OSGI addons installed. I have also installed the webconsole jars and enabled the console on
http://localhost:8080/osgi/system/console
Then as for security, I wanted to change the login username and password, the default one is admin/admin, which is not good for production env.
I have checked documentation as well as some tutorials online, but seems like they didnt work for Felix Webconsole on Glassfish.
I have tried to modify
gf_home/glassfish/domains/domain1/config/domain.xml
with the parameters Apache Felix Documentation page, and also created a file in
gf_home/glassfish3/glassfish/modules/autostart/ gf_home/glassfish3/glassfish/osgi/felix/conf
folders, titled org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg in properties file format, but neither of them worked. I am still able to login with admin/admin.
Am I missing some point in Webconsole settings? I have checked the code for the org.apache.felix.webconsole.internal.servlet.OsgiManager.java class and the username and password was set there, however, there is an updateConfiguration method to overwrite this values.
What is the proper way to change username and password for the webconsole? The only option is to change the default values in the code?
After some trial and error randomly, I found out how to make the config and the webconsole addon work properly..
so I have moved the org.apache.felix.webconsole.jar file to autodeploy/bundles/ folder under the domain1, and also put org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg file into the same folder, then restarted Glassfish, and new username and passwords are fine.